Article View: gnu.gdb.bug
Article #5524.7 source more recent than executable problem
From: 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 () {
Technical Details
Message-ID:
<9212112357.AA12742@Trilogy.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!trilogy.com!vaughanShow Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!trilogy.com!vaughan From: vaughan@trilogy.com (Paul Vaughan) Subject: 4.7 source more recent than executable problem Message-ID: <9212112357.AA12742@Trilogy.COM> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 11 Dec 1992 23:57:12 GMT Approved: bug-gdb@prep.ai.mit.edu Lines: 58