aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2013-04-03gdb/testsuite/Yao Qi2-4/+11
* gdb.trace/mi-traceframe-changed.exp: Update tfile name to "tfile-basic.tf". (test_tfind_tfile): Likewise.
2013-04-03gdb/testsuite/Yao Qi3-13/+24
* gdb.trace/tfile.c (write_basic_trace_file): Pass argument "tfile-basic.tf" instead of "basic.tf". (write_error_trace_file): Pass argument "tfile-error.tf" instead of "error.tf". * gdb.trace/tfile.exp: Update tfile names to "tfile-basic.tf" and "tfile-error.tf".
2013-04-032013-04-02 Sandra Loosemore <sandra@codesourcery.com>Sandra Loosemore2-1/+6
gdb/testsuite/ * gdb.cp/ovsrch.exp (test_class): Correct regexp to allow empty directory in file for breakpoint hit.
2013-04-03*** empty log message ***gdbadmin1-1/+1
2013-04-02 * dwarf2read.c (read_structure_type): Fix typo in comment.Doug Evans2-1/+5
2013-04-02NEWS/manual: Missing documentation for new commands in 7.6.Pedro Alves4-5/+52
I hacked "apropos" to dump the whole set of commands (just make it accept the entry string as regex), and then diffed the output of 7.5 vs 7.6, --enable-targets=all builds. That allowed then checking whether some commands had not been mentioned in NEWS or the manual. These are what I found missing. We've been a bit negligent in requiring documentation bits for debug commands. gdb/ 2013-04-02 Pedro Alves <palves@redhat.com> * NEWS: Mention "set/show debug aarch64", "set/show debug coff-pe-read" and "set/show debug mach-o". gdb/doc/ 2013-04-02 Pedro Alves <palves@redhat.com> * gdb.texinfo (Debugging Output): Document "set/show debug aarch64", "set/show debug coff-pe-read" and "set/show debug mach-o".
2013-04-02Add missing NEWS and manual bits for "set trace-buffer-size".Pedro Alves4-0/+17
Add missing mention of the QTBuffer::size packet configuration command, in both NEWS and manual. gdb/ 2013-04-02 Pedro Alves <palves@redhat.com> * NEWS: Mention "set/show remote trace-buffer-size-packet". gdb/doc/ 2013-04-02 Pedro Alves <palves@redhat.com> * gdb.texinfo (Remote Configuration) <set remote @var{name}-packet table>: Add entry for "trace-buffer-size".
2013-04-02Fix list of files submitted to "make TAGS".Eli Zaretskii2-3/+8
* Makefile.in (HFILES_NO_SRCDIR): Remove call-cmds.h. gdb_string.h is now in common/.
2013-04-02NEWS: Move "set debug notification" and "set trace-buffer-size" under "New ↵Pedro Alves2-8/+13
options". The "New commands" section reads: "New commands (for set/show, see "New options" below)" gdb/ 2013-04-02 Pedro Alves <palves@redhat.com> * NEWS: Move "set debug notification" and "set trace-buffer-size" under "New options".
2013-04-02gdb/Jan Kratochvil2-1/+8
Revert this patch: PR gdb/15275 * remote.c (remote_get_trace_status): Include putpkt in TRY_CATCH.
2013-04-02unpush the remote target if serial_write fails.Pedro Alves2-8/+32
PR gdb/15275 notes that when debugging with a remote connection over a serial link and the link is disconnected, say by disconnecting USB serial port, the GDB quit command no longer works: (gdb) tar ext /dev/ttyACM0 &"tar ext /dev/ttyACM0\n" ~"Remote debugging using /dev/ttyACM0\n" ^done (gdb) set debug remote 1 &"set debug remote 1\n" ^done (gdb) quit &"quit\n" &"Sending packet: $qTStatus#49..." &"putpkt: write failed: Input/output error.\n" ^error,msg="putpkt: write failed: Input/output error." (gdb) (gdb) quit &"quit\n" &"Sending packet: $qTStatus#49..." &"putpkt: write failed: Input/output error.\n" ^error,msg="putpkt: write failed: Input/output error." This is not reproducible with TCP connections, as with that, sending doesn't error out, but instead the error is detected on the subsequent readchar. When that read fails, we unpush the remote target, and throw TARGET_CLOSE_ERROR. To address PR gdb/15275, instead of catching the error in remote_get_trace_status as presently done (which leaves this same issue latent for another packet to trip on), or of making ser-unix.c fake success too on failed writes, so we'd get to readchar detecting the error on serial ports too, better let the error propagate out of serial_write, and catch it at the remote.c level, throwing away the target if writing fails too, instead of delaying that until the next read. gdb/ 2013-04-02 Pedro Alves <palves@redhat.com> PR gdb/15275 * remote.c (send_interrupt_sequence): Use remote_serial_write. (remote_serial_write): New function. (putpkt_binary, getpkt_or_notif_sane_1): Use remote_serial_write.
2013-04-02gdb/ChangeLog:Jiong Wang2-0/+7
* NEWS: Mention TILE-Gx in "New native configurations" and "New targets" sections.
2013-04-02*** empty log message ***gdbadmin1-1/+1
2013-04-01 * dwarf2read.c (lookup_signatured_type_at_offset): Delete.Doug Evans2-36/+4
(process_enumeration_scope): Simplify.
2013-04-01 * dwarf2read.c (struct dwarf2_per_cu_data): Move memberDoug Evans2-65/+60
type_unit_group ... (struct signatured_type): ... to here. (sig_type_ptr): New typedef. (type_unit_group): Delete member 't.first_cu'. Move member 'tus' out of union 't'. All uses updated. (dw2_get_file_names_reader): Assert not called for a type unit. (dw2_get_file_names): Assert not called for a type unit or type unit group. (build_type_psymtabs_reader): Assert called for a type unit. (build_type_psymtab_dependencies): Assert called for a type unit group.
2013-04-01Fix whitespace errors from last commit.Aleksandar Ristovski1-2/+1
2013-04-01 * dwarf2read.c (free_dwo_file): Add comment.Doug Evans2-0/+8
(dwarf2_per_objfile_free): Unref dwp bfd.
2013-04-01 Fix coff-pe-read.c to compile with Wunused.Aleksandar Ristovski2-13/+12
* coff-pe-read.c (add_pe_exported_sym): Remove unused 'dll_name_len'. (add_pe_forwarded_sym): Remove unused 'section', 'dll_name_len'. (read_pe_exported_syms): Remove unused 'exportix'. (pe_text_section_offset): Remove unused 'opthdr_ofs', 'num_entries', 'export_rva', 'export_size', 'expptr', 'exp_funcbase', 'expdata', 'erva', 'name_rvas', 'ordinals', 'nexp', 'ordbase', 'dll_name'. Reference: http://sourceware.org/ml/gdb-patches/2013-03/msg01081.html
2013-04-01 Cleanup: remove unused - breakpoint, buildsymAleksandar Ristovski3-9/+10
* breakpoint.c (parse_cond_to_aexpr): Remove unused 'old_chain'. (print_it_watchpoint): Remove unused 'bl'. (say_where): Remove unused 'uiout'. (bpstat_remove_breakpoint_callback): Remove unused 'uiout'. (bkpt_breakpoint_hit): Remove unused 'b'. (internal_bkpt_print_it): Remove unused 'uiout'. * buildsym.c (augment_type_symtab): Remove unused 'i'. Reference: http://sourceware.org/ml/gdb-patches/2013-03/msg01080.html
2013-04-01gdb/ChangeLogTiago Daitx2-70/+131
2013-03-01 Tiago Stürmer Daitx <tdaitx@linux.vnet.ibm.com> * ppc-sysv-tdep.c (ppc64_sysv_abi_push_float): New function. (ppc64_sysv_abi_push_dummy_call): Handle complex arguments.
2013-04-01*** empty log message ***gdbadmin1-1/+1
2013-03-31*** empty log message ***gdbadmin1-1/+1
2013-03-30*** empty log message ***gdbadmin1-1/+1
2013-03-29 * dwarf2read.c (open_dwo_file): Renamed from open_dwop_file.Doug Evans2-18/+44
Delete arg is_dwp. All callers updated. (open_dwp_file): New function. (open_and_init_dwp_file): Call it. (get_dwp_file): New function. (lookup_dwo_cutu): Call it.
2013-03-29 * dwarf2read.c (open_and_init_dwp_file): Remove incorrect, andDoug Evans2-4/+3
unnecessary, cleanup.
2013-03-29 * dwarf2read.c (lookup_dwo_cutu): Improve complaint text.Doug Evans2-2/+4
2013-03-29 * dwarf2read.c (read_cutu_die_from_dwo): New function.Doug Evans2-155/+246
(lookup_dwo_unit): New function. (init_cutu_and_read_dies): Move DWO handling to new functions.
2013-03-29 * dwarf2read.c (struct signatured_type): Tweak comment.Doug Evans2-16/+28
(struct dwo_unit): Tweak comment. (create_debug_types_hash_table): Tweak comment. Reformat long line. (create_dwo_debug_info_hash_table): Tweak comment. (dwarf2_per_cu_offset_and_type): Tweak comment.
2013-03-29 * dwarf2read.c (lookup_signatured_type): Remove complaint aboutDoug Evans2-7/+8
missing .debug_types section.
2013-03-29gdb/Yao Qi9-6/+61
2013-03-29 Yao Qi <yao@codesourcery.com> * corelow.c: Include "completer.h". (_initialize_corelow): Call add_target_with_completer with argument 'filename_completer'. * tracepoint.c: Likewise. * exec.c (_initialize_exec): Likewise. * target.c (add_target): Rename to ... (add_target_with_completer): ... this. Call set_cmd_completer if parameter completer is not NULL. (add_target): New. * target.h: Include "command.h". (add_target_with_completer): Declare it. gdb/testsuite: 2013-03-29 Yao Qi <yao@codesourcery.com> * gdb.base/completion.exp: Test completion of commands "target core", "target tfile" and "target exec". * gdb.trace/tfile.exp: Test completion of command "target tfile".
2013-03-29Ignore __fu<digits>__ symbols from COFF symbol tablesJoel Brobecker7-0/+151
The debugger sometimes prints strange function names for given addresses. For instance, with the following source code... 4 procedure Foo is 5 A : Integer; 6 begin 7 Do_Nothing (A'Address); 8 end Foo; ... we can see... (gdb) info line 5 Line 5 of "foo.adb" starts at address 0x4017ca <_ada_foo+6> and ends at 0x4017d2 <_fu29__system__scalar_values__is_is4+7>. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _fu29__system__scalar_values__is_is4 is an artificial symbol generated by the linker, and interferes with the pc-to-symbol resolution. There isn't much in the general minimal_symbol data that could help us identify them, so this patch changes the COFF reader to simply ignore them. gdb/ChangeLog: * coffread.c (is_import_fixup_symbol): New function. (record_minimal_symbol): Use is_import_fixup_symbol to detect import fixup symbols, and discard them. gdb/testsuite/ChangeLog: * gdb.ada/win_fu_syms: New testcase.
2013-03-29 * dwarf2read.c (create_debug_types_hash_table): Don't allocate theDoug Evans2-8/+11
types hash table until we know we need it.
2013-03-29 * dwarf2read.c (create_addrmap_from_index): Complain about bad CUDoug Evans2-3/+15
index numbers.
2013-03-29 * dwarf2read.c (dw2_get_file_names): Delete arg "objfile".Doug Evans4-13/+28
All callers updated. (dw2_print_stats): Print #read CUs too. (dump_die_shallow): Print signatured types better. testsuite/ * gdb.base/maint.exp (maint print statistics): Update expected output.
2013-03-29*** empty log message ***gdbadmin1-1/+1
2013-03-28 * dwarf2read.c (struct dwarf2_per_cu_data): Rename memberDoug Evans2-22/+27
info_or_types_section to section. All uses updated. (struct dwo_unit): Ditto.
2013-03-28Stop sending qTStatus if the target doesn't recognize it; add packet ↵Pedro Alves5-1/+36
configuration command. GDB currently sends a qTStatus even if the target previously replied an empty packet to a previous qTStatus. If the target doesn't recognize the packet, there's no point in trying again. The machinery we have in place is packet_ok, which has the nice side effect of forcing one to install a configuration command/knob for the packet in question, which is often handy when you need to debug things, and/or emulate a target that doesn't support the packet, or even, it can be used as workaround for the old broken kgdb's that return error to qTSTatus instead of an empty packet. gdb/ 2013-03-28 Pedro Alves <palves@redhat.com> * NEWS (New options): New section. (New options): Mention set/show remote trace-status-packet. * remote.c (PACKET_qTStatus): New enumeration value. (remote_get_trace_status): Skip sending qTStatus if the packet is disabled. Use packet_ok. (_initialize_remote): Register a configuration command for qTStatus packet. gdb/doc/ 2013-03-28 Pedro Alves <palves@redhat.com> * gdb.texinfo (Remote Configuration) <set remote @var{name}-packet table>: Add entry for "trace-status".
2013-03-28Fix Doug Evans's commit of 2013-03-21.Eli Zaretskii2-5/+13
* gdb.texinfo (Maintenance Commands): Use @enumerate, not "@table @bullet", which is invalid (makeinfo 5.1 barfs).
2013-03-28 * symfile.c (find_separate_debug_file): Add comment.Doug Evans2-2/+7
(terminate_after_last_dir_separator): Tweak comment.
2013-03-28 * dwarf2read.c (create_partial_symtab): Add forward decl.Doug Evans2-186/+203
(create_partial_symtab): Move to be closer to other psymtab functions. (process_psymtab_comp_unit_reader, process_psymtab_comp_unit): Ditto.
2013-03-28 * dwarf2read.c (dwarf2_physname): Move declaration to better spot.Doug Evans2-5/+10
(compute_symtab_includes): Remove unnecessary forward declaration. (die_needs_namespace): Add comment marking group of functions for dwarf2 name computation.
2013-03-28 * typeprint.c (_initialize_typeprint): Improve type help text.Doug Evans2-3/+6
2013-03-28 * python/python.c (finish_python_initialization): Provide suggestionDoug Evans2-2/+11
for how to tell gdb to find its python files.
2013-03-28Fix PR gdb/15294: list with unlimited listsize brokenPedro Alves6-14/+30
Currently, "set listsize -1" is supposed to mean "unlimited" source lines, but, alas, it doesn't actually work: (gdb) set listsize -1 (gdb) show listsize Number of source lines gdb will list by default is unlimited. (gdb) list 1 (gdb) list 1 (gdb) list 1 (gdb) set listsize 10 (gdb) list 1 1 /* Main function for CLI gdb. 2 Copyright (C) 2002-2013 Free Software Foundation, Inc. 3 4 This file is part of GDB. 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 3 of the License, or 9 (at your option) any later version. 10 Before this patch: http://sourceware.org/ml/gdb-patches/2012-08/msg00367.html was applied, the "set listsize" command was a var_integer command, and "unlimited" was set with 0. Internally, var_integer maps 0 to INT_MAX case var_integer: { ... if (val == 0 && c->var_type == var_integer) val = INT_MAX; The change in that patch to zuinteger_unlimited command, meant that -1 is left as -1 in the command's control variable (lines_to_list), and the code in source.c isn't expecting that -- it only expects positive numbers. I previously suggested fixing the code and keeping the new behavior, but I found that "set listsize 0" is currently used in the wild, and we do have a bunch of other commands where "0" means unlimited, so I'm thinking that changing this command alone in isolation is not a good idea. So I now strongly prefer reverting back the behavior in 7.6 to the same behavior the command has had since 2006 (0==unlimited, -1=error). Before that, set listsize -1 would be accepted as unlimited as well. After 7.6 is out, in mainline, we can get back to reconsidering changing this command's behavior, if there's a real need for being able to suppress output. For now, let's play it safe. The "list line 1 with unlimited listsize" test in list.exp was originally written years and years ago expecting 0 to mean "no output", but GDB never actually worked that way, even when the tests were written, so the tests had been xfailed then. This patch now adjusts the test to the new behavior, so that the test actually passes, and the xfail is removed. gdb/ 2013-03-28 Pedro Alves <palves@redhat.com> PR gdb/15294 * source.c (_initialize_source): Change back "set listsize" to an integer command. gdb/testsuite/ 2013-03-28 Pedro Alves <palves@redhat.com> PR gdb/15294 * gdb.base/list.exp (set_listsize): Adjust to accept $arg == 0 to mean unlimited instead of $arg < 0. (test_listsize): Remove "listsize of 0 suppresses output" test. Test that "set listsize 0" ends up with an unlimited listsize. gdb/doc/ 2013-03-28 Pedro Alves <palves@redhat.com> PR gdb/15294 * gdb.texinfo (List) <set listsize>: Adjust to document that listsize 0 means no limit, and remove mention of -1.
2013-03-28list.exp: Avoid hardcoding line numbers.Pedro Alves3-9/+34
The previous patch actually wasn't the first time I had to update line numbers in this file. This avoids hard coding line numbers, hopefully making the next time a little easier. Tested on x86_64 Fedora 17. gdb/testsuite/ 2013-03-28 Pedro Alves <palves@redhat.com> * gdb.base/list.exp (last_line): New global. (last_line_re): New global. (test_listsize, test_list_function, test_list_forward) (test_repeat_list_command, test_list_range) (test_list_filename_and_function): Use them. * gdb.base/list0.c: Comment the last line of the file with "last line".
2013-03-28list.exp: Adjust "set listsize -1" to current test source's real line count.Pedro Alves2-1/+6
The "set listsize -1" test in list.exp can't work correct anymore nowadays, because the test's source files grew over time, and this particular test was never updated. This fixes it in the obvious way. gdb/testsuite/ 2013-03-28 Pedro Alves <palves@redhat.com> * gdb.base/list.exp (test_listsize): Adjust test to make sure we list the whole file.
2013-03-28list.exp: Catch "set listsize" failures (and "set listsize -1/0"'s history).Pedro Alves2-1/+6
Before the changes starting at <http://sourceware.org/ml/gdb-patches/2012-08/msg00020.html>, the 'set listsize' command only accepted "0" as special value, meaning "unlimited". The testsuite actually tried "set listsize -1" and expected that to mean unlimited too. If you tried testing list.exp at the time of that patch above, you'd get: (gdb) PASS: gdb.base/list.exp: list line 10 with listsize 100 set listsize 0 (gdb) PASS: gdb.base/list.exp: setting listsize to 0 #6 show listsize Number of source lines gdb will list by default is unlimited. (gdb) PASS: gdb.base/list.exp: show listsize unlimited #6 list 1 1 #include "list0.h" 2 ... 42 /* Not used for anything */ 43 } (gdb) PASS: gdb.base/list.exp: listsize of 0 suppresses output set listsize -1 integer 4294967295 out of range (gdb) PASS: gdb.base/list.exp: setting listsize to -1 #7 show listsize Number of source lines gdb will list by default is unlimited. (gdb) PASS: gdb.base/list.exp: show listsize unlimited #7 list 1 1 #include "list0.h" Notice that "set listsize -1" actually failed with "integer 4294967295 out of range", but we issued a PASS anyway. (and notice how the "listsize of 0 suppresses output" test passes bogusly too.) This patch fixes that testsuite problem in the obvious way. gdb/testsuite/ 2013-03-28 Pedro Alves <palves@redhat.com> * gdb.base/list.exp (set_listsize): Use gdb_test_no_output for "set listsize".
2013-03-28*** empty log message ***gdbadmin1-1/+1
2013-03-27gdb/Jan Kratochvil2-2/+6
PR gdb/15275 * remote.c (remote_get_trace_status): Include putpkt in TRY_CATCH.
2013-03-27Forbid "set history size (INT_MAX..UINT_MAX)"Pedro Alves2-31/+64
The whole readline interface is signed, and works with the 0..INT_MAX range. We don't allow setting the size to UINT_MAX directly. The documented user visible interface is "use 0 for unlimited". The UINT_MAX representation is an implementation detail we could change, e.g., by keeping a separate flag for "unlimited", which is actually what the readline interface does (stifled vs non stifled). Generically speaking, exposing this detail to clients of the interface may make our lives complicated when we find the need to extend the range of some command in the future, and it's better if users (frontends/scripts) aren't relying on anything but what we tell them to use for "unlimited". Making values other than 0 error out is the way to prevent users from using those ranges inappropriately. Quite related, note: (gdb) set history size 0xffffffff integer 4294967295 out of range But, (gdb) set history size 0xfffffffe (gdb) show history size The size of the command history is unlimited. (gdb) set history size 0x100000000 integer 4294967296 out of range If values over INT_MAX are accepted as unlimited, then there's no good argument for only accepting [INT_MAX..UINT_MAX) as valid "unlimited" magic numbers, while not accepting [UINT_MAX..inf). Making the setting's control variable of different type (unsigned int) of the rest of the related code (int) adds the need to recall that one variable among all these is unsigned, and that one need to think about whether these comparisons are signed or unsigned, along with the promotion/conversion rules. Since this is an easy to forget detail, this patch renames the variable to at least make it more obvious that this variable is not one of GNU history's public int variables, which are all signed. We don't actually need the only code that presently is affected by this, though, the code that is computing the current history's length. We can just use GNU history's history_length instead: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Variable: int history_length The number of entries currently stored in the history list. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* Return the history entry which is logically at OFFSET in the history array. OFFSET is relative to history_base. */ HIST_ENTRY * history_get (offset) int offset; { int local_index; local_index = offset - history_base; return (local_index >= history_length || local_index < 0 || the_history == 0) ? (HIST_ENTRY *)NULL : the_history[local_index]; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ At the time this code was added (gdb 4.13 ~1994), 'history_length' was extern, but not documented in readline's GNU history documents, so I guess it wasn't considered public then and the loop was the workaround. One of the warts of GDB choosing 0 to mean unlimited is that "set history size 0" behaves differently from 'HISTSIZE=0 gdb'. The latter leaves GDB with no history, while the former means "unlimited"... $ HISTSIZE=0 ./gdb ... (gdb) show history size The size of the command history is 0. We shouldn't really change what HISTSIZE=0 means, as bash, etc. also handle 0 as real zero, and zero it's what really makes sense. gdb/ 2013-03-27 Pedro Alves <palves@redhat.com> * top.c (history_size): Rename to ... (history_size_setshow_var): ... this. Add comment. (show_commands): Use readline's 'history_length' instead of computing the history length by calling history_get in a loop. (set_history_size_command): Error out for sizes over INT_MAX. Restore previous history size on invalid size. (init_history): If HISTSIZE is negative, leave the history size as zero. Add comments. (init_main): Adjust.