🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #130

Bug with re-reading symbols and setting breakpoints

#130
From: Joe Shapiro
Date: Mon, 27 Jul 1992 22:40
40 lines
1556 bytes
Hi, Folks
    I'm using gdb 4.6 and gcc 2.2.2.  This problem also occurs with gdb 4.5.
If I run gdb on a program and then recompile the program, gdb gets confused
and is no longer able to set breakpoints.  Here's a VERY small example:



/home/joe/gnu-bugs /home/joe/c-saw
joe@somalia> echo 'main(){}' > a.c

/home/joe/gnu-bugs /home/joe/c-saw
joe@somalia> gcc -g a.c

/home/joe/gnu-bugs /home/joe/c-saw
joe@somalia> gdb a.out
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.6, Copyright 1992 Free Software Foundation, Inc...
(gdb) r
Starting program: /usr3/joe/gnu-bugs/a.out 

Program exited with code 01.
(gdb) 
Suspended

/home/joe/gnu-bugs /home/joe/c-saw
joe@somalia> gcc -g a.c

/home/joe/gnu-bugs /home/joe/c-saw
joe@somalia> %
gdb a.out
(gdb) r
`/usr3/joe/gnu-bugs/a.out' has changed; re-reading symbols.
Starting program: /usr3/joe/gnu-bugs/a.out 

Program exited with code 01.
(gdb) b main
Cannot access memory at address 0x2290.
(gdb) q
Technical Details
Message-ID: <9207272240.AA00936@somalia.consolve>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!consolve.COM!joe

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!consolve.COM!joe
From: joe@consolve.COM (Joe Shapiro)
Subject: Bug with re-reading symbols and setting breakpoints
Message-ID: <9207272240.AA00936@somalia.consolve>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 27 Jul 1992 22:40:15 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 41