Joel Brobecker [Wed, 14 Dec 2011 14:34:59 +0000 (14:34 +0000)]
Make decode_line_internal static.
gdb/ChangeLog:
* linespec.c (decode_line_internal): Make static.
Nick Clifton [Wed, 14 Dec 2011 14:10:57 +0000 (14:10 +0000)]
* config/tc-cris.c (md_convert_frag): Mark the length_code local
variable as unused as it is only used when ENABLE_CHECKING is on.
Tristan Gingold [Wed, 14 Dec 2011 13:27:34 +0000 (13:27 +0000)]
2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* gas/mach-o: New.
* gas/mach-o/mach-o.exp: New.
* gas/mach-o/warn-1.s: New.
* gas/mach-o/lcomm-1.s: New.
* gas/mach-o/lcomm-1.d: New.
Nick Clifton [Wed, 14 Dec 2011 11:50:13 +0000 (11:50 +0000)]
PR ld/12451
* elfcode.h (elf_checksum_contents): Read in the section's
contents if they are not already available.
* compress.c (bfd_get_full_section_contents): Use zmalloc to
allocate the buffers so that excess bytes are guaranteed to be
zero.
Tristan Gingold [Wed, 14 Dec 2011 10:30:09 +0000 (10:30 +0000)]
bfd/
2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* mach-o-i386.c (text_section_names_xlat): New table.
(data_section_names_xlat): Likewise.
(import_section_names_xlat): Likewise.
(mach_o_i386_segsec_names_xlat): Likewise.
(bfd_mach_o_tgt_seg_table): Use new tables.
* mach-o-x86-64.c (bfd_mach_o_tgt_seg_table): Set NULL.
* mach-o.c (mach_o_section_name_xlat, mach_o_segment_name_xlat):
Move to mach-o.h as typedefs.
(text_section_names_xlat): Update for current GCC usage.
(data_section_names_xlat): Likewise.
(dwarf_section_names_xlat): Likewise.
(objc_section_names_xlat): New table.
(segsec_names_xlat): Add objc table.
(bfd_mach_o_normalize_section_name): Replace with...
(bfd_mach_o_section_data_for_mach_sect): New.
(bfd_mach_o_section_data_for_bfd_name): New.
(bfd_mach_o_section_data_for_bfd_name): Update to use additional data.
(bfd_mach_o_convert_section_name_to_mach_o): Likewise.
(bfd_mach_o_bfd_copy_private_section_data): Implement.
(bfd_mach_o_write_symtab): Write a zero-length string as the first entry
for compatibility with system tools.
(bfd_mach_o_build_commands): Update section alignment info.
(bfd_mach_o_new_section_hook): Use translation table data to define
default section flags, type, attributes and alignment, when available.
(bfd_mach_o_init_section_from_mach_o): Add TODO comment.
(bfd_mach_o_section_type_name): Add 'symbol_stubs'.
(bfd_mach_o_section_attribute_name): Add 'self_modifying_code'.
(bfd_mach_o_get_section_type_from_name): Change "not-found" return
value.
(bfd_mach_o_tgt_seg_table): Set default NULL.
* mach-o.h (bfd_mach_o_segment_command): Use define for name length.
(bfd_mach_o_backend_data): Move until after contents are defined.
(bfd_mach_o_normalize_section_name): Remove.
(bfd_mach_o_convert_section_name_to_bfd): Declare.
(mach_o_section_name_xlat): Declare.
(mach_o_segment_name_xlat): Declare.
(bfd_mach_o_section_data_for_mach_sect): Declare.
(bfd_mach_o_section_data_for_bfd_name): Declare.
include/
2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* mach-o/loader.h (bfd_mach_o_section_type): define
BFD_MACH_O_S_ATTR_NONE to 0.
gas/
2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
* config/obj-macho.c: Add some more top-level comments.
(collect_16char_name): New.
(obj_mach_o_section): Amend to allow syntax compatible with existing system
tools. Use section translation data when available.
(obj_mach_o_segT_from_bfd_name): New.
(known_sections): Update.
(obj_mach_o_known_section): Use obj_mach_o_segT_from_bfd_name.
(objc_sections): New.
(obj_mach_o_objc_section): New.
(debug_sections): New.
(obj_mach_o_debug_section): New.
(tgt_sections): New.
(obj_mach_o_opt_tgt_section): New.
(obj_mach_o_base_section): New.
(obj_mach_o_common_parse): Update to create BSS on demand and to handle
lcomm optional alignment param.
(obj_mach_o_comm): Update parameter name.
(obj_mach_o_placeholder): New.
(mach_o_pseudo_table): Update for GCC section directives.
* config/obj-macho.h (_OBJ_MACH_O_H): New.
(USE_ALIGN_PTWO): Define.
(S_SET_ALIGN) Define.
Yao Qi [Wed, 14 Dec 2011 07:56:59 +0000 (07:56 +0000)]
gdb/
* breakpoint.c (create_breakpoint): Set canonical.addr_string
for static tracepoint.
Yao Qi [Wed, 14 Dec 2011 07:47:15 +0000 (07:47 +0000)]
gdb/gdbserver/
* tracepoint.c (gdb_ust_thread): Don't ignore return value
of write.
Yao Qi [Wed, 14 Dec 2011 07:41:06 +0000 (07:41 +0000)]
2011-12-14 Yao Qi <yao@codesourcery.com>
* i386-low.c (i386_low_stopped_data_address): Initialize local
variable `control'.
gdbadmin [Wed, 14 Dec 2011 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Tue, 13 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update
Pedro Alves [Tue, 13 Dec 2011 17:22:11 +0000 (17:22 +0000)]
gdb/doc/
2011-12-13 Pedro Alves <pedro@codesourcery.com>
* gdb.texinfo (Implementing a Remote Stub): Explain that you
should transfer control to the stub in the startup code instead of
in main. Mention the need to get past the initial breakpoint.
gdb/testsuite/
2011-12-13 Pedro Alves <pedro@codesourcery.com>
Doug Evans <dje@google.com>
* lib/gdb.exp (gdb_run_cmd, runto_main, gdb_compile)
(clean_restart): Remove references to the gdb_stub target board
variable.
(gdb_step_for_stub): Delete.
* gdb.base/annota1.exp: Remove all references to [target_info
exists gdb_stub], gdb_step_for_stub and usestubs.
* gdb.base/annota3.exp: Ditto.
* gdb.base/async.exp: Ditto.
* gdb.base/break.exp: Ditto.
* gdb.base/code-expr.exp: Ditto.
* gdb.base/commands.exp: Ditto.
* gdb.base/completion.exp: Ditto.
* gdb.base/condbreak.exp: Ditto.
* gdb.base/consecutive.exp: Ditto.
* gdb.base/cvexpr.exp: Ditto.
* gdb.base/define.exp: Ditto.
* gdb.base/display.exp: Ditto.
* gdb.base/ena-dis-br.exp: Ditto.
* gdb.base/environ.exp: Ditto.
* gdb.base/gnu-ifunc.exp: Ditto.
* gdb.base/maint.exp: Ditto.
* gdb.base/pending.exp: Ditto.
* gdb.base/sect-cmd.exp: Ditto.
* gdb.base/sepdebug.exp: Ditto.
* gdb.base/unload.exp: Ditto.
* gdb.base/watchpoint-solib.exp: Ditto.
* gdb.cp/annota2.exp: Ditto.
* gdb.cp/annota3.exp: Ditto.
* gdb.dwarf2/dw2-inline-param.exp: Ditto.
* gdb.hp/gdb.compat/xdb1.exp: Ditto.
* gdb.mi/mi-pending.exp: Ditto.
* gdb.trace/circ.exp: Ditto.
* gdb.cp/ovldbreak.exp: Ditto. Adjust expected line numbers.
* gdb.base/list.exp: Ditto.
* gdb.base/all-types.c: Remove all calls to set_debug_traps and
breakpoint function and all references to the usestubs macro.
* gdb.base/exprs.c: Ditto.
* gdb.base/freebpcmd.c: Ditto.
* gdb.base/bitfields.c: Ditto.
* gdb.base/bitfields2.c: Ditto.
* gdb.base/break.c: Ditto.
* gdb.base/call-sc.c: Ditto.
* gdb.base/call-signals.c: Ditto.
* gdb.base/callfuncs.c: Ditto.
* gdb.base/charset.c: Ditto.
* gdb.base/consecutive.c: Ditto.
* gdb.base/constvars.c: Ditto.
* gdb.base/funcargs.c: Ditto.
* gdb.base/int-type.c: Ditto.
* gdb.base/interrupt.c: Ditto.
* gdb.base/langs0.c: Ditto.
* gdb.base/list0.c: Ditto.
* gdb.base/mips_pro.c: Ditto.
* gdb.base/miscexprs.c: Ditto.
* gdb.base/nodebug.c: Ditto.
* gdb.base/opaque0.c: Ditto.
* gdb.base/pointers.c: Ditto.
* gdb.base/printcmds.c: Ditto.
* gdb.base/ptype.c: Ditto.
* gdb.base/recurse.c: Ditto.
* gdb.base/reread1.c: Ditto.
* gdb.base/reread2.c: Ditto.
* gdb.base/restore.c: Ditto.
* gdb.base/return.c: Ditto.
* gdb.base/run.c: Ditto.
* gdb.base/scope0.c: Ditto.
* gdb.base/sepdebug.c: Ditto.
* gdb.base/setshow.c: Ditto.
* gdb.base/setvar.c: Ditto.
* gdb.base/sigall.c: Ditto.
* gdb.base/signals.c: Ditto.
* gdb.base/structs.c: Ditto.
* gdb.base/structs2.c: Ditto.
* gdb.base/testenv.c: Ditto.
* gdb.base/twice.c: Ditto.
* gdb.base/unwindonsignal.c: Ditto.
* gdb.base/watchpoint.c: Ditto.
* gdb.base/watchpoints.c: Ditto.
* gdb.base/whatis.c: Ditto.
* gdb.cp/classes.cc: Ditto.
* gdb.cp/cplusfuncs.cc: Ditto.
* gdb.cp/derivation.cc: Ditto.
* gdb.cp/formatted-ref.cc: Ditto.
* gdb.cp/misc.cc: Ditto.
* gdb.cp/overload.cc: Ditto.
* gdb.cp/ovldbreak.cc: Ditto.
* gdb.cp/ref-params.cc: Ditto.
* gdb.cp/ref-types.cc: Ditto.
* gdb.cp/templates.cc: Ditto.
* gdb.cp/virtfunc.cc: Ditto.
* gdb.hp/gdb.aCC/run.c: Ditto.
* gdb.hp/gdb.base-hp/callfwmall.c: Ditto.
* gdb.hp/gdb.compat/xdb0.c: Ditto.
* gdb.reverse/consecutive-reverse.c: Ditto.
* gdb.reverse/sigall-reverse.c: Ditto.
* gdb.reverse/until-reverse.c: Ditto.
* gdb.reverse/watch-reverse.c: Ditto.
* gdb.trace/actions.c: Ditto.
* gdb.trace/circ.c: Ditto.
* gdb.trace/collection.c: Ditto.
Pedro Alves [Tue, 13 Dec 2011 16:11:26 +0000 (16:11 +0000)]
2011-12-13 Pedro Alves <pedro@codesourcery.com>
PR remote/13492
* i386-low.c (i386_low_stopped_data_address): Avoid fetching
DR_CONTROL unless necessary. Extend comments.
* linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
Pedro Alves [Tue, 13 Dec 2011 16:05:24 +0000 (16:05 +0000)]
2011-12-13 Pedro Alves <pedro@codesourcery.com>
* gdb.base/watchpoint.c (struct foo2, foo2, struct foo4, foo4)
(func6, func7): New.
(main): Call func6 and func7.
* gdb.base/watchpoint.exp (test_wide_location_1)
(test_wide_location_2): New.
(top level): Re-enable hardware watchpoints if necessary. Call
test_wide_location_1 and test_wide_location_2.
Tristan Gingold [Tue, 13 Dec 2011 14:02:20 +0000 (14:02 +0000)]
2011-12-13 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
* dwarf2.c (bfd_dwarf2_cleanup_debug_info): Accept stash as an
argument like other functions to support formats other than ELF.
* elf-bfd.h (bfd_dwarf2_cleanup_debug_info): Move to bfd-in.h.
* elf.c (_bfd_elf_close_and_cleanup): Pass dwarf2_find_line_info
in tdata as a parameter.
* libbfd-in.h (bfd_dwarf2_cleanup_debug_info): Move from
elf-bfd.h.
* libbfd.h (bfd_dwarf2_cleanup_debug_info): Regenerate.
* mach-o-target.c (bfd_mach_o_close_and_cleanup): Remove the
fallback macro.
(bfd_mach_o_find_nearest_line): Likewise.
* mach-o.c (bfd_mach_o_find_nearest_line): Add the definition
which calls _bfd_dwarf2_find_nearest_line.
(bfd_mach_o_close_and_cleanup): Likewise.
* mach-o.h (mach_o_data_struct): Add dwarf2_find_line_info.
(bfd_mach_o_find_nearest_line): Add declaration.
(bfd_mach_o_close_and_cleanup): Add declaration.
Joel Brobecker [Tue, 13 Dec 2011 13:36:38 +0000 (13:36 +0000)]
Create new section in NEWS for next release branch
gdb/ChangeLog:
* NEWS: Create a new section for the next release branch.
Rename the section of the current branch, now that it has
been cut.
Nick Clifton [Tue, 13 Dec 2011 13:33:21 +0000 (13:33 +0000)]
* po/it.po: New Italian translation.
* configure.in (ALL_LINGUAS): Add it.
* configure: Regenerate.
gdbadmin [Tue, 13 Dec 2011 13:06:15 +0000 (13:06 +0000)]
Record GDB 7.4 branch creation. Bump version number to 7.4.50.
20111213-cvs.
Nick Clifton [Tue, 13 Dec 2011 12:56:33 +0000 (12:56 +0000)]
* doc/internals.texi (TC_FORCE_RELOCATION_SUB_SAME): Update
to match code.
Tristan Gingold [Tue, 13 Dec 2011 10:00:40 +0000 (10:00 +0000)]
Missing file from my previous commit.
Tristan Gingold [Tue, 13 Dec 2011 09:13:15 +0000 (09:13 +0000)]
bfd/
2011-12-13 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_read_symtab_symbols): Make global. Remove
prototype.
(bfd_mach_o_section_get_entry_size): Make global.
(bfd_mach_o_section_get_nbr_indirect): Likewise.
(bfd_mach_o_read_symtab_strtab): Likewise.
(struct bfd_mach_o_xlat_name): Move to mach-o.h
(bfd_mach_o_print_flags): Move to binutils/od-macho.c
(bfd_mach_o_get_name_of_null, bfd_mach_o_get_name): Likewise.
(bfd_mach_o_cpu_name, bfd_mach_o_filetype_name): Likewise.
(bfd_mach_o_header_flags_name): Likewise.
(bfd_mach_o_load_command_name): Likewise.
(bfd_mach_o_print_private_header): Likewise.
(bfd_mach_o_print_section_map, bfd_mach_o_print_section): Likwise.
(bfd_mach_o_print_segment, bfd_mach_o_print_dysymtab): Likewise.
(bfd_mach_o_print_dyld_info): Likewise.
(bfd_mach_o_print_private_bfd_data): Remove.
(bfd_mach_o_type_name): Make global.
(bfd_mach_o_section_attribute_name): Likewise.
* mach-o.h (bfd_mach_o_xlat_name): Added.
(bfd_mach_o_section_get_nbr_indirect)
(bfd_mach_o_section_get_entry_size)
(bfd_mach_o_read_symtab_symbols)
(bfd_mach_o_read_symtab_strtab)
(bfd_mach_o_section_attribute_name)
(bfd_mach_o_section_type_name): Likewise.
* mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data): Define.
binutils/
2011-12-13 Tristan Gingold <gingold@adacore.com>
* od-macho.c: New file.
* objdump.h (objdump_private_desc_mach_o): Add.
* configure.in: Add Mach-O od_vectors.
* Makefile.am (CFILES): Add od-macho.c
* configure: Regenerate.
* Makefile.in: Regenerate.
Alan Modra [Tue, 13 Dec 2011 08:19:02 +0000 (08:19 +0000)]
* ppc-opc.c (ISA_V2): Define and use for relevant BO field tests.
(valid_bo_pre_v2, valid_bo_post_v2): New functions, extracted from..
(valid_bo): ..here. When disassembling, accept either 'y' or 'at'
type encoding on second pass.
(powerpc_opcodes): Use ISA_V2 to enable branch insns rather than
POWER4.
* ppc-dis.c (print_insn_powerpc): Delete dialect_orig. Instead
ignore deprecated on second pass.
Chung-Lin Tang [Tue, 13 Dec 2011 06:22:01 +0000 (06:22 +0000)]
2011-12-13 Chung-Lin Tang <cltang@codesourcery.com>
* elfxx-mips.c (mips_elf_calculate_relocation): Correct
R_MIPS16_HI16/R_MIPS16_LO16 handling of two cleared lower bits,
update comments.
Yao Qi [Tue, 13 Dec 2011 01:26:56 +0000 (01:26 +0000)]
2011-12-13 Yao Qi <yao@codesourcery.com>
* tracepoint.c (trace_buffer_alloc): Replace magic numbers with
macros.
(upload_fast_traceframes, upload_fast_traceframes): Likewise.
gdbadmin [Tue, 13 Dec 2011 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Mon, 12 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update
Tristan Gingold [Mon, 12 Dec 2011 13:45:47 +0000 (13:45 +0000)]
2011-12-12 Iain Sandoe <iains@gcc.gnu.org>
* mach-o.c (bfd_mach_o_read_section_32): Null-terminate sectname.
(bfd_mach_o_read_section_64): Likewise.
Yao Qi [Mon, 12 Dec 2011 02:11:45 +0000 (02:11 +0000)]
2011-12-11 Yao Qi <yao@codesourcery.com>
* gdb.trace/status-stop.exp: Skip it if target doesn't support trace.
gdbadmin [Mon, 12 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 11 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update
Joel Brobecker [Sun, 11 Dec 2011 17:38:17 +0000 (17:38 +0000)]
[Ada] improve message when cannot insert Ada exception catchpoint.
gdb/ChangeLog:
* ada-lang.c (ada_exception_support_info_sniffer): Improve
error message.
Joel Brobecker [Sun, 11 Dec 2011 17:37:56 +0000 (17:37 +0000)]
[Ada] Make the exception_support_info data per inferior.
The ada-lang module was using a static global called "exception_info"
for all inferiors. But each inferior might be different, and thus
this patch makes this data per-inferior.
gdb/ChangeLog:
* ada-lang.c (struct ada_inferior_data) [exception_info]:
New field.
(exception_info): Delete.
(ada_exception_support_info_sniffer): Get exception_support_info
data from our per-inferior data. Adjust code accordingly.
(ada_unhandled_exception_name_addr_from_raise): Likewise.
(ada_exception_name_addr_1, ada_exception_sym_name): Ditto.
(ada_executable_changed_observer): Delete.
(_initialize_ada_language): Remove call to
observer_attach_executable_changed.
Joel Brobecker [Sun, 11 Dec 2011 17:36:10 +0000 (17:36 +0000)]
Warn if missing debug info for Ada exception catchpoints
This patch should help the user understand why the debugger is not
able to insert Ada exception catchpoints when the Ada runtime was
stripped of debugging info, as is often the case on many GNU/Linux
distros:
(gdb) catch exception
Your Ada runtime appears to be missing some debugging information.
Cannot insert Ada exception catchpoint in this configuration.
gdb/ChangeLog:
* ada-lang.c (ada_has_this_exception_support): Raise an error
if we could find the Ada exception hook in the Ada runtime,
but no debugging info for that hook.
gdb/testsuite/ChangeLog:
* gdb.ada/catch_ex.exp, gdb.ada/mi_catch_ex.exp: Adjust
expected output for unsupported case.
Joel Brobecker [Sun, 11 Dec 2011 17:35:34 +0000 (17:35 +0000)]
Ada exception catchpoint support cleanup.
This patch cleans up a bit the way we detect which type of runtime
the program uses with respect to Ada exceptions. It also removes
an unnecessary check in ada_exception_sal which is already performed
by ada_exception_support_info_sniffer.
Some of the changes are preparation work for detecting the situation
where the Ada runtime is found, but lacking debugging info.
gdb/ChangeLog:
* ada-lang.c (ada_has_this_exception_support): New function,
extracted out of ada_exception_sal and ada_exception_sal.
(ada_exception_support_info_sniffer): Simplify by using
ada_has_this_exception_support.
(ada_exception_sal): Replace unnecessary checks by assertions.
Minor simplifications.
Dave Anglin [Sun, 11 Dec 2011 15:42:10 +0000 (15:42 +0000)]
PR binutils/13476
* elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to
R_PARISC_DPREL21L when not doing a shared link. Likewise convert
R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to
R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L
and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L.
Andrey Smirnov [Sun, 11 Dec 2011 03:04:45 +0000 (03:04 +0000)]
* breakpoint.c (update_global_location_list): Remove nested
definition of `b'(-Wshadow).
Andrey Smirnov [Sun, 11 Dec 2011 02:53:28 +0000 (02:53 +0000)]
* breakpoint.c (insert_breakpoint_locations): Rename `error' to
`error_flag'(-Wshadow).
Andrey Smirnov [Sun, 11 Dec 2011 02:46:54 +0000 (02:46 +0000)]
* bfd-target.c (target_bfd_reopen): Rename `bfd' to
`abfd'(-Wshadow).
Andrey Smirnov [Sun, 11 Dec 2011 02:44:15 +0000 (02:44 +0000)]
* annotate.c (annotate_array_section_begin): Rename `index' to
`idx'(-Wshadow).
Andrey Smirnov [Sun, 11 Dec 2011 02:41:31 +0000 (02:41 +0000)]
* amd64-tdep.c (amd64_get_unused_input_int_reg): Rename `index' to
`idx'(-Wshadow).
Andrey Smirnov [Sun, 11 Dec 2011 02:34:26 +0000 (02:34 +0000)]
* amd64-linux-tdep.c (amd64_canonicalize_syscall): Rename
`syscall' to `syscall_number'(-Wshadow).
Andrey Smirnov [Sun, 11 Dec 2011 02:31:04 +0000 (02:31 +0000)]
* ada-lang.c (remove_extra_symbols): Rename `remove' to
`remove_p'(-Wshadow).
Andrey Smirnov [Sun, 11 Dec 2011 02:27:24 +0000 (02:27 +0000)]
* ada-exp.y (write_var_or_type): Rename nested `renaming' to
`ren_sym'(-Wshadow).
David Daney [Sun, 11 Dec 2011 02:05:40 +0000 (02:05 +0000)]
2011-12-10 David Daney <david.daney@cavium.com>
* elfxx-mips.c (mips_elf_link_hash_table.rld_value): Remove.
(mips_elf_link_hash_table.rld_symbol): New field;
(MIPS_ELF_RLD_MAP_SIZE): New macro.
(_bfd_mips_elf_add_symbol_hook): Remember __rld_obj_head symbol
in rld_symbol.
(_bfd_mips_elf_create_dynamic_sections): Remember __rld_map symbol
in rld_symbol.
(_bfd_mips_elf_size_dynamic_sections): Set correct size for .rld_map.
(_bfd_mips_elf_finish_dynamic_symbol): Remove .rld_map handling.
(_bfd_mips_elf_finish_dynamic_sections): Use rld_symbol to
calculate DT_MIPS_RLD_MAP value.
(_bfd_mips_elf_link_hash_table_create): Initialize rld_symbol,
quit initializing rld_value.
David Daney [Sun, 11 Dec 2011 01:43:07 +0000 (01:43 +0000)]
2011-12-10 David Daney <david.daney@cavium.com>
* ld-mips-elf/pic-and-nonpic-6-n64.dd: Use correct encoding for
64-bit MOVE instruction.
gdbadmin [Sun, 11 Dec 2011 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Doug Evans [Sat, 10 Dec 2011 23:57:40 +0000 (23:57 +0000)]
* dwarf2read.c (dwarf2_per_cu_data): Rename debug_type_section to
debug_types_section. All uses updated.
(partial_read_comp_unit_head): Rename parameter is_debug_type_section
to is_debug_types_section.
Jan Kratochvil [Sat, 10 Dec 2011 23:05:08 +0000 (23:05 +0000)]
gdb/testsuite/
PR testsuite/12649
* gdb.trace/ftrace.exp (test_fast_tracepoints): Import gdb_prompt.
Protect gdb_test_multiple by final $gdb_prompt match.
Alan Modra [Sat, 10 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update
Doug Evans [Sat, 10 Dec 2011 22:51:47 +0000 (22:51 +0000)]
* python/py-auto-load.c (source_section_scripts): Call xfree
instead of free.
Jan Kratochvil [Sat, 10 Dec 2011 15:58:14 +0000 (15:58 +0000)]
gdb/testsuite/
* gdb.cp/static-method.exp (have_gcc_45682_fixed, info addr A::func()):
New variable, new test.
(list static-method.cc:xxx::(anonymous namespace)::A::func)
(list 'static-method.cc:xxx::(anonymous namespace)::A::func')
(list 'static-method.cc':'xxx::(anonymous namespace)::A::func')
(list static-method.cc:'xxx::(anonymous namespace)::A::func'): KFAIL
them if HAVE_GCC_45682_FIXED is not set.
Yao Qi [Sat, 10 Dec 2011 15:16:35 +0000 (15:16 +0000)]
2011-12-10 Hui Zhu <teawater@gmail.com>
Yao Qi <yao@codesourcery.com>
* tracepoint.c (start_tracing): Clear `inserted' flag.
2011-12-10 Yao Qi <yao@codesourcery.com>
* gdb.trace/status-stop.exp: New.
* gdb.trace/status-stop.c: New.
Hui Zhu [Sat, 10 Dec 2011 09:41:19 +0000 (09:41 +0000)]
2011-12-10 Hui Zhu <teawater@gmail.com>
* tracepoint.c (create_tsv_from_upload): Change sprintf to xstrprintf.
David Daney [Sat, 10 Dec 2011 05:54:45 +0000 (05:54 +0000)]
2011-12-09 David Daney <david.daney@cavium.com>
* ld-mips-elf/tls-multi-got-1.r: Add "0x" to match value for
MIPS_BASE_ADDRESS.
* ld-mips-elf/textrel-1.d: Same.
* ld-mips-elf/multi-got-1.d: Same.
Andrey Smirnov [Sat, 10 Dec 2011 00:22:56 +0000 (00:22 +0000)]
* breakpoint.c (bp_loc_is_permanent): Rename `brk' to
`bpoint'(-Wshadow).
Andrey Smirnov [Sat, 10 Dec 2011 00:15:54 +0000 (00:15 +0000)]
* breakpoint.c (update_static_tracepoint): Rename nested `sal' and
`marker' variables to `sal2' and `tpmarker' respectively
(-Wshadow).
gdbadmin [Sat, 10 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 9 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update
Andrew Pinski [Fri, 9 Dec 2011 19:22:31 +0000 (19:22 +0000)]
2011-12-09 Andrew Pinski <apinski@cavium.com>
* linespec.c (hash_address_entry): Use iterative_hash_object on each
field rather than the struct itself.
Tom Tromey [Fri, 9 Dec 2011 18:40:46 +0000 (18:40 +0000)]
* breakpoint.c (compare_breakpoints): New function.
(clear_command): Remove duplicate breakpoints. Properly clean
up.
Jan Kratochvil [Fri, 9 Dec 2011 17:36:02 +0000 (17:36 +0000)]
gdb/testsuite/
* gdb.reverse/until-precsave.exp (run to end of main) Extend the
timeout.
gdbadmin [Fri, 9 Dec 2011 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 8 Dec 2011 23:00:06 +0000 (23:00 +0000)]
daily update
Andrew Pinski [Thu, 8 Dec 2011 20:52:42 +0000 (20:52 +0000)]
opcodes:
2011-12-08 Andrew Pinski <apinski@cavium.com>
* mips-opc.c (mips_builtin_opcodes): Add "pause".
gas/testsuite:
2011-12-08 Andrew Pinski <apinski@cavium.com>
* gas/mips/mips32-mt.d: Add pause instruction encoding to the end.
* gas/mips/micromips@mips32r2.d: Likewise.
* gas/mips/mips32r2.d: Likewise.
* gas/mips/mips32-mt.s: Add pause instruction to the end.
* gas/mips/mips32r2.s: Likewise.
Andrew Pinski [Thu, 8 Dec 2011 20:47:27 +0000 (20:47 +0000)]
bfd:
2011-12-08 Andrew Pinski <apinski@cavium.com>
Adam Nemet <anemet@caviumnetworks.com>
* archures.c (bfd_mach_mips_octeon2): New macro
* bfd-in2.h: Regenerate.
* cpu-mips.c (I_mipsocteon2): New enum value.
(arch_info_struct): Add bfd_mach_mips_octeon2.
* elfxx-mips.c (_bfd_elf_mips_mach): Support E_MIPS_MACH_OCTEON2.
(mips_set_isa_flags): Add bfd_mach_mips_octeon2.
(mips_mach_extensions): Add bfd_mach_mips_octeon2.
gas:
2011-12-08 Andrew Pinski <apinski@cavium.com>
Adam Nemet <anemet@caviumnetworks.com>
* tc-mips.c (CPU_IS_OCTEON): Add Octeon2.
(mips_cpu_info_table): Add Octeon2.
* doc/c-mips.texi: Document octeon2 as an acceptable value for -march=.
gas/testsuite:
2011-12-08 Andrew Pinski <apinski@cavium.com>
Adam Nemet <anemet@caviumnetworks.com>
* gas/mips/mips.exp: Add Octeon2 for an architecture.
Run octeon2 test.
* gas/mips/octeon2.d: New file.
* gas/mips/octeon2.s: New file.
include/opcode:
2011-12-08 Andrew Pinski <apinski@cavium.com>
Adam Nemet <anemet@caviumnetworks.com>
* mips.h (INSN_CHIP_MASK): Update according to INSN_OCTEON2.
(INSN_OCTEON2): New macro.
(CPU_OCTEON2): New macro.
(OPCODE_IS_MEMBER): Add Octeon2.
opcodes:
2011-12-08 Andrew Pinski <apinski@cavium.com>
Adam Nemet <anemet@caviumnetworks.com>
* mips-dis.c (mips_arch_choices): Add Octeon2.
For "octeon+", just include OcteonP for the insn.
* mips-opc.c (IOCT): Include Octeon2.
(IOCTP): Include Octeon2.
(IOCT2): New macro.
(mips_builtin_opcodes): Add "laa", "laad", "lac", "lacd", "lad",
"ladd", "lai", "laid", "las", "lasd", "law", "lawd".
Move "lbux", "ldx", "lhx", "lwx", and "lwux" up to where the standard
loads are, and add IOCT2 to them.
Add "lbx" and "lhux".
Add "qmac.00", "qmac.01", "qmac.02", "qmac.03", "qmacs.00",
"qmacs.01", "qmacs.01", "qmacs.02" and "qmacs.03".
Add "zcb" and "zcbt".
Maciej W. Rozycki [Thu, 8 Dec 2011 19:03:24 +0000 (19:03 +0000)]
* mips-tdep.c (mips_skip_mips16_trampoline_code): Sign-extend
address chunks retrieved from decoded lui/addiu pairs.
Maciej W. Rozycki [Thu, 8 Dec 2011 18:55:48 +0000 (18:55 +0000)]
* mips-tdep.c (extended_offset): Correct calculation.
(unpack_mips16): Correct bitfield positions used for extraction
of the immediate argument; fix sign-extension of same.
(extended_mips16_next_pc): Correct B instruction's offset
calculation. Correct register decoding of the BEQZ and BNEZ
as well as jump-register instructions. Handle compact jumps.
Tom Tromey [Thu, 8 Dec 2011 18:08:12 +0000 (18:08 +0000)]
* objfiles.h (struct objfile): Remove obsolete comment.
* objfiles.c (build_objfile_section_table): Remove obsolete
comment.
Tom Tromey [Thu, 8 Dec 2011 15:31:20 +0000 (15:31 +0000)]
* gdb.cp/ovsrch.exp (test_class): Correctly use "a_param" in
condition.
Jan Kratochvil [Thu, 8 Dec 2011 10:28:58 +0000 (10:28 +0000)]
gdb/gdbserver/
* linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
Print new debug message for such case.
Stan Shebs [Thu, 8 Dec 2011 01:15:36 +0000 (01:15 +0000)]
* MAINTAINERS (Responsible Maintainers): Add Yao Qi as
maintainer of the tic6x target.
gdbadmin [Thu, 8 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Wed, 7 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update
Maciej W. Rozycki [Wed, 7 Dec 2011 21:45:12 +0000 (21:45 +0000)]
Fix ChangeLog typo.
Stan Shebs [Wed, 7 Dec 2011 21:24:05 +0000 (21:24 +0000)]
* gdb.trace/tfind.exp: Update for output changes.
Ulrich Weigand [Wed, 7 Dec 2011 20:53:08 +0000 (20:53 +0000)]
* arm-tdep.h (arm_deal_with_atomic_sequence): Add prototype.
* arm-tdep.c (thumb_deal_with_atomic_sequence_raw): New function.
(arm_deal_with_atomic_sequence_raw): Likewise.
(arm_deal_with_atomic_sequence): Likewise.
(arm_software_single_step): Call it.
* arm-linux-tdep.c (arm_linux_software_single_step): Likewise.
Matthew Gretton-Dann [Wed, 7 Dec 2011 16:58:35 +0000 (16:58 +0000)]
2011-12-07 Sameera Deshpande <sameera.deshpande@arm.com>
* gas/config/tc-arm.c (do_t_ldstd): Warn for unpredictable cases.
* gas/testsuite/gas/arm/thumb2_ldstd_unpredictable.d: New testcase.
* gas/testsuite/gas/arm/thumb2_ldstd_unpredictable.l: Likewise.
* gas/testsuite/gas/arm/thumb2_ldstd_unpredictable.s: Likewise.
* gas/testsuite/gas/testsuite/gas/arm/sp-pc-validations-bad-t.l: Update
testcase.
* gas/testsuite/gas/testsuite/gas/arm/sp-pc-validations-bad-t.s: Likewise.
Matthew Gretton-Dann [Wed, 7 Dec 2011 16:46:35 +0000 (16:46 +0000)]
* gas/config/tc-arm.c (ARM_IT_MAX_OPERANDS): New define.
(arm_it): Use ARM_IT_MAX_OPERANDS.
(neon_select_shape): Ensure we have matched all operands.
* gas/testsuite/gas/arm/neon-suffix-bad.l: Add testcase.
* gas/testsuite/gas/arm/neon-suffix-bad.s: Likewise.
Matthew Gretton-Dann [Wed, 7 Dec 2011 16:44:55 +0000 (16:44 +0000)]
* gas/config/tc-arm.c (parse_neon_mov): Update which_operand
correctly.
Pedro Alves [Wed, 7 Dec 2011 15:00:34 +0000 (15:00 +0000)]
2011-12-07 Pedro Alves <pedro@codesourcery.com>
* gdb.ada/catch_ex.exp: Skip as unsupported if "catch exception"
throws "Cannot insert catchpoints in this configuration".
* gdb.ada/mi_catch_ex.exp: Likewise.
Ulrich Weigand [Wed, 7 Dec 2011 13:31:05 +0000 (13:31 +0000)]
* s390-tdep.c: Replace "Linux" by "GNU/Linux" in comments
where appropriate.
* s390-tdep.h: Likewise.
Alan Modra [Wed, 7 Dec 2011 12:15:54 +0000 (12:15 +0000)]
PR ld/12772
* elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols
defined in shared libraries.
Tristan Gingold [Wed, 7 Dec 2011 10:09:22 +0000 (10:09 +0000)]
2011-12-07 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_canonicalize_symtab): Fix indentation.
Adjust the condition.
(bfd_mach_o_read_symtab_symbol): Now returns a bfd_boolean.
Adjust return statements.
(bfd_mach_o_read_symtab_strtab): Likewise.
(bfd_mach_o_read_symtab_symbols): Likewise.
(bfd_mach_o_scan_start_address): Likewise. Make it static.
(bfd_mach_o_scan): Likewise.
(bfd_mach_o_read_dysymtab_symbol): Remove unused function.
(bfd_mach_o_header_p): Adjust call.
(bfd_mach_o_cpu_name): Make it const.
(bfd_mach_o_filetype_name): Likewise.
(bfd_mach_o_header_flags_name): Likewise.
(bfd_mach_o_section_type_name): Likewise.
(bfd_mach_o_section_attribute_name): Likewise.
(bfd_mach_o_load_command_name): Likewise.
(bfd_mach_o_get_section_type_from_name): Add a const qualifier
after above change.
(bfd_mach_o_get_section_attribute_from_name): Likewise.
* mach-o.h (bfd_mach_o_read_dysymtab_symbol)
(bfd_mach_o_scan_start_address, bfd_mach_o_scan): Remove.
Tristan Gingold [Wed, 7 Dec 2011 09:11:25 +0000 (09:11 +0000)]
2011-12-07 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symtab_read): Do not consider N_OPT as
a debugging stab. Improve complaint message.
David Daney [Wed, 7 Dec 2011 03:50:10 +0000 (03:50 +0000)]
2011-12-06 David Daney <david.daney@cavium.com>
* readelf.c (dynamic_section_mips_val): Factor out trailing '\n'
from printed strings and move it to the end of the function.
Use BFD_VMA_FMT for printf format specifier for dynamic tag value.
Use print_vma() to print dynamic tag values.
Maciej W. Rozycki [Wed, 7 Dec 2011 00:17:23 +0000 (00:17 +0000)]
* mips-tdep.c (mips32_scan_prologue): Only update the immediate
load adjustment if still within the prologue.
gdbadmin [Wed, 7 Dec 2011 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Maciej W. Rozycki [Tue, 6 Dec 2011 23:49:56 +0000 (23:49 +0000)]
* mips-tdep.c (mips32_next_pc): Fix floating point condition
code mask.
Maciej W. Rozycki [Tue, 6 Dec 2011 23:36:58 +0000 (23:36 +0000)]
* mips-tdep.c (deal_with_atomic_sequence): Fix the handling
of BLTZ* and BGEZ* instructions.
Jan Kratochvil [Tue, 6 Dec 2011 23:29:47 +0000 (23:29 +0000)]
gdb/gdbserver/
Fix overlapping memcpy.
* mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
the read_inferior_memory transfer.
(delete_fast_tracepoint_jump): New variable buf. Use it for the
write_inferior_memory transfer.
(set_fast_tracepoint_jump): New variable buf. Use it for the
read_inferior_memory and write_inferior_memory transfers.
(uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
(delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
Use it for the write_inferior_memory transfer.
(check_mem_read, check_mem_write): New gdb_asserts for overlapping
buffers.
Maciej W. Rozycki [Tue, 6 Dec 2011 23:19:43 +0000 (23:19 +0000)]
* mips-tdep.c (mips_pc_is_mips16): Reverse the order of checks
performed to determine whether an address refers to standard
MIPS or MIPS16 code.
(mips16_next_pc): Use mips_pc_is_mips16 instead of
is_mips16_addr.
Maciej W. Rozycki [Tue, 6 Dec 2011 23:09:08 +0000 (23:09 +0000)]
* linux-low.c (fetch_register, store_register): Make code
consistent, fix formatting.
Maciej W. Rozycki [Tue, 6 Dec 2011 23:00:15 +0000 (23:00 +0000)]
* linux-low.c (usr_store_inferior_registers): Factor out code
to handle individual registers into...
(store_register): ... this new function.
Alan Modra [Tue, 6 Dec 2011 23:00:05 +0000 (23:00 +0000)]
daily update
Pedro Alves [Tue, 6 Dec 2011 20:03:14 +0000 (20:03 +0000)]
2011-12-06 Pedro Alves <pedro@codesourcery.com>
gdb/
* breakpoint.c (breakpoint_restore_shadows): Rename to ...
(breakpoint_xfer_memory): ... this. Change prototype. Handle
memory writes too.
* breakpoint.h (breakpoint_restore_shadows): Delete.
(breakpoint_xfer_memory): Declare.
* mem-break.c (default_memory_insert_breakpoint)
(default_memory_remove_breakpoint): Use target_write_raw_memory.
(memory_xfer_partial): Rename to ...
(memory_xfer_partial_1): ... this. Don't mask out breakpoints
here.
(memory_xfer_partial): New.
(target_write_raw_memory): New.
* target.h (target_write_raw_memory): New.
gdb/testsuite/
* gdb.base/break-always.exp: Test changing memory at addresses
with breakpoints inserted.
Doug Evans [Tue, 6 Dec 2011 19:57:47 +0000 (19:57 +0000)]
* linespec.c (decode_dollar): Avoid "may be used uninitialized" warning.
Tom Tromey [Tue, 6 Dec 2011 18:54:43 +0000 (18:54 +0000)]
the "ambiguous linespec" series
gdb
2011-12-06 Joel Brobecker <brobecker@acacore.com>
* language.h (struct language_defn): Add new component
la_symbol_name_compare.
* symfile.h (struct quick_symbol_functions): Update the profile
of parameter "name_matcher" for the expand_symtabs_matching
method. Update the documentation accordingly.
* ada-lang.h (ada_name_for_lookup): Add declaration.
* ada-lang.c (ada_name_for_lookup): New function, extracted out
from ada_iterate_over_symbols.
(ada_iterate_over_symbols): Do not encode symbol name anymore.
(ada_expand_partial_symbol_name): Adjust profile.
(ada_language_defn): Add value for la_symbol_name_compare field.
* linespec.c: #include "ada-lang.h".
(iterate_name_matcher): Add language parameter. Replace call
to strcmp_iw by call to language->la_symbol_name_compare.
(decode_variable): Encode COPY if current language is Ada.
* dwarf2read.c (dw2_expand_symtabs_matching): Adjust profile
of name_matcher parameter. Adjust call to name_matcher.
* psymtab.c (expand_symtabs_matching_via_partial): Likewise.
(expand_partial_symbol_names): Update profile of parameter "fun".
* psymtab.h (expand_partial_symbol_names): Update profile of
parameter "fun".
* symtab.c (demangle_for_lookup): Update function documentation.
(search_symbols_name_matches): Add language parameter.
(expand_partial_symbol_name): Likewise.
* c-lang.c (c_language_defn, cplus_language_defn)
(asm_language_defn, minimal_language_defn): Add value for
la_symbol_name_compare field.
* d-lang.c (d_language_defn): Likewise.
* f-lang.c (f_language_defn): Ditto.
* jv-lang.c (java_language_defn): Ditto.
* m2-lang.c (m2_language_defn): Ditto.
* objc-lang.c (objc_language_defn): Ditto.
* opencl-lang.c (opencl_language_defn): Ditto.
* p-lang.c (pascal_language_defn): Ditto.
* language.c (unknown_language_defn, auto_language_defn)
(local_language_defn): Ditto.
2011-12-06 Tom Tromey <tromey@redhat.com>
* linespec.c (iterate_over_all_matching_symtabs): Use
LA_ITERATE_OVER_SYMBOLS.
(lookup_prefix_sym, add_matching_symbols_to_info): Likewise.
(find_function_symbols, decode_variable): Remove Ada special
case.
* language.h (struct language_defn) <la_iterate_over_symbols>: New
field.
(LA_ITERATE_OVER_SYMBOLS): New macro.
* language.c (unknown_language_defn, auto_language_defn)
(local_language_defn): Update.
* c-lang.c (c_language_defn, cplus_language_defn)
(asm_language_defn, minimal_language_defn): Update.
* d-lang.c (d_language_defn): Update.
* f-lang.c (f_language_defn): Update.
* jv-lang.c (java_language_defn): Update.
* m2-lang.c (m2_language_defn): Update.
* objc-lang.c (objc_language_defn): Update.
* opencl-lang.c (opencl_language_defn): Update.
* p-lang.c (pascal_language_defn): Update.
* ada-lang.c (ada_iterate_over_symbols): New function.
(ada_language_defn): Update.
2011-12-06 Tom Tromey <tromey@redhat.com>
Joel Brobecker <brobecker@acacore.com>
PR breakpoints/13105, PR objc/8341, PR objc/8343, PR objc/8366,
PR objc/8535, PR breakpoints/11657, PR breakpoints/11970,
PR breakpoints/12023, PR breakpoints/12334, PR breakpoints/12856,
PR shlibs/8929, PR shlibs/7393:
* python/py-type.c (compare_maybe_null_strings): Rename from
compare_strings.
(check_types_equal): Update.
* utils.c (compare_strings): New function.
* tui/tui-winsource.c (tui_update_breakpoint_info): Update for
location changes.
* tracepoint.c (scope_info): Update.
(trace_find_line_command): Use DECODE_LINE_FUNFIRSTLINE.
* symtab.h (iterate_over_minimal_symbols)
(iterate_over_some_symtabs, iterate_over_symtabs)
(find_pcs_for_symtab_line, iterate_over_symbols)
(demangle_for_lookup): Declare.
(expand_line_sal): Remove.
* symtab.c (iterate_over_some_symtabs, iterate_over_symtabs)
(lookup_symtab_callback): New functions.
(lookup_symtab): Rewrite.
(demangle_for_lookup): New function, extract from
lookup_symbol_in_language.
(lookup_symbol_in_language): Use it.
(iterate_over_symbols): New function.
(find_line_symtab): Update.
(find_pcs_for_symtab_line): New functions.
(find_line_common): Add 'start' argument.
(decode_line_spec): Update. Change argument to 'flags', change
interpretation.
(append_expanded_sal): Remove.
(append_exact_match_to_sals): Remove.
(expand_line_sal): Remove.
* symfile.h (struct quick_symbol_functions) <lookup_symtab>:
Remove.
<map_symtabs_matching_filename>: New field.
* stack.c (func_command): Only look in the current program space.
Use DECODE_LINE_FUNFIRSTLINE.
* source.c (line_info): Set pspace on sal. Check program space in
the loop. Use DECODE_LINE_LIST_MODE.
(select_source_symtab): Use DECODE_LINE_FUNFIRSTLINE.
* solib-target.c: Remove DEF_VEC_I(CORE_ADDR).
* python/python.c (gdbpy_decode_line): Update.
* psymtab.c (partial_map_expand_apply): New function.
(partial_map_symtabs_matching_filename): Rename from
lookup_partial_symbol. Update arguments.
(lookup_symtab_via_partial_symtab): Remove.
(psym_functions): Update.
* objc-lang.h (parse_selector, parse_method): Don't declare.
(find_imps): Update.
* objc-lang.c (parse_selector, parse_method): Now static.
(find_methods): Change arguments. Fill in a vector of symbol
names.
(uniquify_strings): New function.
(find_imps): Change arguments.
* minsyms.c (iterate_over_minimal_symbols): New function.
* linespec.h (enum decode_line_flags): New.
(struct linespec_sals): New.
(struct linespec_result) <canonical>: Remove.
<pre_expanded, addr_string, sals>: New fields.
(destroy_linespec_result, make_cleanup_destroy_linespec_result)
(decode_line_full): Declare.
(decode_line_1): Update.
* linespec.c (struct address_entry, struct linespec_state, struct
collect_info): New types.
(add_sal_to_sals_basic, add_sal_to_sals, hash_address_entry)
(eq_address_entry, maybe_add_address): New functions.
(total_number_of_methods): Remove.
(iterate_name_matcher, iterate_over_all_matching_symtabs): New
functions.
(find_methods): Change arguments. Don't canonicalize input.
Simplify logic.
(add_matching_methods, add_constructors)
(build_canonical_line_spec): Remove.
(filter_results, convert_results_to_lsals): New functions.
(decode_line_2): Change arguments. Rewrite for new data
structures.
(decode_line_internal): Rename from decode_line_1. Change
arguments. Add cleanups. Update for new data structures.
(linespec_state_constructor, linespec_state_destructor)
(decode_line_full, decode_line_1): New functions.
(decode_indirect): Change arguments. Update.
(locate_first_half): Use skip_spaces.
(decode_objc): Change arguments. Update for new data structures.
Simplify logic.
(decode_compound): Change arguments. Add cleanups. Remove
fallback code, replace with error.
(struct decode_compound_collector): New type.
(collect_one_symbol): New function.
(lookup_prefix_sym): Change arguments. Update.
(compare_symbol_name, add_all_symbol_names_from_pspace)
(find_superclass_methods ): New functions.
(find_method): Rewrite.
(struct symtab_collector): New type.
(add_symtabs_to_list, collect_symtabs_from_filename): New
functions.
(symtabs_from_filename): Change API. Rename from
symtab_from_filename.
(collect_function_symbols): New function.
(find_function_symbols): Change API. Rename from
find_function_symbol. Rewrite.
(decode_all_digits): Change arguments. Rewrite.
(decode_dollar): Change arguments. Use decode_variable.
(decode_label): Change arguments. Rewrite.
(collect_symbols): New function.
(minsym_found): Change arguments. Rewrite.
(check_minsym, search_minsyms_for_name)
(add_matching_symbols_to_info): New function.
(decode_variable): Change arguments. Iterate over all symbols.
(symbol_found): Remove.
(symbol_to_sal): New function.
(init_linespec_result, destroy_linespec_result)
(cleanup_linespec_result, make_cleanup_destroy_linespec_result):
New functions.
(decode_digits_list_mode, decode_digits_ordinary): New functions.
* dwarf2read.c (dw2_map_expand_apply): New function.
(dw2_map_symtabs_matching_filename): Rename from
dw2_lookup_symtab. Change arguments.
(dwarf2_gdb_index_functions): Update.
* dwarf2loc.c: Remove DEF_VEC_I(CORE_ADDR).
* defs.h (compare_strings): Declare.
* cli/cli-cmds.c (compare_strings): Move to utils.c.
(edit_command, list_command): Use DECODE_LINE_LIST_MODE. Call
filter_sals.
(compare_symtabs, filter_sals): New functions.
* breakpoint.h (struct bp_location) <line_number, source_file>:
New fields.
(struct breakpoint) <line_number, source_file>: Remove.
<filter>: New field.
* breakpoint.c (print_breakpoint_location, init_raw_breakpoint)
(momentary_breakpoint_from_master, add_location_to_breakpoint):
Update for changes to locations.
(init_breakpoint_sal): Add 'filter' argument. Set 'filter' on
breakpoint.
(create_breakpoint_sal): Add 'filter' argument.
(remove_sal, expand_line_sal_maybe): Remove.
(create_breakpoints_sal): Remove 'sals' argument. Handle
pre-expanded sals and the filter.
(parse_breakpoint_sals): Use decode_line_full.
(check_fast_tracepoint_sals): Use get_sal_arch.
(create_breakpoint): Create a linespec_sals. Update.
(break_range_command): Use decode_line_full. Update.
(until_break_command): Update.
(clear_command): Update match conditions for linespec.c changes.
Use DECODE_LINE_LIST_MODE.
(say_where): Update for changes to locations.
(bp_location_dtor): Free 'source_file'.
(base_breakpoint_dtor): Free 'filter'. Don't free 'source_file'.
(update_static_tracepoint): Update for changes to locations.
(update_breakpoint_locations): Disable ranged breakpoint if too
many locations match. Update.
(addr_string_to_sals): Use decode_line_full. Resolve all sal
PCs.
(breakpoint_re_set_default): Don't call expand_line_sal_maybe.
(decode_line_spec_1): Update. Change argument name to 'flags',
change interpretation.
* block.h (block_containing_function): Declare.
* block.c (block_containing_function): New function.
* skip.c (skip_function_command): Update.
(skip_re_set): Update.
* infcmd.c (jump_command): Use DECODE_LINE_FUNFIRSTLINE.
* mi/mi-main.c (mi_cmd_trace_find): Use DECODE_LINE_FUNFIRSTLINE.
* NEWS: Add entry.
2011-12-06 Tom Tromey <tromey@redhat.com>
* elfread.c (elf_gnu_ifunc_resolver_return_stop): Allow
breakpoint's pspace to be NULL.
* breakpoint.h (struct breakpoint) <pspace>: Update comment.
* breakpoint.c (init_raw_breakpoint): Conditionally set
breakpoint's pspace.
(init_breakpoint_sal): Don't set breakpoint's pspace.
(prepare_re_set_context): Conditionally switch program space.
(addr_string_to_sals): Check executing_startup on location's
program space.
2011-12-06 Tom Tromey <tromey@redhat.com>
* breakpoint.h (enum enable_state) <bp_startup_disabled>: Remove.
* breakpoint.c (should_be_inserted): Explicitly check if program
space is executing startup.
(describe_other_breakpoints): Update.
(disable_breakpoints_before_startup): Change executing_startup
earlier. Remove loop.
(enable_breakpoints_after_startup): Likewise.
(init_breakpoint_sal): Don't use bp_startup_disabled.
(create_breakpoint): Don't use bp_startup_disabled.
(update_global_location_list): Use should_be_inserted.
(bkpt_re_set): Update.
gdb/testsuite
2011-12-06 Joel Brobecker <brobecker@acacore.com>
* gdb.ada/fullname_bp.exp: Add tests for other valid linespecs
involving a fully qualified function name.
2011-12-06 Tom Tromey <tromey@redhat.com>
* gdb.ada/homonym.exp: Add three breakpoint tests.
2011-12-06 Tom Tromey <tromey@redhat.com>
* gdb.base/solib-weak.exp (do_test): Remove kfail.
* gdb.trace/tracecmd.exp: Disable pending breakpoints earlier.
* gdb.objc/objcdecode.exp: Update for output changes.
* gdb.linespec/linespec.exp: New file.
* gdb.linespec/lspec.cc: New file.
* gdb.linespec/lspec.h: New file.
* gdb.linespec/body.h: New file.
* gdb.linespec/base/two/thefile.cc: New file.
* gdb.linespec/base/one/thefile.cc: New file.
* gdb.linespec/Makefile.in: New file.
* gdb.cp/templates.exp (test_template_breakpoints): Update for
output changes.
* gdb.cp/re-set-overloaded.exp: Remove kfail.
* gdb.cp/ovldbreak.exp: Update for output changes. "all" test now
makes one breakpoint.
* gdb.cp/method2.exp (test_break): Update for output changes.
* gdb.cp/mb-templates.exp: Update for output changes.
* gdb.cp/mb-inline.exp: Update for output changes.
* gdb.cp/mb-ctor.exp: Update for output changes.
* gdb.cp/ovsrch.exp: Use fully-qualified names.
* gdb.base/solib-symbol.exp: Run to main later. Breakpoint now
has multiple matches.
* gdb.base/sepdebug.exp: Disable pending breakpoints. Update for
error message change.
* gdb.base/list.exp (test_list_filename_and_number): Update for
error message change.
* gdb.base/break.exp: Disable pending breakpoints. Update for
output changes.
* configure.ac: Add gdb.linespec.
* configure: Rebuild.
* Makefile.in (ALL_SUBDIRS): Add gdb.linespec.
gdb/doc
2011-12-06 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Set Breaks): Update for new behavior.
Tom Tromey [Tue, 6 Dec 2011 17:38:53 +0000 (17:38 +0000)]
* python/lib/gdb/command/pretty_printers.py
(InfoPrettyPrinter.invoke1): Remove extra double quote.
Tom Tromey [Tue, 6 Dec 2011 14:27:39 +0000 (14:27 +0000)]
* NEWS: Add MI news.
Ulrich Weigand [Tue, 6 Dec 2011 14:14:50 +0000 (14:14 +0000)]
ChangeLog:
* s390-tdep.h (S390_ORIG_R2_REGNUM): Define.
(S390_LAST_BREAK_REGNUM): Likewise.
(S390_SYSTEM_CALL_REGNUM): Likewise.
(S390_NUM_REGS): Update.
(s390_regmap_last_break): Add declaration.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(tdesc_s390_linux32v1): Add declaration.
(tdesc_s390_linux32v2): Likewise.
(tdesc_s390_linux64v1): Likewise.
(tdesc_s390_linux64v2): Likewise.
(tdesc_s390x_linux64v1): Likewise.
(tdesc_s390x_linux64v2): Likewise.
* s390-tdep.c: Include new target description files
"features/s390-linux32v1.c", "features/s390-linux32v2.c",
"features/s390-linux64v1.c", "features/s390-linux64v2.c",
"features/s390x-linux64v1.c", and "features/s390x-linux64v2.c".
(s390_cannot_store_register): New function.
(s390_write_pc): Likewise.
(s390_dwarf_regmap): Add fields for new registers.
(s390_regmap_gregset): Likewise.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): Likewise.
(s390_regmap_last_break): New variable.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(s390_last_break_regset): Likewise.
(s390x_last_break_regset): Likewise.
(s390_system_call_regset): Likewise.
(s390_upper_regset_sections): Rename to ...
(s390_linux64_regset_sections): ... this.
(s390_linux32_regset_sections): New variable.
(s390x_linux64_regset_sections): Likewise.
(s390_linux32v1_regset_sections): Likewise.
(s390_linux32v2_regset_sections): Likewise.
(s390_linux64v1_regset_sections): Likewise.
(s390_linux64v2_regset_sections): Likewise.
(s390x_linux64v1_regset_sections): Likewise.
(s390x_linux64v2_regset_sections): Likewise.
(s390_regset_from_core_section): Handle .reg-s390-last-break and
.reg-s390-system-call core file sections.
(s390_core_read_description): Check for presence of
.reg-s390-last-break and .reg-s390-system-call core file
sections and return appropriate target description.
(s390_gdbarch_init): Detect Linux-specific registers "orig_r2",
"last_break" and "system_call" in target description. Install
appropriate gdbarch_core_regset_sections array.
Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc.
(_initialize_s390_tdep): Initialize additional target descriptions.
* s390-nat.c: Include "elf/common.h".
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(have_regset_last_break): New static variable.
(have_regset_system_call): Likewise.
(s390_native_supply): Handle S390_ORIG_R2_REGNUM.
(s390_native_collect): Likewise.
(fetch_regset, store_regset, check_regset): New functions.
(s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM
and S390_SYSTEM_CALL_REGNUM.
(s390_linux_store_inferior_registers): Likewise.
(s390_read_description): Check for presence of NT_S390_LAST_BREAK
and NT_S390_SYSTEM_CALL regsets and use appropriate description.
* features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1,
s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2.
(s390-linux32v1-expedite): Define.
(s390-linux32v2-expedite): Likewise.
(s390-linux64v1-expedite): Likewise.
(s390-linux64v2-expedite): Likewise.
(s390x-linux64v1-expedite): Likewise.
(s390x-linux64v2-expedite): Likewise.
* features/s390-linux32.xml: Add orig_r2 register.
* features/s390-linux64.xml: Likewise.
* features/s390x-linux64.xml: Likewise.
* features/s390-linux32v1.xml: New file.
* features/s390-linux32v2.xml: Likewise.
* features/s390-linux64v1.xml: Likewise.
* features/s390-linux64v2.xml: Likewise.
* features/s390x-linux64v1.xml: Likewise.
* features/s390x-linux64v2.xml: Likewise.
* features/s390-linux32.c: Regenerate.
* features/s390-linux64.c: Likewise.
* features/s390x-linux64.c: Likewise.
* features/s390-linux32v1.c: New generated file.
* features/s390-linux32v2.c: Likewise.
* features/s390-linux64v1.c: Likewise.
* features/s390-linux64v2.c: Likewise.
* features/s390x-linux64v1.c: Likewise.
* features/s390x-linux64v2.c: Likewise.
* regformats/s390-linux32.dat: Regenerate.
* regformats/s390-linux64.dat: Regenerate.
* regformats/s390x-linux64.dat: Regenerate.
* regformats/s390-linux32v1.dat: New generated file.
* regformats/s390-linux32v2.dat: Likewise.
* regformats/s390-linux64v1.dat: Likewise.
* regformats/s390-linux64v2.dat: Likewise.
* regformats/s390x-linux64v1.dat: Likewise.
* regformats/s390x-linux64v2.dat: Likewise.
gdbserver/ChangeLog:
* Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
(s390-linux32v2.o, s390-linux32v2.c): Likewise.
(s390-linux64v1.o, s390-linux64v1.c): Likewise.
(s390-linux64v2.o, s390-linux64v2.c): Likewise.
(s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
(s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
* configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
(srv_xmlfiles): Add new XML files.
* linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
and <sys/uio.h>.
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(init_registers_s390_linux32v1): Add prototype.
(init_registers_s390_linux32v2): Likewise.
(init_registers_s390_linux64v1): Likewise.
(init_registers_s390_linux64v2): Likewise.
(init_registers_s390x_linux64v1): Likewise.
(init_registers_s390x_linux64v2): Likewise.
(s390_num_regs): Increment to 52.
(s390_regmap): Add orig_r2 register.
(s390_num_regs_3264): Increment to 68.
(s390_regmap_3264): Add orig_r2 register.
(s390_collect_ptrace_register): Handle orig_r2 register.
(s390_supply_ptrace_register): Likewise.
(s390_fill_last_break): New function.
(s390_store_last_break): Likewise.
(s390_fill_system_call): New function.
(s390_store_system_call): Likewise.
(target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
register sets.
(s390_check_regset): New function.
(s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
NT_S390_SYSTEM_CALL regsets and use appropriate description.
Update target_regsets for available register sets.
testsuite/ChangeLog:
* gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only
last_break register on s390*-*-* targets.
Ulrich Weigand [Tue, 6 Dec 2011 14:09:12 +0000 (14:09 +0000)]
include/elf/ChangeLog:
* common.h (NT_S390_LAST_BREAK): Define.
(NT_S390_SYSTEM_CALL): Likewise.
bfd/ChangeLog:
* elf-bfd.h (elfcore_write_s390_last_break): Add prototype.
(elfcore_write_s390_system_call): Likewise.
* elf.c (elfcore_write_s390_last_break): New function.
(elfcore_write_s390_system_call): Likewise.
(elfcore_write_register_note): Call them.
(elfcore_grok_s390_last_break): New function.
(elfcore_grok_s390_system_call): Likewise.
(elfcore_grok_note): Call them.