🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #360

Gdb has problems with breakpoints after program file update

#360
From: Anund Lie
Date: Wed, 12 Aug 1992 17:34
56 lines
2112 bytes
(The problem concerns at least gdb 4.5 and 4.6 on SPARC.)

When gdb detects that the executable file it is debugging has changed,
it re-reads the symbol table and attempts to restart with the same
breakpoints and watchpoints on the new version of the file, but is
then unable to examine and set the breakpoints.

Anund Lie
Division of Computer Systems and Telematics 
Norwegian Inst. of Technology, N-7034 Trondheim, Norway
Email: Anund.Lie@idt.unit.no       (Internet)

--------------------------------------------------------------------
villtind% cat t.c
int
main(argc,argv)
int argc;
char *argv[];
{
    return argc;
}
villtind% gcc -g -o t t.c
villtind% gdb t
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) b main
Breakpoint 1 at 0x22a4: file t.c, line 6.
(gdb) run
Starting program: /a/grimne/src/PRINTER/psdriver/sun4/t 

Breakpoint 1, main (argc=1, argv=0xf7fff874) at t.c:6
6           return argc;
(gdb) cont
Continuing.

Program exited with code 01.
(gdb) 
Suspended
villtind% !gcc
gcc -g -o t t.c
villtind% %gdb
gdb t
(gdb) run
`/a/grimne/src/PRINTER/psdriver/sun4/t' has changed; re-reading symbols.
Error in re-setting breakpoint 1:
Cannot access memory at address 0x2290.
Error in re-setting breakpoint 1:
Cannot access memory at address 0x2290.
Starting program: /a/grimne/src/PRINTER/psdriver/sun4/t 
Breakpoint 1 at 0x22a4: file t.c, line 6.

Program exited with code 01.
(gdb) quit 
villtind% 
Technical Details
Message-ID: <199208121334.AA28174@loke.idt.unit.no>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!idt.unit.no!Anund.Lie

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!idt.unit.no!Anund.Lie
From: Anund.Lie@idt.unit.no (Anund Lie)
Subject: Gdb has problems with breakpoints after program file update
Message-ID: <199208121334.AA28174@loke.idt.unit.no>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 12 Aug 1992 17:34:47 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 57