Matthew Gretton-Dann [Thu, 29 Mar 2012 10:28:40 +0000 (10:28 +0000)]
2012-03-29 Terry Guo <terry.guo@arm.com>
* gas/config/tc-arm.c (arm_cpus): Add cortex-m0plus.
* gas/doc/c-arm.texi (ARM Options): Document -mcpu=cortex-m0plus.
Tom Tromey [Thu, 29 Mar 2012 01:55:41 +0000 (01:55 +0000)]
* dwarf.c (display_gdb_index): Handle index version 6.
Kevin Buettner [Thu, 29 Mar 2012 00:57:19 +0000 (00:57 +0000)]
Commit gdb and sim support for v850e2 and v850e2v3 on behalf of
Rathish C <Rathish.C@kpitcummins.com>.
gdbadmin [Thu, 29 Mar 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Wed, 28 Mar 2012 23:00:04 +0000 (23:00 +0000)]
daily update
Joel Brobecker [Wed, 28 Mar 2012 21:31:56 +0000 (21:31 +0000)]
[NEWS] Announce support for Ada varobj support.
gdb/ChangeLog:
* NEWS: Add entry for Ada varobj support.
Joel Brobecker [Wed, 28 Mar 2012 21:31:46 +0000 (21:31 +0000)]
[doco] document the "type_changed" flag further.
gdb/doc/ChangeLog:
* gdb.texinfo (GDB/MI Variable Objects): Document what happens
to the children of a varobj and its update range when -var-update
returns that the varobj's type changed.
Joel Brobecker [Wed, 28 Mar 2012 21:31:29 +0000 (21:31 +0000)]
New varobj language callback: value_is_changeable_p.
This patch introduces a new language-specific callback for varobj
objects, allowing us to move the language-specific bits of the
varobj_value_is_changeable_p routine to language-specific functions.
This is more elegant than testing for the varobj's language...
gdb/ChangeLog:
* varobj.c (default_value_is_changeable_p): New function,
extracted from varobj_value_is_changeable_p. Add declaration.
(ada_value_is_changeable_p): New function, extracted from
varobj_value_is_changeable_p. Add declaration.
(struct language_specific): New field "value_is_changeable_p".
(languages): Add entries for new field.
(varobj_create): Set language before calling install_new_value.
(varobj_value_is_changeable_p): Reimplement to call the varobj's
"value_is_changeable_p" language callback.
Joel Brobecker [Wed, 28 Mar 2012 21:31:18 +0000 (21:31 +0000)]
Varobj support for Ada.
This patch adds varobj support for Ada variables. Most of the code
is implemented in a separate Ada-specific file called ada-varobj.c.
The only bits in varobj.c are the functions used as the hooks in
the language-specific varobj's vector.
gdb/ChangeLog:
* ada-varobj.h, ada-varobj.c: New files.
* Makefile.in (SFILES): Add ada-varobj.c.
(HFILES_NO_SRCDIR): Add ada-varobj.h.
(COMMON_OBS): Add ada-varobj.o.
Joel Brobecker [Wed, 28 Mar 2012 21:31:05 +0000 (21:31 +0000)]
framework for varobj type mutation
This patch introduces the framework necessary to support type mutations.
The only language that currently provides a language-specific hook for
that feature is Ada, but the hook remain unimplemented for now. The
actual implementation is tied to the rest of the varobj code for Ada,
and thus will be provided then.
gdb/ChangeLog:
* varobj.c (ada_value_has_mutated): Add declaration. New function.
(struct language_specific): New field "value_has_mutated".
(languages): Set field "value_has_mutated" in each entry of array.
(varobj_value_has_mutated): New function.
(varobj_udpdate): Add handling of type mutation.
(value_of_root): Add handling of type mutation.
(ada_value_has_mutated): New function.
Pedro Alves [Wed, 28 Mar 2012 18:30:01 +0000 (18:30 +0000)]
2012-03-28 Pedro Alves <palves@redhat.com>
* linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
(IA64_GR0_REGNUM, IA64_FR0_REGNUM)
(IA64_FR1_REGNUM): New defines.
(ia64_fetch_register): New.
(the_low_target): Install it.
* linux-low.h (struct linux_target_ops) <fetch_register>: New
field.
* linux-low.c (linux_fetch_registers): Try the
the_low_target.fetch_register hook first.
* linux-arm-low.c (the_low_target): Adjust.
* linux-bfin-low.c (the_low_target): Adjust.
* linux-cris-low.c (the_low_target): Adjust.
* linux-crisv32-low.c (the_low_target): Adjust.
* linux-m32r-low.c (the_low_target): Adjust.
* linux-m68k-low.c (the_low_target): Adjust.
* linux-mips-low.c (the_low_target): Adjust.
* linux-ppc-low.c (the_low_target): Adjust.
* linux-s390-low.c (the_low_target): Adjust.
* linux-sh-low.c (the_low_target): Adjust.
* linux-sparc-low.c (the_low_target): Adjust.
* linux-tic6x-low.c (the_low_target): Adjust.
* linux-x86-low.c (the_low_target): Adjust.
* linux-xtensa-low.c (the_low_target): Adjust.
Pedro Alves [Wed, 28 Mar 2012 17:50:17 +0000 (17:50 +0000)]
2012-03-28 Pedro Alves <palves@redhat.com>
* ia64-linux-nat.c (supply_fpregset, ia64_linux_fetch_register):
Always supply $fr0 as 0.0 and $fr1 as 1.0.
Tom Tromey [Wed, 28 Mar 2012 17:38:08 +0000 (17:38 +0000)]
* python/py-inferior.c (infpy_read_memory): Remove cleanups and
explicitly free 'buffer' on exit paths. Decref 'membuf_object'
before returning.
Tom Tromey [Wed, 28 Mar 2012 17:35:38 +0000 (17:35 +0000)]
* .dir-locals.el: New file.
Keith Seitz [Wed, 28 Mar 2012 17:33:33 +0000 (17:33 +0000)]
* gdb.linespec/ls-dollar.cc: New file.
* gdb.linespec/ls-dollar.exp: New test.
Pedro Alves [Wed, 28 Mar 2012 17:29:54 +0000 (17:29 +0000)]
2012-03-28 Pedro Alves <palves@redhat.com>
* ia64-linux-nat.c (u_offsets): Map IA64_EC_REGNUM to PT_AR_EC.
Keith Seitz [Wed, 28 Mar 2012 17:29:42 +0000 (17:29 +0000)]
* gdb.cp/namespace.exp: Add breakpoint tests for functions
starting with the global namespace.
Joel Brobecker [Wed, 28 Mar 2012 17:08:48 +0000 (17:08 +0000)]
[ia64-linux] Allow libunwind to fetch register 0
On ia64-linux, GDB sometimes prints the following error when trying
to switch to a different task:
(gdb) task 3
Register 0 is not available
This is a random failure that sometimes happens, sometimes does not.
The error comes from the fact that the libunwind library is requesting
the value of register 0 (zero): This eventually leads us to
ia64-linux-nat.c:ia64_linux_fetch_register.
This function relies on ia64_cannot_fetch_register to determine
whether or not we have access to the register's value. The ptrace
interface does not provide the r0 value, and so we end up telling
the regcache that this register's value is not available. And yet,
for r0, we do not need to ask ptrace for its value, since it is
always zero.
So, the fix was to add a special rule for supplying a nul value
when regnum == IA64_GR0_REGNUM.
gdb/ChangeLog:
* ia64-linux-nat.c (ia64_linux_fetch_register): Add special
handling for r0.
Pawandeep Oza [Wed, 28 Mar 2012 04:37:43 +0000 (04:37 +0000)]
Pawandeep Oza updated to write-after-apporval section at the correct order
gdbadmin [Wed, 28 Mar 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Tue, 27 Mar 2012 23:00:05 +0000 (23:00 +0000)]
daily update
Jan Kratochvil [Tue, 27 Mar 2012 20:44:13 +0000 (20:44 +0000)]
gdb/doc/
* gdb.texinfo (Auto-loading): Move @menu to the end of @node.
Create two new links fir 'objfile-gdb.py file'
and 'dotdebug_gdb_scripts section'.
Jan Kratochvil [Tue, 27 Mar 2012 20:15:20 +0000 (20:15 +0000)]
gdb/doc/
* gdb.texinfo (Auto-loading): Rename node reference
'.debug_gdb_scripts section' to 'dotdebug_gdb_scripts section'.
Twice.
(.debug_gdb_scripts section): Rename the node ...
(dotdebug_gdb_scripts section): ... here.
(Maintenance Commands): Also rename this node reference.
Roland McGrath [Tue, 27 Mar 2012 19:23:59 +0000 (19:23 +0000)]
ld/
* configure.in: Set want64 on a 64-bit host regardless of
--enable-targets=all.
* configure: Regenerated.
Pedro Alves [Tue, 27 Mar 2012 19:16:23 +0000 (19:16 +0000)]
Fix formatting.
Pedro Alves [Tue, 27 Mar 2012 19:08:37 +0000 (19:08 +0000)]
2012-03-27 Pedro Alves <palves@redhat.com>
Eliminate struct ui_stream.
* ui-out.h (struct ui_stream): Delete.
(ui_out_field_stream): Adjust prototype.
(ui_out_stream_new, ui_out_stream_delete)
(make_cleanup_ui_out_stream_delete): Delete declarations.
* ui-out.c (ui_out_field_stream): Change prototype to take a
ui_file instead of a ui_stream. Adjust.
(ui_out_stream_new, ui_out_stream_delete, do_stream_delete)
(make_cleanup_ui_out_stream_delete): Delete.
* breakpoint.c (print_breakpoint_location)
(print_one_detail_ranged_breakpoint, print_it_watchpoint): Use
ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new.
* disasm.c (dump_insns): Ditto.
(do_mixed_source_and_assembly, do_assembly_only): Adjust
prototype.
(gdb_disassembly): Use ui_file/mem_fileopen instead of
ui_stream/ui_out_stream_new.
* infcmd.c (print_return_value): Ditto.
* osdata.c (info_osdata_command): Don't allocate a local
ui_stream.
* stack.c (print_frame_arg, print_frame_args, print_frame): Use
ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new.
* tracepoint.c (print_one_static_tracepoint_marker): Don't
allocate a local ui_stream.
* mi/mi-cmd-stack.c (list_arg_or_local): Use ui_file/mem_fileopen
instead of ui_stream/ui_out_stream_new.
(list_args_or_locals): Don't allocate a local ui_stream.
* mi/mi-main.c (get_register, mi_cmd_data_evaluate_expression)
(mi_cmd_data_read_memory): Use ui_file/mem_fileopen instead of
ui_stream/ui_out_stream_new.
* cli/cli-setshow.c (do_setshow_command): Ditto.
Pawandeep Oza [Tue, 27 Mar 2012 15:46:33 +0000 (15:46 +0000)]
* arm-linux-tdep.c (arm_linux_init_abi): Call
set_gdbarch_process_record.
Initialize `arm_swi_record' field.
* arm-tdep.c (arm_process_record): New function.
(deallocate_reg_mem): New function.
(decode_insn): New function.
(thumb_record_branch): New function.
(thumb_record_ldm_stm_swi(): New function.
(thumb_record_misc): New function.
(thumb_record_ld_st_stack): New function.
(thumb_record_ld_st_imm_offset): New function.
(thumb_record_ld_st_reg_offset(): New function.
(thumb_record_add_sub_cmp_mov): New function.
(thumb_record_shift_add_sub): New function.
(arm_record_coproc_data_proc): New function.
(arm_record_coproc): New function.
(arm_record_b_bl): New function.
(arm_record_ld_st_multiple): New function.
(arm_record_ld_st_reg_offset): New function.
(arm_record_ld_st_imm_offset): New function.
(arm_record_data_proc_imm): New function.
(arm_record_data_proc_misc_ld_str): New function.
(arm_record_extension_space): New function.
(arm_record_strx): New function.
(sbo_sbz): New function.
(struct insn_decode_record): New structure for arm insn record.
(REG_ALLOC): New macro for reg allocations.
(MEM_ALLOC): New macro for memory allocations.
* arm-tdep.h (struct gdbarch_tdep): New field 'arm_swi_record'
Andreas Schwab [Tue, 27 Mar 2012 08:15:26 +0000 (08:15 +0000)]
* m68klinux-nat.c (fetch_register): Fix strict-aliasing violation.
(store_register): Likewise.
Mike Frysinger [Tue, 27 Mar 2012 04:18:05 +0000 (04:18 +0000)]
sim: add bugzilla marking
gdbadmin [Tue, 27 Mar 2012 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Mon, 26 Mar 2012 23:00:04 +0000 (23:00 +0000)]
daily update
Pawandeep Oza [Mon, 26 Mar 2012 18:18:40 +0000 (18:18 +0000)]
MAINTAINERS (Write After Approval): Add myself to the list.
Pedro Alves [Mon, 26 Mar 2012 13:54:57 +0000 (13:54 +0000)]
2012-03-26 Pedro Alves <palves@redhat.com>
* server.c (handle_qxfer_libraries): Don't bail early if
the_target->qxfer_libraries_svr4 is not NULL.
Tristan Gingold [Mon, 26 Mar 2012 13:05:16 +0000 (13:05 +0000)]
2012-03-26 Tristan Gingold <gingold@adacore.com>
* lexsup.c (parse_args): Add a missing '\n'.
Pedro Alves [Mon, 26 Mar 2012 12:39:19 +0000 (12:39 +0000)]
2012-03-26 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
Mike Frysinger [Mon, 26 Mar 2012 02:18:43 +0000 (02:18 +0000)]
sim: add a proper sim_core_trans_addr prototype
The common code has a sim_core_trans_addr() helper that only the m32r code
uses. Move the inline extern in the m32r code to the proper common header.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
gdbadmin [Mon, 26 Mar 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 25 Mar 2012 23:00:05 +0000 (23:00 +0000)]
daily update
Mike Frysinger [Sun, 25 Mar 2012 16:51:46 +0000 (16:51 +0000)]
sim: bfin: skip .c/.S tests if no compiler is available
Similar to logic in the cris exp, attempt a simple compile and if it fails
(presumably due to the compiler being broken), skip all the related tests.
Fortunately, most tests (~600 out of ~800) are pure assembly, so people should
still get pretty good coverage.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Jan Kratochvil [Sun, 25 Mar 2012 13:44:01 +0000 (13:44 +0000)]
gdb/
* NEWS (set breakpoint condition-evaluation): Change "gdb" to "host".
Describe also the option "auto".
Mike Frysinger [Sun, 25 Mar 2012 07:56:12 +0000 (07:56 +0000)]
sim: bfin: disable redundant test that makes 32bit gas angry
Alan Modra [Sun, 25 Mar 2012 06:45:16 +0000 (06:45 +0000)]
ld/
* ldemul.c (before_allocation_default): Revert last change.
ldlang.c (lang_add_section): Likewise.
(strip_excluded_output_sections): Don't strip output sections with
user input sections when emitrelocations, unless all are SEC_EXCLUDE.
ld/testsuite/
* ld-powerpc/vxworks-relax.rd: Remove check on reloc section
file offset and reloc symbol indices.
Mike Frysinger [Sun, 25 Mar 2012 06:43:43 +0000 (06:43 +0000)]
sim: bfin: fix typos in large constants in tests
Truncate constants that are larger than 32bits but get loaded into 32bit
registers. These high bits don't get used and don't really make sense.
gdbadmin [Sun, 25 Mar 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sat, 24 Mar 2012 23:00:05 +0000 (23:00 +0000)]
daily update
Hans-Peter Nilsson [Sat, 24 Mar 2012 09:31:09 +0000 (09:31 +0000)]
* nrun.c: Add #ifdef HAVE_CONFIG_H and associated includes stanza
missing in last change.
Mike Frysinger [Sat, 24 Mar 2012 05:38:43 +0000 (05:38 +0000)]
[PATCH] sim: make sure to include strsignal prototype
Before POSIX standardized strsignal(), old systems would hide the
prototype unless the normal extension defines were enabled. So use
the AC_USE_SYSTEM_EXTENSIONS helper for that.
Then make sure we include string.h ourselves in nrun.c rather than
relying on implicit includes via other sim headers.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 24 Mar 2012 05:37:10 +0000 (05:37 +0000)]
sim: testsuite: regen configure after rl78 addition
Mike Frysinger [Sat, 24 Mar 2012 05:33:42 +0000 (05:33 +0000)]
sim: cris: update testsuite output after strsignal change
Maxim Kuvyrkov [Sat, 24 Mar 2012 01:09:28 +0000 (01:09 +0000)]
gas/
* config/tc-mips.c (mips_cpu_info_table): Add entry for Broadcom XLP.
* doc/c-mips.texi: Mention XLP.
opcodes/
* mips-dis.c (mips_arch_choices): Add entry for Broadcom XLP.
gdbadmin [Sat, 24 Mar 2012 00:00:04 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 23 Mar 2012 23:00:06 +0000 (23:00 +0000)]
daily update
Doug Evans [Fri, 23 Mar 2012 22:28:35 +0000 (22:28 +0000)]
* lib/gdb.exp (BUILD_DATA_DIRECTORY): New global.
Pedro Alves [Fri, 23 Mar 2012 20:27:08 +0000 (20:27 +0000)]
2012-03-23 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_qxfer_libraries_svr4): Terminate the
"library-list-svr4" element's start tag when the the DSO list is
empty.
Pedro Alves [Fri, 23 Mar 2012 20:26:14 +0000 (20:26 +0000)]
2012-03-23 Pedro Alves <palves@redhat.com>
* linux-low.c (read_one_ptr): Read the inferior's pointer through
a variable whose type size is the same as the inferior's pointer
size.
Alan Modra [Fri, 23 Mar 2012 09:35:34 +0000 (09:35 +0000)]
* ldemul.c (before_allocation_default): When emitrelocations,
don't strip sections..
* ldlang.c (lang_add_section): ..and don't set up map_head, map_tail.
Alan Modra [Fri, 23 Mar 2012 09:34:57 +0000 (09:34 +0000)]
* elf.c (assign_file_positions_for_non_load_sections): Don't warn
on empty alloc sections.
Alan Modra [Fri, 23 Mar 2012 09:27:43 +0000 (09:27 +0000)]
* linker.c (_bfd_nearby_section): New function, split out from..
(fix_syms): ..here.
* bfd-in.h (_bfd_nearby_section): Declare.
* bfd-in2.h: Regenerate.
* elflink.c (elf_link_input_bfd): Don't use text_index_section or
data_index_section with ld -q or ld -r output relocs against
stripped output sections. Instead use _bfd_nearby_section.
Alan Modra [Fri, 23 Mar 2012 06:41:21 +0000 (06:41 +0000)]
PR binutils/13894
* elf64-ppc.c (opd_entry_value): Read full symbol table when
sym hashes unavailable.
Mike Frysinger [Fri, 23 Mar 2012 04:30:55 +0000 (04:30 +0000)]
sim: testsuite: regen configure after rl78 addition
Mike Frysinger [Fri, 23 Mar 2012 04:00:59 +0000 (04:00 +0000)]
sim: rx: fix warnings with AC_DEFINE
This lets `autoheader` work again.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Fri, 23 Mar 2012 03:27:44 +0000 (03:27 +0000)]
sim: sync build_warnings handling with gdb
The sim code gets the logic for SIM_AC_OPTION_WARNINGS from gdb, but
it hasn't been updated in a good long while. Sync with the latest
gdb code.
There is a sim specific change in here: we disable -Werror for now.
This is because all sim code atm contains warnings. Will probably
have to slowly add a white list of targets which can tolerate this
until everyone is updated.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
gdbadmin [Fri, 23 Mar 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 22 Mar 2012 23:00:05 +0000 (23:00 +0000)]
daily update
Richard Henderson [Thu, 22 Mar 2012 20:36:34 +0000 (20:36 +0000)]
* sparc-linux-nat.c (_initialize_sparc_linux_nat): Fix prototype.
* sparc-nat.c (sparc_xfer_wcookie): Make static.
Richard Henderson [Thu, 22 Mar 2012 20:33:42 +0000 (20:33 +0000)]
* jit.c (jit_read_code_entry): Compute alignment and offset of
int64_t member before computing entry_size.
Siva Chandra Reddy [Thu, 22 Mar 2012 08:10:44 +0000 (08:10 +0000)]
2012-03-14 Siva Chandra <sivachandra@google.com>
Python scripting: Add new method Value.referenced_value to
gdb.Value which can dereference pointer as well as reference
values.
* NEWS: Add entry under 'Python scripting' about the new method
Value.referenced_value on gdb.Value objects.
* python/py-value.c (valpy_referenced_value): New function
defining a new method on gdb.Value objects which can dereference
pointer and reference values.
* testsuite/gdb.python/py-value.cc: Add test case for
testing the methodology exposing C++ values to Python.
* testsuite/gdb.python/py-value-cc.exp: Add tests testing the
methodology exposing C++ values to Python.
* testsuite/gdb.python/Makefile.in: Add py-value-cc to
EXECUTABLES.
* docs/gdb.texinfo (Python API/Values From Inferior): Add
description about the new method Value.referenced_value. Add
description on how Value.dereference is different (and similar)
to Value.referenced_value.
Siva Chandra Reddy [Thu, 22 Mar 2012 07:48:40 +0000 (07:48 +0000)]
2012-03-22 Siva Chandra Reddy <sivachandra@google.com>
* MAINTAINERS (Write After Approval): Add myself to the list.
gdbadmin [Thu, 22 Mar 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Wed, 21 Mar 2012 23:00:05 +0000 (23:00 +0000)]
daily update
Kevin Buettner [Wed, 21 Mar 2012 21:59:19 +0000 (21:59 +0000)]
* symtab.c (skip_prologue_sal): Change test to check for "main()"
in addition to "main".
Hans-Peter Nilsson [Wed, 21 Mar 2012 19:15:02 +0000 (19:15 +0000)]
PR ld/13813
* ld-mips-elf/comm-data.exp (mips_comm_data_test): For N32 and N64
tests, also specify assembler option -march=mips3.
Cary Coutant [Wed, 21 Mar 2012 19:02:22 +0000 (19:02 +0000)]
2012-03-21 Cary Coutant <ccoutant@google.com>
* Makefile.am: Add gdb-index.cc, gdb-index.h.
* Makefile.in: Regenerate.
* dwarf_reader.cc (Sized_elf_reloc_mapper::do_initialize): New function.
(Sized_elf_reloc_mapper::symbol_section): New function.
(Sized_elf_reloc_mapper::do_get_reloc_target): New function.
(make_elf_reloc_mapper): New function.
(Dwarf_abbrev_table::clear_abbrev_codes): New function.
(Dwarf_abbrev_table::do_read_abbrevs): New function.
(Dwarf_abbrev_table::do_get_abbrev): New function.
(Dwarf_ranges_table::read_ranges_table): New function.
(Dwarf_ranges_table::read_range_list): New function.
(Dwarf_pubnames_table::read_section): New function.
(Dwarf_pubnames_table::read_header): New function.
(Dwarf_pubnames_table::next_name): New function.
(Dwarf_die::Dwarf_die): New function.
(Dwarf_die::read_attributes): New function.
(Dwarf_die::skip_attributes): New function.
(Dwarf_die::set_name): New function.
(Dwarf_die::set_linkage_name): New function.
(Dwarf_die::attribute): New function.
(Dwarf_die::string_attribute): New function.
(Dwarf_die::int_attribute): New function.
(Dwarf_die::uint_attribute): New function.
(Dwarf_die::ref_attribute): New function.
(Dwarf_die::child_offset): New function.
(Dwarf_die::sibling_offset): New function.
(Dwarf_info_reader::check_buffer): New function.
(Dwarf_info_reader::parse): New function.
(Dwarf_info_reader::do_parse): New function.
(Dwarf_info_reader::do_read_string_table): New function.
(Dwarf_info_reader::lookup_reloc): New function.
(Dwarf_info_reader::get_string): New function.
(Dwarf_info_reader::visit_compilation_unit): New function.
(Dwarf_info_reader::visit_type_unit): New function.
(Sized_dwarf_line_info::Sized_dwarf_line_info): Use
Sized_elf_reloc_mapper.
(Sized_dwarf_line_info::symbol_section): Remove function.
(Sized_dwarf_line_info::read_relocs): Use Sized_elf_reloc_mapper.
(Sized_dwarf_line_info::read_line_mappings): Remove object
parameter, adjust callers.
(Sized_dwarf_line_info::format_file_lineno): Fix type of cast.
* dwarf_reader.h: Include <sys/types.h>.
(class Track_relocs): Remove forward declaration.
(class Elf_reloc_mapper): New class.
(class Sized_elf_reloc_mapper): New class.
(class Dwarf_abbrev_table): New class.
(class Dwarf_range_list): New class.
(class Dwarf_ranges_table): New class.
(class Dwarf_pubnames_table): New class.
(class Dwarf_die): New class.
(class Dwarf_info_reader): New class.
(Sized_dwarf_line_info::read_line_mappings): Remove object parameter.
(Sized_dwarf_line_info::symbol_section): Remove member function.
* dynobj.h (Sized_dynobj::do_section_contents): Refactor code from
base class.
* gdb-index.cc: New source file.
* gdb-index.h: New source file.
* incremental.cc (Sized_relobj_incr::do_layout): Track .debug_info
and .debug_types sections, call Layout::add_to_gdb_index.
(Sized_relobj_incr::do_section_name): Implement.
(Sized_relobj_incr::do_section_contents): Adjust parameter list and
return type; Implement.
(Sized_incr_dynobj::do_section_contents): Adjust parameter list and
return type.
* incremental.h (Sized_relobj_incr::do_section_contents): Adjust
parameter list and return type.
(Sized_incr_dynobj::do_section_contents): Likewise.
* layout.cc: Include gdb-index.h.
(Layout::Layout): Initialize gdb_index_data_.
(Layout::init_fixed_output_section): Check for .gdb_index section.
(Layout::add_to_gdb_index): New function. Instantiate.
* layout.h: Add forward declaration for class Gdb_index.
(Layout::add_to_gdb_index): New member function.
(Layout::gdb_index_data_): New data member.
* main.cc: Include gdb-index.h.
(main): Print statistics for gdb index.
* object.cc (Object::section_contents): Move code into
do_section_contents.
(need_decompressed_section): Check for sections needed when building
gdb index.
(build_compressed_section_map): Likewise.
(Sized_relobj_file::do_read_symbols): Need local symbols when building
gdb index.
(Sized_relobj_file::do_layout): Track .debug_info and .debug_types
sections; call Layout::add_to_gdb_index.
(Sized_relobj_file::do_decompressed_section_contents): Call
do_section_contents directly.
* object.h (Object::do_section_contents): Adjust parameter list and
return type.
(Object::do_decompressed_section_contents): Call do_section_contents
directly.
(Sized_relobj_file::do_section_contents): Adjust parameter list and
return type.
* options.h (class General_options): Add --gdb-index option.
* plugin.cc (Sized_pluginobj::do_section_contents): Adjust parameter
list and return type.
* plugin.h (Sized_pluginobj::do_section_contents): Likewise.
* reloc.h (Track_relocs::checkpoint): New function.
(Track_relocs::reset): New function.
* testsuite/Makefile.am (gdb_index_test_1.sh, gdb_index_test_2.sh):
New test cases.
* testsuite/Makefile.in: Regenerate.
* testsuite/gdb_index_test.cc: New test source file.
* testsuite/gdb_index_test_1.sh: New test source file.
* testsuite/gdb_index_test_2.sh: New test source file.
Joel Brobecker [Wed, 21 Mar 2012 15:16:24 +0000 (15:16 +0000)]
SEGV during AX eval of OP_DOUBLE (unsupported)
To reproduce the problem, simply try the following with any program:
(gdb) maintenance agent-eval 1.0
Critical error handler: process [...] terminated due to access violation
(this is on Windows; on GNU/Linux, the libc copes better)
The problem is quite simple: gen_expr is given an expression that
contains an unrecognized operator (OP_DOUBLE in this case). When that
happens, it tries to report an error with a string image of the operator
in the error message. Conversion of the opcode into a string is done
using op_string which, despite its name, probably is not what the author
was looking for. This function returns NULL for a lot of the opcodes,
thus triggering the crash.
There is a function that corresponds to what we are looking for:
expprint.c:op_name. It was static, though, so I made it non-static,
and used it from ax-gdb.c:gen_expr.
gdb/ChangeLog:
* expression.h (op_name): Add declaration.
* expprint.c (op_name): Remove declaration. Make non-static.
* ax-gdb.c (gen_expr): Use op_name instead of op_string.
Joseph Myers [Wed, 21 Mar 2012 14:55:45 +0000 (14:55 +0000)]
2012-03-21 Eliot Dresselhaus <eliot@sonic.net>
* elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
for non-C6X objects.
Thomas Schwinge [Wed, 21 Mar 2012 13:43:55 +0000 (13:43 +0000)]
struct siginfo vs. siginfo_t
gdb/
* amd64-linux-nat.c (amd64_linux_siginfo_fixup): Use siginfo_t instead
of struct siginfo.
* arm-linux-nat.c (arm_linux_stopped_data_address): Likewise.
* ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
* linux-nat.c (linux_nat_siginfo_fixup, siginfo_fixup)
(linux_xfer_siginfo, linux_nat_set_siginfo_fixup)
(linux_nat_get_siginfo): Likewise.
* linux-nat.h (struct lwp_info, linux_nat_set_siginfo_fixup)
(linux_nat_get_siginfo): Likewise.
* linux-tdep.c (linux_get_siginfo_type): Likewise.
* ppc-linux-nat.c (ppc_linux_stopped_data_address): Likewise.
* procfs.c (gdb_siginfo_t): Likewise.
gdbserver/
* linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
struct siginfo.
* linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
* linux-x86-low.c (x86_siginfo_fixup): Likewise.
* linux-low.h: Include <signal.h>.
(struct siginfo): Remove forward declaration.
(struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
struct siginfo.
Gary Benson [Wed, 21 Mar 2012 10:18:50 +0000 (10:18 +0000)]
ChangeLog fix
Thomas Schwinge [Wed, 21 Mar 2012 08:58:40 +0000 (08:58 +0000)]
gas/
[SH] Support the .uaquad and .8byte directives also for non-sh64
configurations.
* config/tc-sh.c (sh_cons_fix_new, md_apply_fix) [!HAVE_SH64]: Handle
BFD_RELOC_64.
* doc/c-sh64.texi (SH64 Machine Directives): Move .uaquad
description...
* doc/c-sh.texi (SH Machine Directives): ... here.
Mike Frysinger [Wed, 21 Mar 2012 04:53:29 +0000 (04:53 +0000)]
gdb: update gitignore
Mike Frysinger [Wed, 21 Mar 2012 04:51:36 +0000 (04:51 +0000)]
gdbserver: update gitignore
Mike Frysinger [Wed, 21 Mar 2012 04:50:01 +0000 (04:50 +0000)]
sim: cris: update testsuite output after strsignal change
Mike Frysinger [Wed, 21 Mar 2012 04:46:59 +0000 (04:46 +0000)]
sim/testsuite/: split up arch-specific changelogs
gdbadmin [Wed, 21 Mar 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Tue, 20 Mar 2012 23:00:05 +0000 (23:00 +0000)]
daily update
Kai Tietz [Tue, 20 Mar 2012 19:24:32 +0000 (19:24 +0000)]
PR ld/12742
* configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
* plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
Add windows.h header include if HAVE_WINDOWS_H is defined.
(dlerror): New static function if windows variant is used instead
of dlfcn.h.
(dlclose): Likewise.
(dlopen): Likewise.
(dlsym): Likewise.
* configure: Regenerated.
* config.in: Regenerated.
H.J. Lu [Tue, 20 Mar 2012 18:16:38 +0000 (18:16 +0000)]
Handle relocation against protected function for -Bsymbolic
bfd/
2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13880
* elf32-i386.c (elf_i386_relocate_section): Don't issue an error
for R_386_GOTOFF relocation against protected function if
SYMBOLIC_BIND is true.
* elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
error for R_X86_64_GOTOFF64 relocation against protected function
when building executable or SYMBOLIC_BIND is true.
ld/testsuite/
2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/13880
* ld-i386/i386.exp: Run protected4 and protected5.
* ld-x86-64/x86-64.exp: Likewise.
* ld-i386/protected4.d: New.
* ld-i386/protected4.s: Likewise.
* ld-i386/protected5.d: Likewise.
* ld-i386/protected5.s: Likewise.
* ld-x86-64/protected4.d: Likewise.
* ld-x86-64/protected4.s: Likewise.
* ld-x86-64/protected5.d: Likewise.
* ld-x86-64/protected5.s: Likewise.
Pedro Alves [Tue, 20 Mar 2012 18:14:16 +0000 (18:14 +0000)]
2012-03-20 Pedro Alves <palves@redhat.com>
* remote.c (remote_start_remote): Clear `rs->starting_up' on early
returns.
Nick Clifton [Tue, 20 Mar 2012 11:55:07 +0000 (11:55 +0000)]
* config/tc-arm.c (do_vmrs): Accept priviledged mode VFP system
registers.
(do_vmsr): Likewise.
(arm_opcode_insns): Do not default to using the FPSCR register in
the VMRS and VMSR registers.
* gas/arm/vfp1xD.s: Add tests of the VMSR ad VMRS instructions in
priviledged modes.
* gas/arm/vfp1xD.d: Update expected output.
Yao Qi [Tue, 20 Mar 2012 07:08:55 +0000 (07:08 +0000)]
gdb/
* amd64-tdep.c (amd64_displaced_step_copy_insn): Complete missing "}" in
comment.
gdbadmin [Tue, 20 Mar 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Doug Kwan [Mon, 19 Mar 2012 23:54:07 +0000 (23:54 +0000)]
2012-03-19 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::do_define_standard_symbols): New method.
(Target_arm::do_finalize_sections): Remove code which defines
__exidx_start and __exidx_end. Make symbol table parameter
anonymous as it is not used.
* gold.cc (queue_middle_tasks): Call target hook to define any
target-specific symbols.
* target.h (Target::define_standard_symbols): New method.
(Target::do_define_standard_symbols): Same.
* testsuite/Makefile.am (arm_exidx_test): Dump relocations also.
* testsuite/Makefile.in: Regenerate.
* testsuite/arm_exidx.s: Generate data relocations for __exidx_start
and __exidx_end.
* testsuite/arm_exidx_test.sh: Check that no unused dynamic
relocations are generated for __exidx_start and __exidx_end.
Alan Modra [Mon, 19 Mar 2012 23:00:05 +0000 (23:00 +0000)]
daily update
Jan Kratochvil [Mon, 19 Mar 2012 19:59:19 +0000 (19:59 +0000)]
gdb/
Code cleanupp: Use cu_offset and sect_offset compile time type checking.
* dwarf2expr.c (add_piece, dwarf_get_base_type, execute_stack_op)
(ctx_no_dwarf_call, ctx_no_get_base_type): Use cu_offset and
sect_offset.
* dwarf2expr.h (cu_offset, sect_offset): New types.
(struct dwarf_expr_context_funcs) <dwarf_call>
(struct dwarf_expr_context_funcs) <get_base_type>: Use cu_offset and
sect_offset.
(struct dwarf_expr_context) <len>: Improve the comment.
(struct dwarf_expr_piece, ctx_no_dwarf_call, ctx_no_get_base_type): Use
cu_offset and sect_offset.
* dwarf2loc.c (per_cu_dwarf_call, dwarf_expr_dwarf_call)
(dwarf_expr_get_base_type, needs_frame_dwarf_call)
(dwarf2_compile_expr_to_ax, disassemble_dwarf_expression): Likewise.
* dwarf2loc.h: Include dwarf2expr.h.
(dwarf2_fetch_die_location_block, dwarf2_get_die_type): Use cu_offset
and sect_offset.
* dwarf2read.c (struct dwarf2_per_objfile) <debug_types_type_hash>:
Improve the comment.
(struct comp_unit_head, struct dwarf2_cu, struct dwarf2_per_cu_data)
(struct signatured_type, struct line_header, struct partial_die_info)
(struct die_info, find_partial_die, dwarf2_get_ref_die_offset)
(lookup_signatured_type_at_offset, dwarf2_find_containing_comp_unit)
(get_die_type_at_offset, create_cus_from_index)
(create_signatured_type_table_from_index, dw2_get_file_names)
(offset_in_cu_p, read_comp_unit_head, error_check_comp_unit_head)
(read_and_check_comp_unit_head, read_and_check_type_unit_head)
(create_debug_types_hash_table, process_psymtab_comp_unit)
(load_partial_comp_unit, create_all_comp_units)
(partial_die_parent_scope, partial_die_full_name, skip_one_die)
(load_full_comp_unit, dwarf2_physname, read_import_statement)
(inherit_abstract_dies, read_func_scope, read_call_site_scope)
(dwarf2_add_member_fn, process_enumeration_scope, read_module_type)
(read_typedef, die_hash, die_eq, read_full_die, dwarf2_read_abbrevs)
(load_partial_dies, read_partial_die, find_partial_die_in_comp_unit)
(find_partial_die, read_attribute_value, lookup_die_type)
(dump_die_shallow, store_in_ref_table): Use cu_offset and sect_offset.
(is_ref_attr): New function comment.
(dwarf2_get_ref_die_offset): New function comment, new variable retval.
Use cu_offset and sect_offset.
(follow_die_offset, follow_die_ref, dwarf2_fetch_die_location_block)
(dwarf2_get_die_type, follow_die_sig, lookup_signatured_type_at_offset)
(load_full_type_unit, read_signatured_type, per_cu_header_read_in)
(dwarf2_find_containing_comp_unit, struct dwarf2_offset_and_type)
(offset_and_type_hash, offset_and_type_eq, set_die_type)
(get_die_type_at_offset, partial_die_hash, partial_die_eq)
(write_one_signatured_type, write_psymtabs_to_index): Use cu_offset and
sect_offset.
Jan Kratochvil [Mon, 19 Mar 2012 18:38:56 +0000 (18:38 +0000)]
gdb/testsuite/
* gdb.base/auxv.c (func2): setrlimit to infinity to enable core dumps.
* gdb.base/auxv.exp: Try to compile it with -DUSE_RLIMIT first.
(generate native core dump): Make the test unsupported if core cannot
be generated.
Jan Kratochvil [Mon, 19 Mar 2012 18:23:52 +0000 (18:23 +0000)]
gdb/
Code cleanup.
* python/py-auto-load.c (source_section_scripts): New variable back_to.
Turn fclose and xfree calls into make_cleanup_fclose and make_cleanup
with xfree.
(auto_load_objfile_script): Turn fclose into make_cleanup_fclose.
Jan Kratochvil [Mon, 19 Mar 2012 18:19:26 +0000 (18:19 +0000)]
gdb/
* NEWS: Describe new options --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
* main.c (struct cmdarg): New enum items CMDARG_INIT_FILE and
CMDARG_INIT_COMMAND.
(captured_main): New enum items OPT_IX and OPT_IEX. Add
"init-command", "init-eval-command", "ix" and "iex" to the variable
long_options. Handle OPT_IX and OPT_IEX. Process them from CMDARG_VEC.
New comment for CMDARG_FILE and CMDARG_COMMAND processing.
(print_gdb_help): Describe --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
gdb/doc/
* gdb.texinfo (File Options): Describe --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
(Startup): Describe -iex and -ix. Simplify the example
for "set auto-load-scripts off".
gdb/testsuite/
* gdb.gdb/selftest.exp (do_steps_and_nexts): New entry
for cmdarg_vec = NULL. Remove entries for cmdsize = 1, cmdarg = and
ncmd = 0. New entry for VEC_cleanup cmdarg_s.
Jan Kratochvil [Mon, 19 Mar 2012 18:16:18 +0000 (18:16 +0000)]
gdb/
Code cleanup.
* main.c (struct cmdarg): Move it here from main. Add more comments.
(cmdarg_s, VEC (cmdarg_s)): New.
(main): Move struct cmdarg from here. New variables cmdarg_vec and
cmdarg_p. Remove variables cmdsize and ncmd and their initialization.
Install cleanup for cmdarg_vec. Update filling for options 'x' and
'X'. Replace cmdarg processing by cmdarg_vec processing. Remove xfree
of CMDARG.
Tom Tromey [Mon, 19 Mar 2012 18:13:43 +0000 (18:13 +0000)]
* gnu-v3-abi.c (gnuv3_print_vtable): Initialize 'result_vec'.
Andreas Schwab [Mon, 19 Mar 2012 15:07:59 +0000 (15:07 +0000)]
* ld-m68k/m68k.exp ("TLS indirect symbol use"): Pass
--copy-dt-needed-entries.
Pedro Alves [Mon, 19 Mar 2012 14:33:35 +0000 (14:33 +0000)]
2012-03-19 Pedro Alves <palves@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
* server.c (cont_thread, general_thread): Add describing comments.
(start_inferior): Clear `cont_thread'.
(handle_v_cont): Don't set `cont_thread' if resuming all threads
of a process.