* Crash in gdb
@ 2009-06-08 12:00 Dmitry Smirnov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Smirnov @ 2009-06-08 12:00 UTC (permalink / raw)
To: gdb
Hi,
I had encountered a problem with running gdb-6.8.50.20090603.
It is configured as ./configure --target arm-elf --with-x=no --disable-tui
I would like to note that there no such a problem with gdb-6.8.50.20090412 or gdb-6.8.50.20080630.
I have tried to simulate CDT's commands with interpreter-exec to check what happens:
GNU gdb (GDB) 6.8.50.20090603
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Setting up the environment for debugging gdb.
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; i
nput not from terminal]
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; i
nput not from terminal]
/cygdrive/d/Install/GDB/gdb-6.8.50.20090603/gdb/.gdbinit:8: Error in sourced com
mand file:
No breakpoint number 0.
(gdb) file /cygdrive/c/p4/views/my.elf
warning: unknown ARM EABI version 0x2000000
warning: unknown ARM EABI version 0x2000000
Reading symbols from /cygdrive/c/p4/views/my.elf.
..warning: Loadable segment "INTERNAL_BOOT_RAM_1" outside of ELF segments
warning: Loadable segment "INTERNAL_BOOT_RAM_2" outside of ELF segments
warning: Loadable segment "FILL_PAD_4" outside of ELF segments
done.
(gdb) help interpreter-exec
Execute a command in an interpreter. It takes two arguments:
The first argument is the name of the interpreter to use.
The second argument is the command to execute.
(gdb) interpreter-exec mi "-gdb-set auto-solib-add on"
^done
(gdb)
(gdb) interpreter-exec mi "-environment-directory C:/p4/views"
^done,source-path="C:/p4/views:$cdir:$cwd"
(gdb)
(gdb) interpreter-exec mi "-target-select remote localhost:1234"
&"warning: unknown ARM EABI version 0x2000000\n"
^connected,frame={addr="0xffff0000",func="??",args=[]}
(gdb)
(gdb) interpreter-exec mi "-break-insert -t tmc_init"
&"During symbol reading, DW_AT_type missing from DW_TAG_subrange_type.\n"
5 [main] gdb 3044 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_VIO
LATION
5967 [main] gdb 3044 open_stackdumpfile: Dumping stack trace to gdb.exe.stack
dump
Is there any chance to fix this?
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: Crash in gdb
@ 2009-06-08 15:36 Richard Earnshaw
0 siblings, 0 replies; 3+ messages in thread
From: Richard Earnshaw @ 2009-06-08 15:36 UTC (permalink / raw)
To: Dmitry Smirnov, gdb
> I had encountered a problem with running gdb-6.8.50.20090603.
> It is configured as ./configure --target arm-elf --with-x=no --disable-tui
> I would like to note that there no such a problem with gdb-6.8.50.20090412 or gdb-6.8.50.20080630.
> warning: unknown ARM EABI version 0x2000000
This suggests you are using an old version of ARM's toolchain. That's not supported in GDB.
R.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Crash in gdb
@ 2009-06-10 16:31 Dmitry Smirnov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Smirnov @ 2009-06-10 16:31 UTC (permalink / raw)
To: gdb
I had compiled GDB with -O0 and found the following:
While reading some function info (read_func_scope), GDB tries to inherit some abstract dies (inherit_abstract_dies)
When handling children of this die (function), it follows to another compilation unit.
The first child is a "void" with DW_TAG_base_type.
process_die() attempts to create a new symbol using that "another compilation unit".
This process crashes, since compilation unit does not have cu->list_in_scope (it is NULL).
What could be wrong with that compilation unit? When list_in_scope is initialized with non-NULL?
Perhaps toolchain (ADS 1.2) does not follow some DWARF specs, but maybe I could just find some fix for it...
Here is the stack (it is more informative, since I was turned -O0
GDB Cygwin GCC (1) [C/C++ Application]
Cygwin gdb Debugger (09.06.09 19:24) (Suspended)
Thread [1] (Suspended: Breakpoint hit.)
57 add_symbol_to_list() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\buildsym.c:132 0x0054ade4
56 new_symbol() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:7888 0x0050b078
55 process_die() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2867 0x005019b5
54 inherit_abstract_dies() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:3181
0x005023b3
53 read_func_scope() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:3247 0x005025ee
52 process_die() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2828 0x00501941
51 read_file_scope() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:3051 0x00501f45
50 process_die() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2825 0x0050192a
49 process_full_comp_unit() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2792
0x00501834
48 process_queue() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2591 0x005012da
47 psymtab_to_symtab_1() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2671 0x005014ce
46 dwarf2_psymtab_to_symtab() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2544
0x005011f2
45 psymtab_to_symtab() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symfile.c:290 0x0040463e
44 lookup_symbol_aux_psymtabs() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1540
0x0046d6b4
43 lookup_symbol_global() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1660 0x0046d93b
42 basic_lookup_symbol_nonlocal() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1617
0x0046d83c
41 lookup_symbol_aux() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1345 0x0046d223
40 lookup_symbol_in_language() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1254
0x0046d03c
39 lookup_symbol() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1268 0x0046d081
38 find_imps() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\objc-lang.c:1319 0x004d9402
37 decode_objc() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\linespec.c:1129 0x004ab945
36 decode_line_1() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\linespec.c:746 0x004ab185
35 parse_breakpoint_sals() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\breakpoint.c:5556
0x0044c6b2
34 do_captured_parse_breakpoint() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\breakpoint.c:5592
0x0044c7c2
33 catch_exception() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:462 0x004142a8
32 break_command_really() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\breakpoint.c:5709
0x0044cac3
31 set_breakpoint() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\breakpoint.c:5887 0x0044cfeb
30 mi_cmd_break_insert() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-cmd-break.c:156
0x0054abbb
29 mi_cmd_execute() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-main.c:1369 0x00547626
28 captured_mi_execute_command() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-main.c:1176
0x00546fb6
27 catch_exception() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:462 0x004142a8
26 mi_execute_command() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-main.c:1270 0x00547227
25 mi_execute_command_wrapper() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-interp.c:251
0x004b65d1
24 mi_interpreter_exec() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-interp.c:164
0x004b6439
23 interp_exec() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\interps.c:326 0x0041ef52
22 interpreter_exec_cmd() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\interps.c:403 0x0041f17f
21 do_cfunc() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\cli\cli-decode.c:67 0x0043285b
20 cmd_func() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\cli\cli-decode.c:1734 0x00434f12
19 execute_command() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\top.c:442 0x00402767
18 command_handler() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:511 0x0042787d
17 command_line_handler() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:735 0x00427e96
16 rl_callback_read_char() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\readline\callback.c:205
0x005c25b3
15 rl_callback_read_char_wrapper() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:178
0x00426fcb
14 stdin_event_handler() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:433 0x00427747
13 handle_file_event() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-loop.c:812 0x00443ed7
12 process_event() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-loop.c:394 0x004436bd
11 gdb_do_one_event() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-loop.c:459 0x00443799
10 catch_errors() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:510 0x004144c7
9 start_event_loop() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-loop.c:483 0x004437dc
8 cli_command_loop() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:211 0x004270f4
7 current_interp_command_loop() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\interps.c:293
0x0041eec3
6 captured_command_loop() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\main.c:226 0x004012e9
5 catch_errors() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:510 0x004144c7
4 captured_main() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\main.c:902 0x0040223f
3 catch_errors() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:510 0x004144c7
2 gdb_main() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\main.c:911 0x00402275
1 main() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\gdb.c:33 0x004010ba
Thread [2] (Suspended)
gdb (09.06.09 19:24)
D:\Install\GDB\gdb-6.8.50.20090603\gdb\gdb.exe (09.06.09 19:24)
-----Original Message-----
From: Dmitry Smirnov <divis1969@mail.ru>
To: Richard Earnshaw <member@buzzard.freeserve.co.uk>
Date: Mon, 08 Jun 2009 20:18:54 +0400
Subject: Re[2]: Crash in gdb
> yes it is true, but should it just crash in this case?
>
> In fact, previous gdb vesrions are handling this elf very good despite the fact that version is not supported (I'm using
ADS
> 1.2 toolchain)
>
> Below is the stack I've got while debugging in Eclipse CDT.
> It crashes at buildsym.c:132
> if (*listhead == NULL || (*listhead)->nsyms == PENDINGSIZE)
>
> In my case listhead is NULL.
> Whethere NULL is invalid value and problem is somewhere before or this line need additional check, that is the question for
> the moment... Any help is appreciated.
>
> Thread [1] (Suspended: Signal 'SIGSEGV' received. Description: Segmentation fault.)
> 43 add_symbol_to_list() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\buildsym.c:132 0x0051ca1d
> 42 new_symbol() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:7913 0x004e8c9c
> 41 process_die() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2893 0x004ea2e3
> 40 process_die() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:3181 0x004eb449
> 39 process_die() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:3051 0x004ead00
> 38 psymtab_to_symtab_1() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2792 0x004ebbc2
> 37 dwarf2_psymtab_to_symtab() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\dwarf2read.c:2544 0x004ebdad
> 36 psymtab_to_symtab() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symfile.c:290 0x00404296
> 35 lookup_symbol_aux_psymtabs() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1540 0x00464f68
> 34 lookup_symbol_in_language() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1345 0x00465414
> 33 lookup_symbol() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\symtab.c:1268 0x00465542
> 32 find_imps() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\objc-lang.c:1319 0x004c1535
> 31 decode_objc() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\linespec.c:1129 0x0049a968
> 30 decode_line_1() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\linespec.c:746 0x0049b796
> 29 do_captured_parse_breakpoint() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\breakpoint.c:5556 0x004447d0
> 28 catch_exception() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:462 0x00412142
> 27 break_command_really() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\breakpoint.c:5709 0x004466a8
> 26 set_breakpoint() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\breakpoint.c:5887 0x004471b8
> 25 mi_cmd_break_insert() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-cmd-break.c:162 0x0051c7f9
> 24 captured_mi_execute_command() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-main.c:1369 0x00519c37
> 23 catch_exception() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:462 0x00412142
> 22 mi_execute_command() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-main.c:1270 0x00519499
> 21 mi_execute_command_wrapper() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-interp.c:251 0x004a4729
> 20 mi_interpreter_exec() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\mi\mi-interp.c:164 0x004a4773
> 19 interp_exec() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\interps.c:326 0x0041c78b
> 18 interpreter_exec_cmd() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\interps.c:403 0x0041c869
> 17 execute_command() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\top.c:442 0x00402507
> 16 command_handler() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:511 0x00424b0f
> 15 command_line_handler() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:741 0x00424e3f
> 14 rl_callback_read_char() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\readline\callback.c:205 0x0057b065
> 13 rl_callback_read_char_wrapper() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:178 0x004244bb
> 12 handle_file_event() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-loop.c:812 0x0043e93a
> 11 process_event() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-loop.c:394 0x0043e38b
> 10 gdb_do_one_event() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-loop.c:459 0x0043f05c
> 9 catch_errors() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:510 0x0041238b
> 8 start_event_loop() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-loop.c:483 0x0043e3f4
> 7 cli_command_loop() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\event-top.c:211 0x004246ed
> 6 captured_command_loop() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\main.c:226 0x004012ab
> 5 catch_errors() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:510 0x0041238b
> 4 captured_main() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\main.c:902 0x00401a24
> 3 catch_errors() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\exceptions.c:510 0x0041238b
> 2 gdb_main() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\main.c:911 0x00402203
> 1 main() \cygdrive\d\Install\GDB\gdb-6.8.50.20090603\gdb\gdb.c:33 0x0040109b
>
>
> -----Original Message-----
> From: Richard Earnshaw <member@buzzard.freeserve.co.uk>
> To: Dmitry Smirnov <divis1969@mail.ru>, gdb@sourceware.org
> Date: Mon, 8 Jun 2009 17:36:12 +0200 (CEST)
> Subject: RE: Crash in gdb
>
> >
> > > I had encountered a problem with running gdb-6.8.50.20090603.
> > > It is configured as ./configure --target arm-elf --with-x=no --disable-tui
> > > I would like to note that there no such a problem with gdb-6.8.50.20090412 or gdb-6.8.50.20080630.
> >
> > > warning: unknown ARM EABI version 0x2000000
> >
> > This suggests you are using an old version of ARM's toolchain. That's not supported in GDB.
> >
> > R.
> >
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-10 16:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-08 12:00 Crash in gdb Dmitry Smirnov
2009-06-08 15:36 Richard Earnshaw
2009-06-10 16:31 Dmitry Smirnov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox