Problem when restarting program under gdb 7.2

Richard Stanton stanton at haas.berkeley.edu
Wed Apr 13 10:05:10 PDT 2011


I now have gdb 7.2 running mostly fine, but it seems to crash rather
regularly if I restart a program already being debugged under gdb. This
doesn't happen with the default Xcode gdb.

For example:

mortgage:miscprog stanton$ gcc -g -DMAIN amput.c -o amput
mortgage:miscprog stanton$ fsf-gdb amput
GNU gdb (GDB) 7.2
Copyright (C) 2010 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 "x86_64-apple-darwin10.7.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /Users/stanton/miscprog/amput...Reading symbols from
/Users/stanton/miscprog/amput.dSYM/Contents/Resources/DWARF/amput...done.
done.
(gdb) break main
Breakpoint 1 at 0x100000a85: file amput.c, line 32.

(gdb) run 100

Starting program: /Users/stanton/miscprog/amput 100

Breakpoint 1, main (argc=2, argv=0x7fff5fbff828) at amput.c:32
32	    i = atoi (argv[1]);
(gdb) n
33	    tp = time(NULL);
(gdb) n
34	    temp = AmPut(60, 60, .08, .3, .5, i);
(gdb) n
35	    tp1 = time(NULL);
(gdb) n
36	    printf("n = %3d,  v = %15.7lf, time = %ld seconds\n", i, temp,
tp1-tp);
(gdb) run 100
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /Users/stanton/miscprog/amput 100
machoread.c:392: internal-error: macho_add_oso_symfile: Assertion
`current_oso.symbol_table == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)






More information about the macports-users mailing list