This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash on new testcase gdb.dwarf2/pr13961.exp [Re: Crash regression for gdb.ada/*.exp]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]