aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2013-07-17 * gdbcmd.h (togglelist): Delete.Doug Evans4-13/+7
* cli/cli-cmds.c (togglelist): Delete. (init_cmd_lists): Update. * cli/cli-cmds.h (togglelist): Delete.
2013-07-17 * dwarf2read.c (dwarf2_per_objfile_free): ClearTom Tromey2-0/+9
dwarf2_per_objfile.
2013-07-17 * nto-tdep.c (nto_relocate_section_addresses): Update,Doug Evans5-4/+14
target_section.bfd deleted. * ppc64-tdep.c (ppc64_convert_from_func_ptr_addr): Ditto. * s390-tdep.c (s390_load): Ditto. * solib-aix.c (solib_aix_relocate_section_addresses): Ditto.
2013-07-16Check for NULL character before calling strchr.Andrew Burgess4-3/+19
http://sourceware.org/ml/gdb-patches/2013-07/msg00322.html gdb/ChangeLog * common/format.c (parse_format_string): Add checks for NULL character before calling strchr. gdb/testsuite/ChangeLog * gdb.base/printcmds.exp (test_printf): Add tests for format strings with missing format specifier.
2013-07-16 * solist.h (target_so_ops.find_and_open_solib): Clarify usage ofDoug Evans3-3/+10
temp_pathname argument. * nto-tdep.c (nto_find_and_open_solib): Fix setting of temp_pathname when opening the file fails.
2013-07-16 * target.h (struct target_section): Delete member bfd.Doug Evans8-39/+67
All users updated to use the_bfd_section->owner instead. * exec.c (add_to_section_table): Assert bfd is expected value. Remove initialization of target_section.bfd. (remove_target_sections): Update. (section_table_available_memory): Update. (section_table_xfer_memory_partial): Update. (print_section_info): Update. (exec_set_section_address): Update. * record-full.c (record_full_core_xfer_partial): Update. * solib-svr4.c (svr4_relocate_section_addresses): Update. * solib-target.c (solib_target_relocate_section_addresses): Update. * symfile.c (build_section_addr_info_from_section_table): Update. * target.c (memory_xfer_live_readonly_partial): Update. (memory_xfer_partial_1): Update.
2013-07-16simple test suite fix in gdb.adaTom Tromey2-2/+6
This changes one spot in gdb.ada to use standard_testfile. * gdb.ada/info_types.exp: Use standard_testfile.
2013-07-16simple test suite fix in gdb.miTom Tromey2-8/+15
This is another simple test suite change for the parallelization project. This changes mi-basics.exp to avoid the use of subdir and objdir and instead use standard_output_file. There are still some uses of objdir, but as noted in a new comment in the patch, these uses are parallel-safe. * gdb.mi/mi-basics.exp: Use standard_output_file. (test_dir_specification, test_cwd_specification) (test_path_specification): Use testsubdir, not subdir and objdir.
2013-07-16test suite fixlet for gdb.traceTom Tromey2-2/+6
This is a minor fix to clean up the last remaining test suite parallelization issue in gdb.trace. mi-traceframe-changed.exp refers to objdir. This patch changes the code to have the same effect, but avoid using that variable. * gdb.trace/mi-traceframe-changed.exp: Don't use objdir.
2013-07-152013-07-15 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>Ulrich Weigand2-92/+113
* ppc-linux-nat.c: Since the new PowerPC specific ptrace interface is now available for embedded (BookE) and server (BookS) processors, correct mentions of 'booke' and adjust comments accordingly in order to avoid confusion. Rename struct 'booke_debug_info' to 'hwdebug_info'. (have_ptrace_booke_interface): Rename function and variable 'have_ptrace_booke_interface' to 'have_ptrace_hwdebug_interface'. Rename struct 'booke_debug_info' to 'hwdebug_info'. Update all uses. (booke_cmp_hw_point): Rename function 'booke_cmp_hw_point' to 'hwdebug_point_cmp'. Update all uses. (booke_find_thread_points_by_tid): Rename function 'booke_find_thread_points_by_tid' to 'hwdebug_find_thread_points_by_tid'. Update all uses. (booke_insert_point): Rename function 'booke_insert_point' to 'hwdebug_insert_point'. Update all uses. (booke_remove_point): Rename function 'booke_remove_point' to 'hwdebug_remove_point'. Update all uses.
2013-07-15 include/elf/Maciej W. Rozycki2-5/+10
* mips.h (Tag_GNU_MIPS_ABI_FP): Remove comment. (Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE, Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT, Val_GNU_MIPS_ABI_FP_64): New enum. bfd/ * elfxx-mips.c (mips_elf_merge_obj_attributes): Replace hardcoded magic numbers with enum values. binutils/ * readelf.c (display_mips_gnu_attribute): Replace hardcoded magic numbers with enum values. gdb/ * mips-tdep.c (mips_gdbarch_init): Replace hardcoded magic numbers with enum values.
2013-07-152013-07-15 Ali Anwar <ali_anwar@codesourcery.com>Ali Anwar3-11/+72
PR threads/13217 * thread.c (thread_apply_all_command): Check for valid threads and thread count. (thread_array_cleanup): New struct. (set_thread_refcount): New function.
2013-07-11Reuse print_hex_chars function.Andrew Burgess2-11/+7
http://sourceware.org/ml/gdb-patches/2013-07/msg00234.html * infcmd.c (default_print_one_register_info): Reuse code in print_hex_chars.
2013-07-10 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS, ADA_EXP_C): New macros.Tom Tromey2-0/+18
(ada-exp.o): New target.
2013-07-10http://sourceware.org/ml/gdb-patches/2013-07/msg00065.htmlSergio Durigan Junior2-1/+8
Doug Evans committed the change above, but forgot to update one of the callers of get_raw_print_options, at mt-tdep.c. This commit fixes this. 2013-07-10 Sergio Durigan Junior <sergiodj@redhat.com> * mt-tdep.c (mt_registers_info): Call get_no_prettyformat_print_options instead of get_raw_print_options (regression by last patch from Doug Evans).
2013-07-10[testsuite/Ada] Add testing of access to packed arrays.Joel Brobecker2-0/+17
This patch adds some tests that evidence a regression fixed by the following patch from Pedro Alves: [PATCH] ada-lang.c:coerce_unspec_val_to_type: Preserve laziness http://www.sourceware.org/ml/gdb-patches/2013-07/msg00178.html gdb/testsuite/ChangeLog: * gdb.ada/arrayptr/foo.adb: Add some code defining an access to a packed array. * gdb.ada/arrayptr.exp: Add a few tests using that new access to packed array.
2013-07-10ada-lang.c:coerce_unspec_val_to_type: Preserve laziness.Joel Brobecker4-2/+22
ada-lang.c:coerce_unspec_val_to_type does: if (value_lazy (val) || TYPE_LENGTH (type) > TYPE_LENGTH (value_type (val))) result = allocate_value_lazy (type); else { result = allocate_value (type); memcpy (value_contents_raw (result), value_contents (val), TYPE_LENGTH (type)); } set_value_component_location (result, val); set_value_bitsize (result, value_bitsize (val)); set_value_bitpos (result, value_bitpos (val)); set_value_address (result, value_address (val)); set_value_optimized_out (result, value_optimized_out (val)); Notice that before value_optimized_out was made to auto-fetch lazy values, VAL would end up still lazy if it was lazy on entry. It's not really a problem here if VAL is lazy, and VAL->optimized_out is 0, because RESULT is also left lazy. IOW, this just wants to copy the VAL->optimized_out flag to RESULT->optimized_out, nothing else. As a side-effect of the change in value_optimized_out, the following testcase now regresses. Consider: type Small is range -64 .. 63; for Small'Size use 7; type Arr is array (1..10) of Small; pragma Pack (Arr); type Arr_Ptr is access Arr; An_Arr_Ptr : Arr_Ptr := new Arr'(10, 20, 30, 40, 50, 60, 62, 63, -23, 42); Trying to print one element of An_Arr_Ptr yields: (gdb) p an_arr_ptr(3) Cannot access memory at address 0x0 The patch adds the value_optimized_out_const function for that, allowing us to avoid trying to fetch a value at a dummy address. (I found this out by grepping for set_value_optimized_out and trying to convert the uses I found to instead allocate the value with allocate_optimized_out_value.) Tested on x86_64 Fedora 17. gdb/ 2013-07-09 Pedro Alves <palves@redhat.com> * ada-lang.c (coerce_unspec_val_to_type): Use value_optimized_out_const. * value.c (value_optimized_out_const): New function. * value.h (value_optimized_out_const): New declaration.
2013-07-10Fix FAIL: gdb.ada/small_reg_param.exp: continue to call_meJoel Brobecker2-1/+6
If enough information is provided by the compiler, the debugger now prints the entry value of various parameters: (gdb) continue Continuing. Breakpoint 2, pck.call_me (w=w@entry=50) at [...] 20 Last_Word := W; This patch adjusts the expected output to allow an optional "w@entry=" in the parameter value. gdb/testsuite/ChangeLog: * gdb.ada/small_reg_param.exp: Accept optional entry value for parameter "w".
2013-07-10Remove trailing space in gdb.ada/small_reg_param.expJoel Brobecker2-1/+5
gdb/testsuite/ChangeLog: * gdb.ada/small_reg_param.exp: Remove trailing space.
2013-07-09 * defs.h (enum val_prettyformat): Renamed from val_prettyprint.Doug Evans19-74/+98
Enum values rename as well. All uses updated. * valprint.h (value_print_options): Rename member pretty to pretty format. Rename member prettyprint_arrays to prettyformat_arrays. Rename member prettyprint_structs to prettyformat_structs. All uses updated. (get_no_prettyformat_print_options): Renamed from get_raw_print_options. * valprint.c (get_no_prettyformat_print_options): Renamed from get_raw_print_options. All callers updated. (show_prettyformat_structs): Renamed from show_prettyprint_structs. All callers updated. (show_prettyformat_arrays): Renamed from show_prettyprint_arrays. All callers updated. (_initialize_valprint): Improve help text for "set print pretty" and "set print arrays". testsuite/ * gdb.base/default.exp: Update expected output of "show print array" and "show print pretty".
2013-07-09Revert recent changes to value_bits_valid.Andrew Burgess2-4/+11
http://sourceware.org/ml/gdb-patches/2013-07/msg00243.html * value.c (value_bits_valid): Revert previous change, and change by Pedro on 2013-07-04, due to regressions in gdb.dwarf2/implptr.exp and gdb.dwarf2/pieces.exp.
2013-07-082013-07-08 Andreas Arnez <arnez@linux.vnet.ibm.com>Ulrich Weigand2-0/+13
* gdb.threads/wp-replication.exp: Stop counting available hardware watchpoints after NR_THREADS iterations.
2013-07-08Add $gdb_prompt to test regexp.Andrew Burgess2-1/+5
http://sourceware.org/ml/gdb-patches/2013-07/msg00173.html * gdb.python/py-explore.exp: Add $gdb_prompt to test regexp.
2013-07-08Fix bug in value_bits_valid.Andrew Burgess2-5/+11
http://sourceware.org/ml/gdb-patches/2013-07/msg00174.html * value.c (value_bits_valid): If the value is not lval_computed or has no check validity handler then the answer is the optimized_out flag, otherwise defer to the handler.
2013-07-07gdb/testsuite/Yao Qi5-91/+66
* boards/native-gdbserver.exp: Move invoke of process_multilib_options to gdbserver-base.exp. Move set_board_info 'compiler', 'gdb,noinferiorio', 'gdb,nofileio', 'gdb_server_prog' and 'gdb,predefined_tsv' to gdbserver-base.exp. Move proc ${board}_download, ${board}_upload and ${board}_file to gdbserver-base.exp. * boards/native-extended-gdbserver.exp: Likewise. * boards/native-stdio-gdbserver.exp: Likewise. * boards/gdbserver-base.exp: New file.
2013-07-06 top.c (print_gdb_configuration): Explain in output of --configurationEli Zaretskii2-0/+9
what does "relocatable" mean.
2013-07-06Rearrange --help output.Eli Zaretskii2-37/+45
* main.c (print_gdb_help): Regroup options in the --help text. See http://sourceware.org/ml/gdb-patches/2013-04/msg00362.html for the relevant discussions.
2013-07-06gdb/Yao Qi3-11/+20
* breakpoint.h (struct breakpoint_ops) <create_breakpoints_sal>: Remove parameter 'lsal'. * breakpoint.c (create_breakpoint): Move local variable 'lsal' to inner block. Caller update. (base_breakpoint_create_breakpoints_sal): Update. (bkpt_create_breakpoints_sal): Likewise. (tracepoint_create_breakpoints_sal): Likewise. (strace_marker_create_breakpoints_sal): Get 'lsal' from the element 0 of vector 'canonical->sals'.
2013-07-06 * rs6000-tdep.c (rs6000_stab_reg_to_regnum): Return the realLuis Machado2-2/+8
register number instead of the pseudo register one. (rs6000_dwarf2_reg_to_regnum): Likewise.
2013-07-06 * gdb.base/dump.exp: Remove arch-specific tests and do aLuis Machado2-4/+14
generic data address check to set is64bitonly correctly.
2013-07-06 * gdb.mi/gdb2549.exp (register_tests): Expect any decimal forLuis Machado2-5/+10
the register number instead of expecting only 0.
2013-07-05gdb/testsuite/gdb.base/gnu-ifunc-lib.c: Use %function syntax.Will Newton2-1/+6
ARM uses @ as a comment character, but % seems to be usable by all existing ifunc enabled architectures. gdb/testsuite/ChangeLog: 2013-07-05 Will Newton <will.newton@linaro.org> * gdb.base/gnu-ifunc-lib.c: Use %function instead of @function in asm syntax to allow building on ARM.
2013-07-05gdb/testsuite/Yao Qi5-24/+7
* boards/local-remote-host.exp: Remove obsolete comments. * boards/native-extended-gdbserver.exp: Likewise. * boards/native-gdbserver.exp: Likewise. * boards/native-stdio-gdbserver.exp: Likewise.
2013-07-04Use allocate_optimized_out_value instead of set_value_optimized_out.Pedro Alves3-6/+16
Allocate the value as optimized out from the start rather than allocating a value with contents, and then marking it optimized out. gdb/ 2013-07-04 Pedro Alves <palves@redhat.com> * findvar.c (value_of_register): Use allocate_optimized_out_value if the register has been optimized out, instead of set_value_optimized_out. * frame-unwind.c (frame_unwind_got_optimized): Use allocate_optimized_out_value.
2013-07-04value_bits_valid: Fix latent bug.Pedro Alves2-1/+7
Doing something else, I factored out the bits of the value_bits_valid function that actually handle the check_validity hook, and surprisingly found out that the result was misbehaving. Turns out value_bits_valid has a latent bug. If the value is not lval_computed, or doesn't have a check_validity hook, then we should assume the value is entirely valid, not invalid. This is currently masked by the value->optimized_out check -- I ran the testsuite with a gdb_assert(0) inserted in place of that return being touched by the patch, and it never triggers. Tested on x86_64 Fedora 17. gdb/ 2013-07-04 Pedro Alves <palves@redhat.com> * value.c (value_bits_valid): If the value is not lval_computed, or doesn't have a check_validity hook, assume the value is entirely valid.
2013-07-04http://sourceware.org/ml/gdb-patches/2013-07/msg00059.htmlAndrew Burgess7-41/+694
gdb/ChangeLog * stack.c (read_frame_arg): No longer fetch lazy values. * value.c (value_optimized_out): If the value is not already marked optimized out, and is lazy then fetch it. (value_primitive_field): Move optimized out check to later in the function, after we have loaded any lazy values. (value_fetch_lazy): Use optimized out flag directly rather than calling optimized_out method. gdb/testsuite/ChangeLog * gdb.dwarf2/dw2-reg-undefined.exp: New file. * gdb.dwarf2/dw2-reg-undefined.c: Likewise. * gdb.dwarf2/dw2-reg-undefined.S: Likewise.
2013-07-04http://sourceware.org/ml/gdb-patches/2013-07/msg00056.htmlAndrew Burgess3-162/+169
* valops.c: Don't include "user-regs.h". (value_fetch_lazy): Moved to value.c. * value.c: Include "user-regs.h". (value_fetch_lazy): Moved from valops.c.
2013-07-04gdb/Yao Qi6-36/+56
2013-07-04 Yao Qi <yao@codesourcery.com> Revert: 2013-06-27 Yao Qi <yao@codesourcery.com> * common/create-version.sh: Update comments. Handle the case that TARGET_ALIAS is empty. gdb/gdbserver/ 2013-07-04 Yao Qi <yao@codesourcery.com> * Makefile.in (host_alias): Use @host_noncanonical@. (target_alias): Use @target_noncanonical@. * configure.ac: Use ACX_NONCANONICAL_TARGET and ACX_NONCANONICAL_HOST. * configure: Regenerated. Revert: 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com> * configure.ac (version_host, version_target): Set and AC_SUBST them. * configure: Rebuild. * Makefile.in (version_host, version_target): Get from configure. (version.c): Use $(version_host) and $(version_target).
2013-07-03On mainline/development, also link GDBserver with -lmcheck.Pedro Alves12-56/+216
This factors --enable-libmcheck related bits from GDB's configure.ac and makes GDBserver use them too. Specifically, the 'development' global is moved to a separate script to it can be sourced by both GDB and GDBserver, and the --enable-libmcheck/--disable-libmcheck bits proper are moved to a new m4 file. I started out by defining 'development' in the m4 file, but in the end decided against it, as a separate script has the advantage that changing it in release branches does not require regenerating configure, unlike today. I had also started out by making the new GDB_AC_LIBMCHECK itself handle the yes/no default fallback depending on release/developement, but since I had split out 'development' to a separate script, and, GDB needs the python checks anyway (hence we'd need to do the python checks in gdb's configure.ac, and pass in a 'default lmcheck yes/no' parameter to GDB_AC_LIBMCHECK anyway), I ended up keeping GDB_AC_LIBMCHECK isolated from the 'development' global. IOW, it's the caller's business to handle it. Tested on x86_64 Fedora 17. Built GDB and GDBserver with and without --enable-libmcheck, and observed --enable-libmcheck overrides the disablement of -lmcheck caused by python supporting threads, and that GDBserver links with -lmcheck when expected. Also observed that changing the 'development' global, and issuing "make" triggers a relink, and '-lmcheck' is included or not from the link accordingly. gdb/ 2013-07-03 Pedro Alves <palves@redhat.com> * Makefile.in (config.status): Depend on development.sh. (aclocal_m4_deps): Add libmcheck.m4. * acinclude.m4: Include libmcheck.m4. * configure.ac: Source development.sh instead of setting 'development' here. --enable-libmcheck/--disable-libmcheck code factored out to GDB_AC_LIBMCHECK. Run it. * development.sh: New file. * libmcheck.m4: New file. * configure: Regenerate. gdb/gdbserver/ 2013-07-03 Pedro Alves <palves@redhat.com> * Makefile.in (config.status): Depend on development.sh. * acinclude.m4: Include libmcheck.m4. * configure: Regenerate.
2013-07-02gdb/testsuite/Jan Kratochvil2-2/+10
* gdb.base/break-on-linker-gcd-function.exp: Replace prepare_for_testing by build_executable_from_specs and clean_restart.
2013-07-02 * contrib/ari/update-web-ari.sh: Update for version.in change.Tom Tromey2-1/+6
2013-07-02 * common/ptid.h: Comment fixes.Tom Tromey2-2/+6
2013-07-02remove mention of "target nrom"Tom Tromey2-10/+4
The documentation refers to "target nrom", but this target doesn't appear in the tree. It was zapped here: 2002-12-16 Andrew Cagney <ac131313@redhat.com> [...] * remote-nrom.c, remote-os9k.c, remote-vx960.c: Delete. This patch removes the reference from the documentation. * gdb.texinfo (Target Commands): Don't mention "target nrom".
2013-07-02gdbserver, win32: fix some function typedefsMircea Gherzan2-4/+12
2013-05-25 Mircea Gherzan <mircea.gherzan@intel.com> gdbserver/ * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI attribute inside the parentheses. (winapi_DebugSetProcessKillOnExit): Ditto. (winapi_DebugBreakProcess): Ditto. (winapi_GenerateConsoleCtrlEvent): Ditto. Change-Id: I3aab72f2a1725a46b9da0e41a4ba08d7886284b9 Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
2013-07-02gdbserver: avoid empty structsMircea Gherzan2-0/+7
2013-06-25 Mircea Gherzan <mircea.gherzan@intel.com> gdbserver/ * notif.h (notif_event): Add a dummy member to avoid compiler errors. Change-Id: I490dbdb70a24f52b3947371f7c0397bf7a18423c Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
2013-07-01change gdb to use BFD's "dwz" functionsTom Tromey2-22/+31
BFD recently got a few functions related to "dwz" files. This patch changes gdb to use them, just to share a bit more code. This changes dwarf2_get_dwz_file to possibly return NULL. This simplified a bit of code elsewhere. Built and regtested on x86-64 Fedora 18. I specifically regtested it using my pending dwz test case. * dwarf2read.c (dwarf2_get_dwz_file): Return NULL if .gnu_debugaltlink not found. Use bfd_get_alt_debug_link_info. (dwarf2_read_index, create_all_comp_units): Update.
2013-07-01add -Wold-style-definitionTom Tromey5-4/+13
This adds -Wold-style-definition to gdb's list of warnings. This found a couple of spots where "()" was used where "(void)" is more correct. Tested by rebuilding on x86-64 Fedora 18. * configure.ac (build_warnings): Add -Wold-style-definition. * configure: Rebuild. * machoread.c (_initialize_machoread): Use "(void)". * macrocmd.c (macro_inform_no_debuginfo): Fix formatting; use "(void)".
2013-07-01add -Wold-style-declarationTom Tromey11-16/+39
This adds -Wold-style-declaration to gdb's list of warnings. It turns out that a few places use "const static" rather than "static const". The former is deprecated according to the C standard. Tested by rebuilding with --enable-targets=all on x86-64 Fedora 18. * configure.ac (build_warnings): Add -Wold-style-declaration. * configure: Rebuild. * dsrec.c (make_srec): Use "static const", not "const static". * h8300-tdep.c (h8300_breakpoint_from_pc): Use "static const", not "const static". * mi/mi-parse.c (mi_no_values, mi_simple_values, mi_all_values): Use "static const", not "const static". * mn10300-tdep.c (mn10300_breakpoint_from_pc): Use "static const", not "const static". * moxie-tdep.c (moxie_breakpoint_from_pc): Use "static const", not "const static". * rs6000-tdep.c (rs6000_breakpoint_from_pc): Use "static const", not "const static". * v850-tdep.c (v850_breakpoint_from_pc): Use "static const", not "const static". (v850_dbtrap_breakpoint_from_pc): Likewise. * xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Use "static const", not "const static".
2013-07-01add -Wmissing-parameter-typeTom Tromey3-2/+7
This adds -Wmissing-parameter-type to gdb's list of warnings. This one doesn't happen to trigger for a --enable-targets=all build on x86-64 Fedora 18. * configure.ac (build_warnings): Add -Wmissing-parameter-type. * configure: Rebuild.
2013-07-01[GDBserver] hostio.c: Fallback to packet buffer size if PATH_MAX is not ↵Pedro Alves2-4/+18
available. PATH_MAX is not defined on systems which have no limit on filename length, such as GNU/Hurd. As designed, the hostio RSP packets carry the paths as parameters in the request/reply packets, which themselves have an upper size limit, so lifting the filename limit completely would require a redesign with new hostio packets. While that doesn't happen, we can at least support filename lengths as long as the packet buffer can fit. gdb/gdbserver/ 2013-07-01 Pedro Alves <palves@redhat.com> * hostio.c (HOSTIO_PATH_MAX): Define. (require_filename, handle_open, handle_unlink, handle_readlink): Use it.