summaryrefslogtreecommitdiff
path: root/gdb
Commit message (Collapse)AuthorAgeFilesLines
* 2012-06-05 Joakim Tjernlund <Joakim.Tjernlund@transmode.se>Pedro Alves2012-06-052-1/+7
| | | | | | * solib-svr4.c (enable_break): Don't fallback to setting the solib event breakpoint at _start, __start or main if a program interpreter is not found.
* Windows-specific iterate_over_objfiles_in_search_orderJoel Brobecker2012-06-055-0/+69
| | | | | | | | | | | | | | | | | | This patch sets the windows target to use their own version of the iterate_over_objfiles_in_search_order gdbarch method, in order to make global symbol searches sensitive to the current objfile. gdb/ChangeLog: * windows-tdep.h (windows_iterate_over_objfiles_in_search_order): Add declaration. * windows-tdep.c: #include "objfiles.h". (windows_iterate_over_objfiles_in_search_order): New function. * amd64-windows-tdep.c (amd64_windows_init_abi): Set iterate_over_objfiles_in_search_order gdbarch method to windows_iterate_over_objfiles_in_search_order. * i386-cygwin-tdep.c (i386_cygwin_init_abi): Likewise.
* New "iterate_over_objfiles_in_search_order" gdbarch method.Joel Brobecker2012-06-058-34/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the "iterate_over_objfiles_in_search_order" gdbarch method, as well as its default implementation, and converts the areas where it will matter to using this gdbarch method. The default method implementation is the only one installed, and the changes should have no functional impact in terms of behavior. This only paves the way for the architectures that will need their own version. gdb/ChangeLog: * gdbarch.sh: Add generation of "iterate_over_objfiles_in_search_order_cb_ftype" typedef in gdbarch.h. Add include of "objfiles.h" in gdbarch.c. (iterate_over_objfiles_in_search_order): New gdbarch method. * gdbarch.h, gdbarch.c: Regenerate. * objfiles.h (default_iterate_over_objfiles_in_search_order): Add declaration. * objfiles.c (default_iterate_over_objfiles_in_search_order): New function. * symtab.c (lookup_symbol_aux_objfile): New function, extracted out of lookup_symbol_aux_symtabs. (lookup_symbol_aux_symtabs): Replace extracted-out code by call to lookup_symbol_aux_objfile. (struct global_sym_lookup_data): New type. (lookup_symbol_global_iterator_cb): New function. (lookup_symbol_global): Search for symbol using gdbarch_iterate_over_objfiles_in_search_order and lookup_symbol_global_iterator_cb. * findvar.c (struct minsym_lookup_data): New type. (minsym_lookup_iterator_cb): New function. (default_read_var_value) [case LOC_UNRESOLVED]: Resolve the symbol's address via gdbarch_iterate_over_objfiles_in_search_order and minsym_lookup_iterator_cb.
* Revert "Search global symbols from the expression's block objfile first."Joel Brobecker2012-06-053-83/+47
| | | | | | | | | | | | | | | | | | | | | The search order used in this patch breaks global symbol lookups for certain symbols when copy-relocation is used. A slightly different search order will be implemented later. gdb/ChangeLog: Revert the following patch: * findvar.c (default_read_var_value): For LOC_UNRESOLVED symbols, try locating the symbol in the symbol's own objfile first, before extending the search to all objfiles. * symtab.c (lookup_symbol_aux_objfile): New function, extracted out of lookup_symbol_aux_symtabs. (lookup_symbol_aux_symtabs): Add new parameter "exclude_objfile". Replace extracted-out code by call to lookup_symbol_aux_objfile. Do not search EXCLUDE_OBJFILE. (lookup_static_symbol_aux): Update call to lookup_symbol_aux_symtabs. (lookup_symbol_global): Search for matches in the block's objfile first, before searching all other objfiles.
* Make ctxobj.exp and print-file-var.exp work on all platforms.Joel Brobecker2012-06-056-26/+103
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adjusts the testing strategy used in a couple of testcases where we are trying to print the value of a global variable defined at multiple locations. The problem is that the actual value depends on the platform. So instead of hard-coding the expected value in the testcase script, we use local variables (in the inferior) holding the correct value, and we compare the global variable's value with the local variable's value. gdb/testsuite/ChangeLog: * gdb.base/ctxobj-f.c (GET_VERSION): Introduce local variable and add comment. * gdb.base/ctxobj-m.c (main): Rewrite, and add comment. * gdb.base/ctxobj.exp: Insert breakpoint in ctxobj-f.c using "STOP" marker. Adjust testing strategy to make it work on all targets. * gdb.base/print-file-var-main.c (main): Rewrite using local variables and adjust get_version_2's return value check. Add small comment. * gdb.base/print-file-var.exp: Insert breakpoint using "STOP" marker. Adjust testing strategy to make it work on all targets.
* stop parsing breakpoint command if invalid keyword foundJoel Brobecker2012-06-055-1/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With an Ada program, trying to break on a specific Ada task, but with the wrong capitalization of the `task' keyword, we currently get only pieces of the "garbage" that caused the error: (gdb) b *rendez_vous'address TASK 2 Garbage 2 at end of command Pushing this a little further: (gdb) b *rendez_vous'address TASK Task TaSK 2 Garbage 2 at end of command Another interesting failure mode: (gdb) b *rendez_vous'address TASK if Argument required (expression to compute). The parser skipped `TASK', then found the `if' keyword, and thus started looking for a condition. This patch fixes the problem by aborting the parsing as soon as an invalid keyword is found. This makes it consistent with the case where the REST parameter is passed as NULL (where an error is raised immediately after seeing the first invalid keyword). It also introduces a new testcase that reproduces all above scenarios. gdb/ChangeLog: * breakpoint.c (find_condition_and_thread): Stop parsing as soon as the first invalid keyword is found. gdb/testsuite/ChangeLog: * gdb.ada/bad-task-bp-keyword: New testcase.
* copyright.py: Add gdb/CONTRIBUTE to EXCLUDE_LIST.Joel Brobecker2012-06-052-0/+5
| | | | | | | | | | | Normally, all files should have a copyright header, but gdb/CONTRIBUTE currently doesn't, and it adding one at the top of the file would probably be more pollution than information. So don't require a copyright header for now. gdb/ChangeLog: * copyright.py (EXCLUDE_LIST): Add 'gdb/CONTRIBUTE' to list.
* Add copyright header to config/djgpp/djcheck.sh.Joel Brobecker2012-06-052-0/+19
| | | | | | gdb/ChangeLog: * config/djgpp/djcheck.sh: Add copyright header.
* stubs/ia64vms-stub.c: Fix copyright header.Joel Brobecker2012-06-052-1/+6
| | | | | | | | | | There is an extra coma after the copyright year which tricks gnulib's update-copyright script. gdb/stubs/ChangeLog: * ia64vms-stub.c: Adjust copyright header to follow convention expected by gnulib's update-copyright script.
* copyright.py: Update path to gnulib import.Joel Brobecker2012-06-052-2/+9
| | | | | | | | | | | The location where we store the gnulib import has changed. This patch updates accordingly the path to gnulib's update-copyright script. gdb/ChangeLog: * copyright.py (update_files, main): Fix path to update-copyright script.
* copyright.py: Tell user to update gdb.texinfo and refcard.tex by hand.Joel Brobecker2012-06-052-1/+15
| | | | | | | | gdb/ChangeLog: * copyright.py (MULTIPLE_COPYRIGHT_HEADERS): New constant. (main): Add MULTIPLE_COPYRIGHT_HEADERS to the list of files for which a reminder to update by hand is printed.
* * buildsym.c (make_blockvector): Add comment.Doug Evans2012-06-052-2/+9
|
* *** empty log message ***gdbadmin2012-06-051-1/+1
|
* 2012-06-04 Pedro Alves <palves@redhat.com>Pedro Alves2012-06-047-24/+37
| | | | | | | | | | | * arch-utils.c (default_gdb_signal_from_target): Delete. * arch-utils.h (default_gdb_signal_from_target): Delete. * corelow.c (core_open) <signal mapping>: Extended comment. Check gdbarch_gdb_signal_from_target_p. * gdbarch.sh (gdb_signal_from_target): Make it an M method (with predicate). * gdbarch.h: Regenerate. * gdbarch.c: Regenerate.
* 2012-06-04 Pedro Alves <palves@redhat.com>Pedro Alves2012-06-043-8/+20
| | | | | | * gdbarch.sh (gdb_signal_from_target): Mention that the implementation of the method must be host independent. * gdbarch.h: Regenerate.
* bfd/Jan Kratochvil2012-06-042-1/+27
| | | | | | | | | | | | | | | | | | * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. gdb/ * symfile-mem.c: 3 new gdb_static_assert for target_read_memory_bfd parameters. (target_read_memory_bfd): New function. (symbol_file_add_from_memory): Use it.
* * symtab.c (lookup_global_symbol_from_objfile): Only scan blockvectorDoug Evans2012-06-042-12/+16
| | | | | of primary symtab. (basic_lookup_transparent_type): Ditto.
* * objfiles.h (ALL_OBJFILE_PRIMARY_SYMTABS): New macro.Doug Evans2012-06-045-53/+61
| | | | | | | | | (ALL_PRIMARY_SYMTABS): Use it. (ALL_PSPACE_PRIMARY_SYMTABS): Ditto. * dwarf2read.c (dw2_find_symbol_file): Ditto. * linespec.c (iterate_over_all_matching_symtabs): Ditto. * symtab.c (lookup_symbol_aux_objfile): Ditto. (basic_lookup_transparent_type): Ditto.
* *** empty log message ***gdbadmin2012-06-041-1/+1
|
* gdb/testsuite/Jan Kratochvil2012-06-032-24/+34
| | | | | | | | | | | | * gdb.base/code_elim.exp (add-symbol-file ${testfile1} 0x100000) (add-symbol-file ${testfile2} 0x200000): Wrap them to 'order1' and 'order2'. (order1: add-symbol-file ${testfile1} 0x100000) (order1: add-symbol-file ${testfile2} 0x200000) (order2: add-symbol-file ${testfile2} 0x200000) (order2: add-symbol-file ${testfile1} 0x100000): Add -s .data and -s .bss as appropriate.
* gdb/testsuite/Jan Kratochvil2012-06-032-22/+39
| | | | | | | | | | | | | * gdb.base/code_elim.exp (add-symbol-file ${testfile1} 0x100000): Simplify it to ... (symbol-file ${testfile1}): ... here. (test eliminated var my_global_symbol) (test eliminated var my_static_symbol) (test eliminated var my_global_func, get address of main): Wrap them to 'single psymtabs' and 'single symtabs' (get address of my_global_symbol, get address of my_static_symbol) (get address of my_global_func, get address of main): Wrap them to 'order1' and 'order2'.
* *** empty log message ***gdbadmin2012-06-031-1/+1
|
* 2012-06-02 Sergio Durigan Junior <sergiodj@redhat.com>Sergio Durigan Junior2012-06-022-7/+12
| | | | | * symtab.c (symbol_demangled_name): New variable `dem_name'. Use it to optimize resolution of demangled name.
* *** empty log message ***gdbadmin2012-06-021-1/+1
|
* gdb/Jan Kratochvil2012-06-014-6/+69
| | | | | | | | * configure.ac (development): Define new variable. Call AC_CHECK_LIB for mcheck if $development. (ERROR_ON_WARNING): Enable it by default only if $development. * config.in: Regenerate. * configure: Regenerate.
* gdb/gdbserver/Jan Kratochvil2012-06-012-2/+7
| | | | | Fix gcc -flto compilation warning. * server.c (main): Make variable multi_mode and attach volatile.
* bfd/Jan Kratochvil2012-06-013-3/+9
| | | | | | | | | | | | | | | | * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. gdb/ * target.c (target_read_memory): Make LEN argument as size_t. * target.h (target_read_memory): Likewise.
* gdb/Jan Kratochvil2012-06-012-2/+6
| | | | * tilegx-linux-tdep.c (tilegx_l): Use ULL for 64-bit values.
* *** empty log message ***gdbadmin2012-06-011-1/+1
|
* * ppc-linux-nat.c (have_ptrace_booke_interface): Disable ptraceEdjunior Barbosa Machado2012-05-312-10/+19
| | | | | BookE interface for PowerPC server processors if not available in the Linux Kernel.
* * linespec.c (decode_objc): Add cleanup to freeKeith Seitz2012-05-314-3/+17
| | | | | | | | | | INFO.FILE_SYMTABS. (find_linespec_symbols): Add cleanup to free CLASSES. * symfile.c (find_separate_debug_file_by_debuglink): Add cleanup to free DEBUGLINK. * ui-out.c (clear_header_list): No need to check if HEADER_NEXT.COLHDR is NULL. Free HEADER_NEXT.COL_NAME.
* * gdb/ada-lang.c (standard_lookup): Prevent uninitialized variableMatthew Gretton-Dann2012-05-312-1/+7
| | | | warning.
* *** empty log message ***gdbadmin2012-05-311-1/+1
|
* * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAPThiago Jung Bauermann2012-05-302-0/+9
| | | | if the platform doesn't know about it.
* 2012-05-30 Jeff Kenton <jkenton@tilera.com>Pedro Alves2012-05-304-0/+160
| | | | | | | * Makefile.in (SFILES): Add linux-tile-low.c. (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules. * configure.srv: Handle tilegx-*-linux*. * linux-tile-low.c: New file.
* 2012-05-30 Jeff Kenton <jkenton@tilera.com>Pedro Alves2012-05-304-0/+209
| | | | | | | * configure.host (gdb_host_cpu): Handle tilegx*. (gdb_host): Handle tilegx-*-linux*. * tilegx-linux-nat.c: New file. * config/tilegx/linux.mh: New file.
* 2012-05-30 Jeff Kenton <jkenton@tilera.com>Pedro Alves2012-05-307-0/+1359
| | | | | | | | | | | | * Makefile.in (ALL_TARGET_OBJS): Add tilegx-tdep.o and tilegx-linux-tdep.o. (ALLDEPFILES): Add tilegx-linux-nat.c, tilegx-tdep.c and tilegx-linux-tdep.c. * configure.tgt: Handle tilegx-*-linux*. * tilegx-tdep.h: New file. * tilegx-tdep.c: New file. * tilegx-linux-tdep.c: New file. * regformats/reg-tilegx.dat: New file.
* * ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): fixEdjunior Barbosa Machado2012-05-302-1/+6
| | | | accounting of hw watchpoints on ppc.
* * source.c (openp): Expand tilde in path entries.Thiago Jung Bauermann2012-05-302-0/+23
|
* *** empty log message ***gdbadmin2012-05-301-1/+1
|
* * buildsym.c (block_compar): Fix comment.Doug Evans2012-05-292-3/+7
| | | | (end_symtab): Fix and clarify some comments.
* * stabsread.h (cleanup_undefined_stabs_types): Renamed fromDoug Evans2012-05-294-5/+12
| | | | | | cleanup_undefined_types. * stabsread.c (cleanup_undefined_stabs_types): Ditto. All callers updated.
* bfd/Tom Tromey2012-05-295-5/+10
| | | | | | | | | | | | | * opncls.c (bfd_fopen): Always close fd on failure. (bfd_fdopenr): Likewise. gdb/ * symfile.c (symfile_bfd_open): Don't close desc if bfd_fopen fails. * solib.c (solib_bfd_fopen): Don't close fd if bfd_fopen fails. * exec.c (exec_file_attach): Don't close scratch_chan if bfd_fopen fails. * dwarf2read.c (try_open_dwo_file): Don't close fd if bfd_fopen fails.
* 2012-05-29 Tristan Gingold <gingold@adacore.com>Tristan Gingold2012-05-292-37/+95
| | | | | | | | | | | | | | | | * solib-darwin.c (dyld_all_image_addr, dyld_all_image): Move into... (struct darwin_info): ... New struct. (solib_darwin_pspace_data): New variable. (darwin_pspace_data_cleanup): New function. (get_darwin_info): Likewise. (darwin_dyld_version_ok, darwin_load_image_infos) (darwin_solib_get_all_image_info_addr_at_init) (darwin_solib_read_all_image_info_addr): Add info argument. Adjust code. (darwin_current_sos): Use per pspace structure. (darwin_solib_create_inferior_hook): Likewise. (darwin_clear_solib): Likewise. (_initialize_darwin_solib): Initialize solib_darwin_pspace_data.
* *** empty log message ***gdbadmin2012-05-291-1/+1
|
* 2012-05-28 Pedro Alves <palves@redhat.com>Pedro Alves2012-05-282-5/+9
| | | | | * infrun.c (wait_for_inferior): Move ecss and ecs locals to the block that uses them. Clear ecss before handling each event.
* gdb/Jan Kratochvil2012-05-288-1/+187
| | | | | | | | | | | | | * solib-svr4.c (svr4_current_sos): New comment on svr4_current_sos_via_xfer_libraries fall back. gdb/gdbserver/ * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1. gdb/testsuite/ * gdb.server/solib-list-lib.c: New file. * gdb.server/solib-list-main.c: New file. * gdb.server/solib-list.exp: New file.
* *** empty log message ***gdbadmin2012-05-281-1/+1
|
* *** empty log message ***gdbadmin2012-05-271-1/+1
|
* *** empty log message ***gdbadmin2012-05-261-1/+1
|