David S. Miller [Sat, 6 Apr 2013 22:22:03 +0000 (22:22 +0000)]
Increase the accuracy of sparc instruction aliases.
Make current with UA2011 specification.
Add an F_PREFERRED opcode flag that indicates a preferred alias
when multiple aliases for the same opcode exists.
For 'lzd':
Add 'lzcnt' as primary instruction, and make 'lzd' an alias.
Add 'ldtw', 'ldtwa', 'sttw', 'sttwa':
The modern opcode for for 'ldd', 'ldda', 'std', and 'stda' on
integer registers. Mark the latter now as aliases.
For 'flush':
Support "[address]" syntax as well as plain "address".
Rework 'mov' aliases for 'wr':
Eliminate bogus three operand moves, and encode the
instructions properly for the "mov REG, %ASR" cases,
specifically we should encode the register in rs2 not rs1 as
per The SPARC V8 Architecture Manual.
Add missing cbcond aliases:
c{w,x}bz, c{w,x}blu, c{w,x}bnz, c{w,x}bgeu
Add 'd' suffix VIS logical ops:
The primary opcode for 'fzero' is now 'fzerod' (compare with
'fzeros'), for example. And thus 'fzero' is now an alias.
Add modern opcodes for condition code setting edge instructions:
They are now edgeN{,l}cc instead of plain edgeN{,l}.
Add modern opcodes for VIS comparisons:
All VIS comparisons now start with prefix "fp", retain the
older variants as aliases.
The signed variants for equal and not-equal have "u" aliases
to show that these comparisons are equally suited for unsigned
compares.
Update existing test cases as needed, and add several new ones.
include/opcode/
* sparc.h (F_PREFERRED): Define.
(F_PREF_ALIAS): Define.
opcodes/
* sparc-dis.c (compare_opcodes): When encountering multiple aliases
of an opcode, prefer the one with F_PREFERRED set.
* sparc-opc.c (sparc_opcodes): Add ldtw, ldtwa, sttw, sttwa,
lzcnt, flush with '[address]' syntax, and missing cbcond pseudo
ops. Make 64-bit VIS logical ops have "d" suffix in their names,
mark existing mnenomics as aliases. Add "cc" suffix to edge
instructions generating condition codes, mark existing mnenomics
as aliases. Add "fp" prefix to VIS compare instructions, mark
existing mnenomics as aliases.
gas/testsuite/
* gas/sparc/cbcond.s: Add tests for new opcode aliases.
* gas/sparc/cbcond.d: Updated.
* gas/sparc/hpcvis3.s: Add tests for new opcode aliases.
* gas/sparc/hpcvis3.d: Updated.
* gas/sparc/v8-movwr-imm.d: Fix expected disassembly.
* gas/sparc/edge.s: New test.
* gas/sparc/edge.d: Expected disassembly.
* gas/sparc/flush.s: New test.
* gas/sparc/flush.d: Expected disassembly.
* gas/sparc/ldd_std.s: New test.
* gas/sparc/ldd_std.d: Expected disassembly.
* gas/sparc/ldtw_sttw.s: New test.
* gas/sparc/ldtw_sttw.d: Expected disassembly.
* gas/sparc/sparc.exp: Run new tests.
Jan Kratochvil [Sat, 6 Apr 2013 15:52:06 +0000 (15:52 +0000)]
gdb/doc/
* Makefile.in (POD2MAN1, POD2MAN5): Replace $(VERSION) by ../version.in.
Jan Kratochvil [Sat, 6 Apr 2013 08:58:53 +0000 (08:58 +0000)]
gdb/doc/
* gdb.texinfo (gdbserver man): Rename tty to comm. Swap --attach
parameters order. Remove "On some targets" for --attach. Document the
--multi parameter and extended-remote command. Document all the
options.
Eli Zaretskii [Sat, 6 Apr 2013 06:52:06 +0000 (06:52 +0000)]
Unbreak Windows-hosted cross debugger builds.
* windows-nat.c (windows_get_absolute_argv0): Move from here...
* mingw-hdep.c (windows_get_absolute_argv0): ...to here.
Include main.h.
* windows-nat.h (windows_get_absolute_argv0): Move prototype from
here...
* main.h (windows_get_absolute_argv0): ...to here.
Alan Modra [Sat, 6 Apr 2013 06:44:45 +0000 (06:44 +0000)]
* elf32-ppc.c (ppc_elf_check_relocs): Use SYMBOLIC_BIND.
* elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count): Likewise.
gdbadmin [Sat, 6 Apr 2013 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 5 Apr 2013 23:00:05 +0000 (23:00 +0000)]
daily update
Doug Evans [Fri, 5 Apr 2013 21:48:25 +0000 (21:48 +0000)]
* dwarf2read.c (struct dwarf2_per_objfile): Tweak comment.
(read_cutu_die_from_dwo): Add comments.
(read_structure_type): Update comment.
(read_enumeration_type, read_namespace_type): Update comment.
(read_die_type, get_die_type_at_offset, get_die_type): Update comment.
Jan Kratochvil [Fri, 5 Apr 2013 20:02:58 +0000 (20:02 +0000)]
gdb/doc/
* gdb.texinfo (gdb man): Mention option -p. Include Fortran to
the list of supported languages.
Jan Kratochvil [Fri, 5 Apr 2013 20:01:33 +0000 (20:01 +0000)]
gdb/
Convert man pages to texinfo, new gdbinit.5 texinfo page.
* Makefile.in (gdb.z): Remove.
(install-only): Remove $(man1dir) and gdb.1 installation.
* gdb.1: Remove.
gdb/gdbserver/
Convert man pages to texinfo, new gdbinit.5 texinfo page.
* Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
installation.
* gdbserver.1: Remove.
gdb/doc/
Convert man pages to texinfo, new gdbinit.5 texinfo page.
* Makefile.in (mandir, man1dir, man5dir, SYSTEM_GDBINIT, MANCONF,
(TEXI2POD, POD2MAN1, POD2MAN5, MAN1S, MAN5S, MANS, man): New.
(diststuff): Add man.
(install-man, install-man1, install-man5, uninstall-man, uninstall-man1)
(uninstall-man5): New.
(STAGESTUFF): Add *.1 and *.5.
(GDBvn.texi): Add SYSTEM_GDBINIT.
(gdb.1, gdbserver.1, gdbinit.5): New.
(maintainer-clean realclean): Add $(MANS).
(install): Add install-man.
(uninstall): Add uninstall-man.
* gdb.texinfo (@include gdb-cfg.texi): Wrap it by @c man begin INCLUDE.
(@copying): Wrap it by @c man begin COPYRIGHT.
(Top): Add Man Pages.
(Man Pages, gdb man, gdbserver man, gdbinit man): New.
Jan Kratochvil [Fri, 5 Apr 2013 19:17:15 +0000 (19:17 +0000)]
gdb/
Fix compatibility with Linux kernel 3.8.3.
* linux-tdep.c (linux_find_memory_regions_full): Move variable number
to more inner block. Remove parsing of NUMBER from outer block.
Parse NUMBER only if KEYWORD has been identified.
Jan Kratochvil [Fri, 5 Apr 2013 19:14:44 +0000 (19:14 +0000)]
gdb/
Fix variable name shadowing.
* linux-tdep.c (linux_find_memory_regions_full): Rename outer variable
filename to mapsfilename and update its uses.
Eli Zaretskii [Fri, 5 Apr 2013 13:24:24 +0000 (13:24 +0000)]
Avoid warning in "make tags".
* Makefile.in (TAGS): Avoid warning from etags when $GDB_NM_FILE is
empty. See http://sourceware.org/ml/gdb-patches/2012-08/msg00504.html
and http://sourceware.org/ml/gdb-patches/2013-04/msg00055.html for
details of the problem.
Nick Clifton [Fri, 5 Apr 2013 09:08:28 +0000 (09:08 +0000)]
* elflink.c (elf_link_add_object_symbols): Revert accidental commit.
Alan Modra [Fri, 5 Apr 2013 04:13:41 +0000 (04:13 +0000)]
PR binutils/15324
* configure.in: Add strnlen to AC_CHECK_DECLS, sort.
* dwarf.c (strnlen): Provide fallback decl.
* config.in: Regnerate.
* configure: Regenerate.
gdbadmin [Fri, 5 Apr 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 4 Apr 2013 23:00:05 +0000 (23:00 +0000)]
daily update
Sandra Loosemore [Thu, 4 Apr 2013 21:01:40 +0000 (21:01 +0000)]
2013-04-04 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.cp/cplabel.exp: Allow empty directory in file reported
for breakpoint location.
Sandra Loosemore [Thu, 4 Apr 2013 20:59:12 +0000 (20:59 +0000)]
2013-04-04 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.linespec/linespec.exp: Make dir/file:line tests
conditional for non-remote hosts only.
Pedro Alves [Thu, 4 Apr 2013 19:22:38 +0000 (19:22 +0000)]
tracepoint->step_count fixes
If a tracepoint's actions list includes a while-stepping action, and
then the actions are changed to a list without any while-stepping
action, the tracepoint's step_count will be left with a stale value.
For example:
(gdb) trace subr
Tracepoint 1 at 0x4004d9: file ../../../src/gdb/testsuite//actions-changed.c, line 31.
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
>collect $reg
>end
(gdb) set debug remote 1
(gdb) tstart
Sending packet: $QTinit#59...Packet received: OK
Sending packet: $QTDP:1:
00000000004004d9:E:0:0-#a3...Packet received: OK
Sending packet: $QTDP:-1:
00000000004004d9:R03FFFFFFFFFFFFFFFFFF#2b...Packet received: OK
(gdb) tstop
Sending packet: $QTStop#4b...Packet received: OK
Sending packet: $QTNotes:#e8...Packet received: OK
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
>collect $reg
>while-stepping 1
>collect $reg
>end
>end
(gdb) tstart
Sending packet: $QTinit#59...Packet received: OK
Sending packet: $QTDP:1:
00000000004004d9:E:1:0-#a4...Packet received: OK
Sending packet: $QTDP:-1:
00000000004004d9:R03FFFFFFFFFFFFFFFFFF-#58...Packet received: OK
Sending packet: $QTDP:-1:
00000000004004d9:SR03FFFFFFFFFFFFFFFFFF#7e...Packet received: OK
(gdb) tstop
Sending packet: $QTStop#4b...Packet received: OK
Sending packet: $QTNotes:#e8...Packet received: OK
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
>collect $regs
>end
(gdb) tstart
Sending packet: $QTinit#59...Packet received: OK
Sending packet: $QTDP:1:
00000000004004d9:E:1:0-#a4...Packet received: OK
Sending packet: $QTDP:-1:
00000000004004d9:R03FFFFFFFFFFFFFFFFFF#2b...Packet received: OK
The last "$QTDP:1:
00000000004004d9:E:1:0-#a4" should be "$QTDP:1:
00000000004004d9:E:0:0-#a3".
In pseudo-diff:
-$QTDP:1:
00000000004004d9:E:1:0-#a4
+$QTDP:1:
00000000004004d9:E:0:0-#a3
A related issue is that the "commands" command actually supports
setting commands to a range of breakpoints/tracepoints at once. But,
hacking "maint info breakpoints" to print t->step_count, reveals:
(gdb) trace main
Tracepoint 5 at 0x45a2ab: file ../../src/gdb/gdb.c, line 29.
(gdb) trace main
Note: breakpoint 5 also set at pc 0x45a2ab.
Tracepoint 6 at 0x45a2ab: file ../../src/gdb/gdb.c, line 29.
(gdb) commands 5-6
Type commands for breakpoint(s) 5-6, one per line.
End with a line saying just "end".
> while-stepping 5
>end
> end
(gdb) maint info breakpoints 5
Num Type Disp Enb Address What
5 tracepoint keep y 0x000000000045a2ab in main at ../../src/gdb/gdb.c:29 inf 1
step_count=5
^^^^^^^^^^^^
while-stepping 5
end
not installed on target
(gdb) maint info breakpoints 6
Num Type Disp Enb Address What
6 tracepoint keep y 0x000000000045a2ab in main at ../../src/gdb/gdb.c:29 inf 1
step_count=0
^^^^^^^^^^^^
while-stepping 5
end
not installed on target
(gdb)
that tracepoint 6 doesn't end up with the correct step_count.
The issue is that here:
static void
do_map_commands_command (struct breakpoint *b, void *data)
{
struct commands_info *info = data;
if (info->cmd == NULL)
{
struct command_line *l;
if (info->control != NULL)
l = copy_command_lines (info->control->body_list[0]);
else
{
struct cleanup *old_chain;
char *str;
str = xstrprintf (_("Type commands for breakpoint(s) "
"%s, one per line."),
info->arg);
old_chain = make_cleanup (xfree, str);
l = read_command_lines (str,
info->from_tty, 1,
(is_tracepoint (b)
? check_tracepoint_command : 0),
b);
do_cleanups (old_chain);
}
info->cmd = alloc_counted_command_line (l);
}
validate_actionline is never called for tracepoints other than the
first (the copy_command_lines path). Right below, we have:
/* If a breakpoint was on the list more than once, we don't need to
do anything. */
if (b->commands != info->cmd)
{
validate_commands_for_breakpoint (b, info->cmd->commands);
incref_counted_command_line (info->cmd);
decref_counted_command_line (&b->commands);
b->commands = info->cmd;
observer_notify_breakpoint_modified (b);
}
And validate_commands_for_breakpoint looks like the right place to put
a call; if we reset step_count there too, we have a nice central fix
for the first issue as well, because trace_actions_command calls
breakpoint_set_commands that also calls
validate_commands_for_breakpoint.
We end up calling validate_actionline twice for the first tracepoint,
since read_command_lines calls it too, through
check_tracepoint_command, but that should be harmless.
2013-04-04 Pedro Alves <palves@redhat.com>
Hui Zhu <hui@codesourcery.com>
* breakpoint.c (validate_commands_for_breakpoint): If validating a
tracepoint, reset its STEP_COUNT and call validate_actionline.
2013-04-04 Stan Shebs <stan@codesourcery.com>
Pedro Alves <palves@redhat.com>
* gdb.trace/Makefile.in (PROGS): Add actions-changed.
* gdb.trace/actions-changed.c: New file.
* gdb.trace/actions-changed.exp: New file.
* lib/trace-support.exp (gdb_trace_setactions): Rename to ...
(gdb_trace_setactions_command): ... this. Add "actions_command"
parameter, and handle it.
(gdb_trace_setactions, gdb_trace_setcommands): New procedures.
Ian Lance Taylor [Thu, 4 Apr 2013 16:49:04 +0000 (16:49 +0000)]
GCC PR c++/56840
* object.cc (do_layout_deferred_sections): Handle .eh_frame
sections before checking whether they are included in the link.
Alan Modra [Thu, 4 Apr 2013 14:51:48 +0000 (14:51 +0000)]
* ld-elf/shared.exp: Update regexp on --no-add-needed and
--no-copy-dt-needed-entries tests.
Alan Modra [Thu, 4 Apr 2013 14:38:47 +0000 (14:38 +0000)]
* ldlang.c (load_symbols): Report "error adding symbols" on
bfd_link_add_symbols failure.
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Likewise.
* emultempl/sunos.em (gld${EMULATION_NAME}_after_open): Likewise.
(gld${EMULATION_NAME}_try_needed): Likewise.
Alan Modra [Thu, 4 Apr 2013 14:38:01 +0000 (14:38 +0000)]
* bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
* bfd-in2.h: Regenerate.
* elflink.c (elf_link_add_object_symbols): Use new error.
Nick Clifton [Thu, 4 Apr 2013 07:24:08 +0000 (07:24 +0000)]
oops - omitted from previous delta
Yao Qi [Thu, 4 Apr 2013 02:16:04 +0000 (02:16 +0000)]
gdb/testsuite/
* gdb.server/server-kill.exp: Use command 'tstatus' instead of
'step'.
DJ Delorie [Thu, 4 Apr 2013 01:03:01 +0000 (01:03 +0000)]
merge from gcc
gdbadmin [Thu, 4 Apr 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Wed, 3 Apr 2013 23:00:04 +0000 (23:00 +0000)]
daily update
Doug Evans [Wed, 3 Apr 2013 19:45:00 +0000 (19:45 +0000)]
* dwarf2read.c (read_die_and_siblings_1): Renamed from
read_die_and_siblings.
(read_die_and_siblings): New function.
(read_cutu_die_from_dwo): Dump die if requested.
(read_die_and_children): Call read_full_die_1 and
read_die_and_siblings_1.
(read_full_die): Dump die if requested.
* dwarf2read.c (read_comp_units_from_section): Add debugging printf.
Doug Evans [Wed, 3 Apr 2013 19:11:01 +0000 (19:11 +0000)]
* dwarf2read.c (struct dwo_file): New member comp_dir.
Rename member name to dwo_name. All uses updated.
(hash_dwo_file): Include comp_dir in computation.
(eq_dwo_file): Ditto.
(lookup_dwo_file_slot): New arg comp_dir. All callers updated.
(create_dwo_in_dwp, lookup_dwo_in_dwp, open_and_init_dwo_file): Ditto.
Doug Evans [Wed, 3 Apr 2013 18:48:54 +0000 (18:48 +0000)]
* psymtab.c (read_psymtabs_with_fullname): Don't call
psymtab_to_fullname if the basenames are different.
Jan Kratochvil [Wed, 3 Apr 2013 18:28:49 +0000 (18:28 +0000)]
gdb/
* NEWS (Changes in GDB 7.6): Update the data-disassemble for "fullname".
New entry about "fullname" presence.
DJ Delorie [Wed, 3 Apr 2013 18:21:49 +0000 (18:21 +0000)]
merge from gcc
Pedro Alves [Wed, 3 Apr 2013 18:04:33 +0000 (18:04 +0000)]
NEWS: Mention x86_64/Cygwin as new native configuration too.
x86_64/Cygwin is only mentioned as a new target, but we gained support
for building a native x86_64/Cygwin debugger too.
gdb/
2013-04-03 Pedro Alves <palves@redhat.com>
* NEWS: Mention x86_64/Cygwin as new native configuration.
Nick Clifton [Wed, 3 Apr 2013 14:42:10 +0000 (14:42 +0000)]
* elf32-v850.c (v850_elf_is_target_special_symbol): New function.
(bfd_elf32_bfd_is_target_special_symbol): Define.
* v850.h (V850_INVERSE_PCREL): Define.
* v850-dis.c (print_value): With V850_INVERSE_PCREL compute the
destination address by subtracting the operand from the current
address.
* v850-opc.c (insert_u16_loop): Disallow negative offsets. Store
a positive value in the insn.
(extract_u16_loop): Do not negate the returned value.
(D16_LOOP): Add V850_INVERSE_PCREL flag.
(ceilf.sw): Remove duplicate entry.
(cvtf.hs): New entry.
(cvtf.sh): Likewise.
(fmaf.s): Likewise.
(fmsf.s): Likewise.
(fnmaf.s): Likewise.
(fnmsf.s): Likewise.
(maddf.s): Restrict to E3V5 architectures.
(msubf.s): Likewise.
(nmaddf.s): Likewise.
(nmsubf.s): Likewise.
Nick Clifton [Wed, 3 Apr 2013 14:21:18 +0000 (14:21 +0000)]
* elf64-aarch64.c (elf64_aarch64_gc_sweep_hook): Use
elf64_aarch64_locals to get local GOT reference counts.
* ld-aarch64/gc-relocs-tlsle.s: New gc section test.
* ld-aarch64/gc-relocs-tlsle.s: Likewise
* ld-aarch64/gc-relocs-tlsgd.s: Likewise
* ld-aarch64/gc-relocs-tlsdesc.s: Likewise
* ld-aarch64/gc-relocs-312.s: Likewise
* ld-aarch64/gc-relocs-311.s: Likewise
* ld-aarch64/gc-relocs-309.s: Likewise
* ld-aarch64/gc-start.s: Likewise
* ld-aarch64/gc-got-relocs.d: Update expected objdump
* ld-aarch64/gc-tls-relocs.d: Likewise
* ld-aarch64/aarch64-elf.exp: add test
Alan Modra [Wed, 3 Apr 2013 11:44:41 +0000 (11:44 +0000)]
PR ld/15227
* ld-plugin/lto.exp (PR ld/12942 (3)): Remove file name and
line number from regexp.
(PR ld/15146 (2)): Similarly.
* ld-plugin/pr12942a.cc (main): Use __builtin_abort.
Yao Qi [Wed, 3 Apr 2013 10:11:46 +0000 (10:11 +0000)]
gdb/testsuite/
* gdb.trace/mi-traceframe-changed.exp: Update tfile name to
"tfile-basic.tf".
(test_tfind_tfile): Likewise.
Yao Qi [Wed, 3 Apr 2013 03:43:54 +0000 (03:43 +0000)]
gdb/testsuite/
* 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".
Alan Modra [Wed, 3 Apr 2013 02:48:37 +0000 (02:48 +0000)]
* doc/as.texinfo: Add support to generate man options for h8300.
* doc/c-h8300.texi: Likewise.
Sandra Loosemore [Wed, 3 Apr 2013 01:40:19 +0000 (01:40 +0000)]
2013-04-02 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.cp/ovsrch.exp (test_class): Correct regexp to allow
empty directory in file for breakpoint hit.
gdbadmin [Wed, 3 Apr 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
DJ Delorie [Tue, 2 Apr 2013 23:29:51 +0000 (23:29 +0000)]
* elf32-rl78.c (GET_RELOC): Assert that there are relocs to get.
(rl78_elf_relax_section): Only fetch the next reloc if there is
one expected.
Alan Modra [Tue, 2 Apr 2013 23:00:05 +0000 (23:00 +0000)]
daily update
Doug Evans [Tue, 2 Apr 2013 21:18:40 +0000 (21:18 +0000)]
* dwarf2read.c (read_structure_type): Fix typo in comment.
Pedro Alves [Tue, 2 Apr 2013 17:52:08 +0000 (17:52 +0000)]
NEWS/manual: Missing documentation for new commands in 7.6.
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".
Pedro Alves [Tue, 2 Apr 2013 17:48:49 +0000 (17:48 +0000)]
Add missing NEWS and manual bits for "set trace-buffer-size".
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".
Eli Zaretskii [Tue, 2 Apr 2013 17:44:27 +0000 (17:44 +0000)]
Fix list of files submitted to "make TAGS".
* Makefile.in (HFILES_NO_SRCDIR): Remove call-cmds.h.
gdb_string.h is now in common/.
Pedro Alves [Tue, 2 Apr 2013 15:19:07 +0000 (15:19 +0000)]
NEWS: Move "set debug notification" and "set trace-buffer-size" under "New 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".
Jan Kratochvil [Tue, 2 Apr 2013 14:09:08 +0000 (14:09 +0000)]
gdb/
Revert this patch:
PR gdb/15275
* remote.c (remote_get_trace_status): Include putpkt in TRY_CATCH.
Pedro Alves [Tue, 2 Apr 2013 13:51:07 +0000 (13:51 +0000)]
unpush the remote target if serial_write fails.
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.
Jiong Wang [Tue, 2 Apr 2013 02:49:55 +0000 (02:49 +0000)]
gdb/ChangeLog:
* NEWS: Mention TILE-Gx in "New native configurations" and
"New targets" sections.
gdbadmin [Tue, 2 Apr 2013 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Doug Evans [Mon, 1 Apr 2013 23:17:40 +0000 (23:17 +0000)]
* dwarf2read.c (lookup_signatured_type_at_offset): Delete.
(process_enumeration_scope): Simplify.
Alan Modra [Mon, 1 Apr 2013 23:00:05 +0000 (23:00 +0000)]
daily update
Doug Evans [Mon, 1 Apr 2013 22:36:08 +0000 (22:36 +0000)]
* dwarf2read.c (struct dwarf2_per_cu_data): Move member
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.
Aleksandar Ristovski [Mon, 1 Apr 2013 20:11:19 +0000 (20:11 +0000)]
Fix whitespace errors from last commit.
Doug Evans [Mon, 1 Apr 2013 16:42:15 +0000 (16:42 +0000)]
* dwarf2read.c (free_dwo_file): Add comment.
(dwarf2_per_objfile_free): Unref dwp bfd.
Aleksandar Ristovski [Mon, 1 Apr 2013 12:53:01 +0000 (12:53 +0000)]
Fix coff-pe-read.c to compile with Wunused.
* 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
Aleksandar Ristovski [Mon, 1 Apr 2013 12:48:03 +0000 (12:48 +0000)]
Cleanup: remove unused - breakpoint, buildsym
* 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
Tiago Daitx [Mon, 1 Apr 2013 04:05:35 +0000 (04:05 +0000)]
gdb/ChangeLog
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.
gdbadmin [Mon, 1 Apr 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 31 Mar 2013 23:00:05 +0000 (23:00 +0000)]
daily update
Mike Frysinger [Sun, 31 Mar 2013 00:39:35 +0000 (00:39 +0000)]
sim: frv/m32r: back out hard failure when dv-sockser is not available
These sims have optional support for the dv-sockser model, so do not make
them hard failures. The Makefile made it seem like they didn't actually
support things dynamically, but a further code dive into the source and
the Makefile shows that things work out.
gdbadmin [Sun, 31 Mar 2013 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sat, 30 Mar 2013 23:00:05 +0000 (23:00 +0000)]
daily update
Alan Modra [Sat, 30 Mar 2013 10:14:15 +0000 (10:14 +0000)]
PR ld/15323
bfd/
* elf-m10300.c (mn10300_elf_check_relocs): Set non_ir_ref for
global symbols referenced by relocs.
* elf32-arm.c (elf32_arm_check_relocs): Likewise.
* elf32-bfin.c (bfin_check_relocs): Likewise.
* elf32-cr16.c (cr16_elf_check_relocs): Likewise.
* elf32-cris.c (cris_elf_check_relocs): Likewise.
* elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
* elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
* elf32-fr30.c (fr30_elf_check_relocs): Likewise.
* elf32-frv.c (elf32_frv_check_relocs): Likewise.
* elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
* elf32-i370.c (i370_elf_check_relocs): Likewise.
* elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
* elf32-lm32.c (lm32_elf_check_relocs): Likewise.
* elf32-m32c.c (m32c_elf_check_relocs): Likewise.
* elf32-m32r.c (m32r_elf_check_relocs): Likewise.
* elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
* elf32-m68k.c (elf_m68k_check_relocs): Likewise.
* elf32-mcore.c (mcore_elf_check_relocs): Likewise.
* elf32-metag.c (elf_metag_check_relocs): Likewise.
* elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
* elf32-moxie.c (moxie_elf_check_relocs): Likewise.
* elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
* elf32-mt.c (mt_elf_check_relocs): Likewise.
* elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
* elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
* elf32-ppc.c (ppc_elf_check_relocs): Likewise.
* elf32-rl78.c (rl78_elf_check_relocs): Likewise.
* elf32-s390.c (elf_s390_check_relocs): Likewise.
* elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
* elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
* elf32-sh.c (sh_elf_check_relocs): Likewise.
* elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
* elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
* elf32-v850.c (v850_elf_check_relocs): Likewise.
* elf32-vax.c (elf_vax_check_relocs): Likewise.
* elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
* elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
* elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
* elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
* elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
* elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
* elf64-mmix.c (mmix_elf_check_relocs): Likewise.
* elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
* elf64-s390.c (elf_s390_check_relocs): Likewise.
* elf64-sh64.c (sh_elf64_check_relocs): Likewise.
* elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
* elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. Don't
test indirect/warning links for NULL.
ld/testsuite/
* ld-plugin/lto.exp (pr15323a.c): Compile without -flto rather
than using -r to effectively strip out lto info.
Sriraman Tallam [Sat, 30 Mar 2013 01:03:23 +0000 (01:03 +0000)]
2013-03-29 Sriraman Tallam <tmsriram@google.com>
* archive.cc (Archive::get_elf_object_for_member): Create the elf
object before calling the plugin claim_file handler. Pass the elf
object of the archive to the plugin. Delete the elf object if the
plugin claims the file.
H.J. Lu [Sat, 30 Mar 2013 00:38:39 +0000 (00:38 +0000)]
Set non_ir_ref if a symbol is referenced by a non-shared object
bfd/
PR ld/15323
* elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a
symbol is referenced by a non-shared object.
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
ld/testsuite/
PR ld/15323
* ld-plugin/lto.exp (lto_link_tests): Add pr15323a-r.o.
(lto_run_tests): Add a test for PR ld/15323.
* ld-plugin/pr15323.out: New file.
* ld-plugin/pr15323a.c: Likewise.
* ld-plugin/pr15323b.c: Likewise.
gdbadmin [Sat, 30 Mar 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 29 Mar 2013 23:00:05 +0000 (23:00 +0000)]
daily update
Doug Evans [Fri, 29 Mar 2013 21:47:51 +0000 (21:47 +0000)]
* dwarf2read.c (open_dwo_file): Renamed from open_dwop_file.
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.
Doug Evans [Fri, 29 Mar 2013 21:42:04 +0000 (21:42 +0000)]
* dwarf2read.c (open_and_init_dwp_file): Remove incorrect, and
unnecessary, cleanup.
H.J. Lu [Fri, 29 Mar 2013 20:42:48 +0000 (20:42 +0000)]
Increment hdrptr by 8 after SAFE_BYTE_GET64
* dwarf.c (process_debug_info): Increment hdrptr by 8 after
SAFE_BYTE_GET64.
Doug Evans [Fri, 29 Mar 2013 18:46:07 +0000 (18:46 +0000)]
* dwarf2read.c (lookup_dwo_cutu): Improve complaint text.
Doug Evans [Fri, 29 Mar 2013 17:48:48 +0000 (17:48 +0000)]
* dwarf2read.c (read_cutu_die_from_dwo): New function.
(lookup_dwo_unit): New function.
(init_cutu_and_read_dies): Move DWO handling to new functions.
Doug Evans [Fri, 29 Mar 2013 16:55:57 +0000 (16:55 +0000)]
* dwarf2read.c (struct signatured_type): Tweak comment.
(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.
Doug Evans [Fri, 29 Mar 2013 16:38:52 +0000 (16:38 +0000)]
* dwarf2read.c (lookup_signatured_type): Remove complaint about
missing .debug_types section.
Yao Qi [Fri, 29 Mar 2013 15:21:23 +0000 (15:21 +0000)]
gdb/
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".
Joel Brobecker [Fri, 29 Mar 2013 02:04:15 +0000 (02:04 +0000)]
Ignore __fu<digits>__ symbols from COFF symbol tables
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.
Doug Evans [Fri, 29 Mar 2013 00:35:20 +0000 (00:35 +0000)]
* dwarf2read.c (create_debug_types_hash_table): Don't allocate the
types hash table until we know we need it.
Doug Evans [Fri, 29 Mar 2013 00:18:32 +0000 (00:18 +0000)]
* dwarf2read.c (create_addrmap_from_index): Complain about bad CU
index numbers.
Doug Evans [Fri, 29 Mar 2013 00:11:10 +0000 (00:11 +0000)]
* dwarf2read.c (dw2_get_file_names): Delete arg "objfile".
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.
gdbadmin [Fri, 29 Mar 2013 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Kaz Kojima [Thu, 28 Mar 2013 23:52:44 +0000 (23:52 +0000)]
* elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
R_SH_REL32 relocations against undefined weak symbols.
Alan Modra [Thu, 28 Mar 2013 23:00:05 +0000 (23:00 +0000)]
daily update
Doug Evans [Thu, 28 Mar 2013 22:59:47 +0000 (22:59 +0000)]
* dwarf2read.c (struct dwarf2_per_cu_data): Rename member
info_or_types_section to section. All uses updated.
(struct dwo_unit): Ditto.
Pedro Alves [Thu, 28 Mar 2013 21:58:03 +0000 (21:58 +0000)]
Stop sending qTStatus if the target doesn't recognize it; add packet 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".
Eli Zaretskii [Thu, 28 Mar 2013 21:07:56 +0000 (21:07 +0000)]
Fix Doug Evans's commit of 2013-03-21.
* gdb.texinfo (Maintenance Commands): Use @enumerate, not "@table
@bullet", which is invalid (makeinfo 5.1 barfs).
Doug Evans [Thu, 28 Mar 2013 18:17:38 +0000 (18:17 +0000)]
* symfile.c (find_separate_debug_file): Add comment.
(terminate_after_last_dir_separator): Tweak comment.
Doug Evans [Thu, 28 Mar 2013 17:41:03 +0000 (17:41 +0000)]
* dwarf2read.c (create_partial_symtab): Add forward decl.
(create_partial_symtab): Move to be closer to other psymtab functions.
(process_psymtab_comp_unit_reader, process_psymtab_comp_unit): Ditto.
Doug Evans [Thu, 28 Mar 2013 17:35:01 +0000 (17:35 +0000)]
* dwarf2read.c (dwarf2_physname): Move declaration to better spot.
(compute_symtab_includes): Remove unnecessary forward declaration.
(die_needs_namespace): Add comment marking group of functions for
dwarf2 name computation.
Doug Evans [Thu, 28 Mar 2013 17:25:47 +0000 (17:25 +0000)]
* typeprint.c (_initialize_typeprint): Improve type help text.
Doug Evans [Thu, 28 Mar 2013 16:39:09 +0000 (16:39 +0000)]
* python/python.c (finish_python_initialization): Provide suggestion
for how to tell gdb to find its python files.
Alan Modra [Thu, 28 Mar 2013 13:36:32 +0000 (13:36 +0000)]
* elf64-ppc.c (struct ppc_dyn_relocs): New.
(ppc64_elf_check_relocs): Separate dynrel counts for local syms
into ifunc and non-ifunc.
(dec_dynrel_count): Pass in sym rather than sym_sec. Handle
separate ifunc/non-ifunc dynrel counts.
(allocate_got): Always use reliplt for ifunc.
(allocate_dynrelocs): Likewise.
(ppc64_elf_size_dynamic_sections): Likewise.
(ppc64_elf_layout_multitoc): Likewise.
(ppc64_elf_relocate_section): Likewise.
Pedro Alves [Thu, 28 Mar 2013 11:57:47 +0000 (11:57 +0000)]
Fix PR gdb/15294: list with unlimited listsize broken
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.
Pedro Alves [Thu, 28 Mar 2013 11:56:51 +0000 (11:56 +0000)]
list.exp: Avoid hardcoding line numbers.
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".
Pedro Alves [Thu, 28 Mar 2013 11:56:15 +0000 (11:56 +0000)]
list.exp: Adjust "set listsize -1" to current test source's real line count.
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.
Pedro Alves [Thu, 28 Mar 2013 11:55:40 +0000 (11:55 +0000)]
list.exp: Catch "set listsize" failures (and "set listsize -1/0"'s history).
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".