This is the mail archive of the gdb-prs@sources.redhat.com 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]

breakpoints/1137: GDB fails to get correct address for symbols


>Number:         1137
>Category:       breakpoints
>Synopsis:       GDB fails to get correct address for symbols
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 12 14:58:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     andreas at florath dot net
>Release:        insight+dejagnu-20030311
>Organization:
>Environment:
config.guess: sparc-sun-solaris2.8
./configure --enable-targets=all
>Description:
*Sometimes* (yep: only sometimes) gdb failes to print the correct address of symbols (and is then unable to stop at some functions).

> nm --version
GNU nm 2.13.90.0.10 20021010
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
> nm -AC ./Terminatable | fgrep main
./Terminatable:00031320 T main
> 
> /opt/gcc321/pkg/insight+dejagnu-20030311/bin/gdb Terminatable       
GNU gdb 20030311
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) print main
$1 = {int (int, char **)} 0x978d8 <main>
(gdb) quit
> 

Notes: 
1) this happens also with other symbols
2) this error is very brittle: adding one line to the program may make this error vanishing
3) gdb-5.1.1 works fine
4) gdb-5.2 hangs with the attached stack frame (consumes CPU cycles but displays no answer during one hour)
5) I only saw this error occuring with some large binaries (>10M) written in C++.



-------------------------------

19677:  /opt/common/pkg/gdb-5.2/bin/gdb Terminatable
 ff1f06ec memcpy   (15ba838, 1c2c00, 1c2c00, 3c3090, 0, 0) + fc
 000fcd2c read_struct_type (ffbec380, 15ba838, 3c3090, 50d219, 50d219, 5f) + 114
 000fa984 read_type (15ba838, 3c3090, f891c, 54, 15b9fa0, 3a) + b98
 000f8944 define_symbol (3, 15b9f68, 1, 0, 80, 3c3090) + a54
 000e3ba0 process_one_symbol (80, 0, 0, 0, 50d18f, 3d25c0) + 108
 000e3740 read_ofile_symtab (243000, 4160, 244000, 23f000, 127d250, ffbec4a8) + 230
 000e33b0 dbx_psymtab_to_symtab_1 (127d250, 0, 0, 3c3090, 967, 0) + 100
 000e34d0 dbx_psymtab_to_symtab (127d250, 228800, e3448, 226c00, 78, 127d2b8) + 88
 000574f4 psymtab_to_symtab (0, 2fec4, 34cbb8, 0, 0, 0) + 58
 00052f50 find_pc_sect_symtab (0, 2fec4, 34cbb8, 560, 158, 20e8) + 140
 00051da4 lookup_symbol_aux (ffbeddd8, 0, 1, ffbec7e8, 0, ffbeddd8) + 384
 00051988 lookup_symbol (ffbeddd8, 0, 1, ffbec7e8, 0, ffbec7f0) + 44
 000d98a0 c_lex    (1e372c, 243c00, 0, 0, 0, 0) + 3b4
 000d8ce4 c_parse  (ffbec918, 190, c8, 243c00, 81010100, 0) + 12bc
 00096cbc parse_exp_1 (228400, 243c00, 243000, 1, 74, 74) + d8
 00096d9c parse_expression (244abe, 244abe, 244abe, 1, ffbede64, 243399) + 10
 0004e2c0 print_command_1 (244abe, 0, 1, 244abe, 22354, 3d720) + 68
 0011be68 do_cfunc (24de10, 244abe, 1, 0, 11be5c, ff00) + c
 000b0664 execute_command (24de10, 1, 0, b2a24, 696e, ff00) + 2a8
 0006d9e0 command_handler (244ab8, 0, 0, 243400, 696e, 6ddd4) + 98
 0006df3c command_line_handler (243800, 243c00, 243000, 696e00b8, 696e, 10) + 31c
 00191ba0 rl_callback_read_char (0, 76c48, ff1b8018, 10, 22354, ff1413f8) + 60
 0006d22c rl_callback_read_char_wrapper (0, 6d228, 1, 0, 0, 0) + 4
 0006d8cc stdin_event_handler (0, 0, 6d868, ff1b8018, 2237c, ff142278) + 64
 000c7240 handle_file_event (1, 257bb0, 257bb0, 231000, 22354, c6b90) + cc
 000c6b98 process_event (1, 0, 0, 0, 0, 0) + 60
 000c6be4 gdb_do_one_event (1, c6bb0, ffbee440, ff1b8018, 1, 136a330) + 34
 000b0268 do_catch_errors (2650a0, ffbee510, b0260, 31ca98, 1333a00, 100) + 8
 000b0178 catcher  (0, 2650a0, ffbee510, ffbee50c, ffbee508, 1d9598) + 110
 000b02a4 catch_errors (c6bb0, 0, 1d9598, 6, 1d3011, ff0000) + 2c
 000c6c10 start_event_loop (6d258, 0, 0, 0, 0, 0) + 1c
 0003a23c captured_command_loop (0, 3a21c, ffbee6f0, 0, 0, 0) + 20
 000b0268 do_catch_errors (2650a0, ffbee7c0, b0260, ff1b8018, 2237c, ff142278) + 8
 000b0178 catcher  (0, 2650a0, ffbee7c0, ffbee7bc, ffbee7b8, 1ad410) + 110
 000b02a4 catch_errors (3a21c, 0, 1ad410, 6, 22354, 3a744) + 2c
 0003acd0 captured_main (ffbefe84, 2446c8, 228800, 0, 2446b8, ffbeee08) + a54
 000b0268 do_catch_errors (228aa8, ffbeeb60, b0260, 0, 0, 0) + 8
 000b0178 catcher  (0, 228aa8, ffbeeb60, ffbeeb5c, ffbeeb58, 1ad410) + 110
 000b02a4 catch_errors (3a27c, ffbeebd8, 1ad410, 6, 0, 0) + 2c
 0003aee0 main     (2, ffbeec54, ffbeec60, 243310, 0, 0) + 1c
 0003a0b0 _start   (0, 0, 0, 0, 0, 0) + 5c
>How-To-Repeat:
I realy don't know (I know this is horrible for debugging ;-) - this error occurs some kind of randomly.  But if you need more information, feel free to ask.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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