Thread View: gnu.gdb.bug
1 messages
1 total messages
Started by Paul Vaughan
Fri, 11 Dec 1992 23:57
4.7 source more recent than executable problem
Author: Paul Vaughan
Date: Fri, 11 Dec 1992 23:57
Date: Fri, 11 Dec 1992 23:57
56 lines
2738 bytes
2738 bytes
This is gdb 4.7 on a Sun Sparc 2 (both host and target), SunOS 4.1,
SUN CC compiled program under test, with help from cback version 2.05.
This has been a minor problem for a long time. If you edit the source
and recompile, gdb reads in the symbols again as it should, but it
doesn't change the executable. If it stops at a breakpoint, it will
tell you "Source file is more recent than executable." If it doesn't
stop at a breakpoint, it doesn't warn at all. I should think if it's
not going to automatically do an exec when you restart with run, it
ought to warn you before it does the run. However, I hoped that it
would automatically do the exec before restarting the program. Plus,
the warning "Source file is more recent than executable." is
confusing in this case because the source file is not more recent than
the executable file--it's more recent than gdb's image of the
executable file, and that's what counts.
centipede% !C
CC -g trash.cc -o trash
cback version 2.05 - Copyright (c) 1992 NewCode Technology, Inc.
centipede% gdb trash
GDB is free software and you are welcome to 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.
GDB 4.7, Copyright 1992 Free Software Foundation, Inc...
(gdb) run
Starting program: /usr2/vaughan2/trilogy/engine/src/trash
Program exited with code 01.
(gdb) <-------------- stopped with ^Z
Stopped
centipede% touch trash.cc
centipede% !C
CC -g trash.cc -o trash
cback version 2.05 - Copyright (c) 1992 NewCode Technology, Inc.
centipede% fg
gdb trash
(gdb) run
`/usr2/vaughan2/trilogy/engine/src/trash' has changed; re-reading symbols.
Starting program: /usr2/vaughan2/trilogy/engine/src/trash
Program exited with code 01.
(gdb) break main
Breakpoint 1 at 0x22b4: file trash.cc, line 14.
(gdb) run
Starting program: /usr2/vaughan2/trilogy/engine/src/trash
Breakpoint 1, main () at trash.cc:14
Source file is more recent than executable.
14 void main () {
(gdb) exec trash
A program is being debugged already. Kill it? (y or n) y
(gdb) run
Starting program: /usr2/vaughan2/trilogy/engine/src/trash
Breakpoint 1, main () at trash.cc:14
14 void main () {
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads