This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Crash on new testcase gdb.dwarf2/pr13961.exp [Re: Crash regression for gdb.ada/*.exp]
- From: Doug Evans <dje at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org, ccoutant at google dot com, saugustine at google dot com
- Date: Wed, 2 May 2012 23:54:37 -0700
- Subject: Re: Crash on new testcase gdb.dwarf2/pr13961.exp [Re: Crash regression for gdb.ada/*.exp]
- References: <20120418185511.0AED52461AF@ruffy.mtv.corp.google.com> <878vhi6vq1.fsf@fleche.redhat.com> <CADPb22Q5XrOSbBgGMdgQGOKaxRVaNhYaqCJ1oP5A50x=uKpUrg@mail.gmail.com> <20120429090455.GA9848@host2.jankratochvil.net> <CADPb22SpOkSM7Lehn3c1i=2_nSEvmDx48bQZ-iP5BUuxB0YtXQ@mail.gmail.com> <20120430013711.GA3186@host2.jankratochvil.net> <CADPb22S7nBGM9mz8ZHs7ghXE0zUitCZOhUM55tBnAqg_0uRqNQ@mail.gmail.com> <20120502231930.GA626@host2.jankratochvil.net>
On Wed, May 2, 2012 at 4:19 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Mon, 30 Apr 2012 18:55:07 +0200, Doug Evans wrote:
>> Can you check that it fixes the regression for you?
>
> This new testcase crashes with gdbindex:
Serendipity.
Fixed with this:
2012-05-02 Doug Evans <dje@google.com>
* dwarf2read.c (dw2_find_symbol_file): Don't crash if there are no
files.
http://sourceware.org/ml/gdb-cvs/2012-05/msg00020.html
Testcase enhanced with this:
2012-05-02 Doug Evans <dje@google.com>
* gdb.dwarf2/pr13961.S: Add file and source location, but leave
commented out.
http://sourceware.org/ml/gdb-cvs/2012-05/msg00021.html
> Program terminated with signal 11, Segmentation fault.
> #0 ?0x000000000076e857 in dw2_find_symbol_file (objfile=0x3321c90, name=0x32f8d50 "main") at dwarf2read.c:2839
> 2839 ? ? ?return file_data->file_names[file_data->num_file_names - 1];
> (gdb) p file_data->num_file_names
> $2 = 0
> (gdb) bt
> #0 ?0x000000000076e857 in dw2_find_symbol_file (objfile=0x3321c90, name=0x32f8d50 "main") at dwarf2read.c:2839
> #1 ?0x00000000006db9b0 in find_main_filename () at symtab.c:1861
> #2 ?0x00000000006e8524 in set_initial_language () at symfile.c:1676
> #3 ?0x00000000006e784e in symbol_file_add_main_1 (args=0x32f8db0 "/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.dwarf2/pr13961.x", from_tty=1, flags=8) at symfile.c:1242
> #4 ?0x00000000006e84ae in symbol_file_command (args=0x2e3e415 "/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.dwarf2/pr13961.x", from_tty=1) at symfile.c:1640
> #5 ?0x0000000000751890 in file_command (arg=0x2e3e415 "/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.dwarf2/pr13961.x", from_tty=1) at exec.c:365
>
>
>> ? ? ? ? * gdb.dwarf2/pr13961.S: New file.
>> ? ? ? ? * gdb.dwarf2/pr13961.exp: New file.
>
> I see I missed the testfile name only as a PR, which is hard to remember.
>
>
> Thanks,
> Jan