From: Jim Blandy <jimb@zwingli.cygnus.com>
To: laurent.duperval@cgi.ca
Cc: Insight Mailing List <insight@sourceware.cygnus.com>
Subject: Re: It will be great if Insight will remember BP too
Date: Wed, 29 Mar 2000 11:36:00 -0000 [thread overview]
Message-ID: <nppusd1sdh.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <200003281325.IAA02374@qc.bell.ca>
> Well, you can currently save the breakpoints, doesn't that help any? Of
> course you have to restore your breakpoints but... I have another idea: one
> of the things that annoys me most when debugging Tcl-based apps (i'm doing a
> lot of this, have you noticed?) is the use of shared libs. If I set a
> breakpoint when I run a program, that breakpoint disappears and cannot be
> reset when the app is restarted, because gdb doesn't know where to find the
> symbol (since it's not loaded yet). Is it possible to set a breakpoint in a
> function and have gdb notice when that function is loaded up? In other
> words, set some unexisting breakpoints that *will* exist at some time during
> program execution, wwithout having to interrupt the process that is being
> debugged. It's one of the features of a Tcl script debugger I'm using and I
> find it very handy. But then, Tcl is a whole 'nother beast.
GDB is supposed to notice breakpoints set in shared libraries, and
re-install them when the shared library is loaded a second time. It
does this for me; see below.
Have you posted a bug report about this? If so, I apologize for not
having answered it. If not, could you please post one, so I can track
this down?
$ cat hello.c
#include <stdio.h>
main ()
{
puts ("Hello, world!");
}
$ gcc -g hello.c -o hello
$ $CB/gdb -nw hello
GDBtk--A GUI just like ones your mother used to bake.
To disable command-line taunts, run gdb with "-w".
GNU gdb 4.18.1
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) break puts
Breakpoint 1 at 0x80482e8
(gdb) run
Starting program: /home/jimb/play/hello
Breakpoint 1 at 0x400693d5: file ioputs.c, line 32.
Breakpoint 1, 0x400693d5 in _IO_puts (str=0x8048430 "Hello, world!")
at ioputs.c:32
32 ioputs.c: No such file or directory.
(gdb) info shared
From To Syms Read Shared Object Library
0x40017000 0x401098dc Yes /lib/libc.so.6
0x40000000 0x400126b0 Yes /lib/ld-linux.so.2
(gdb) i br
Num Type Disp Enb Address What
1 breakpoint keep y 0x400693d5 in _IO_puts at ioputs.c:32
breakpoint already hit 1 time
(gdb) c
Continuing.
Hello, world!
Program exited with code 016.
(gdb) run
Starting program: /home/jimb/play/hello
Breakpoint 1, 0x400693d5 in _IO_puts (str=0x8048430 "Hello, world!")
at ioputs.c:32
32 ioputs.c: No such file or directory.
(gdb) quit
The program is running. Exit anyway? (y or n) y
$
next prev parent reply other threads:[~2000-03-29 11:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-28 0:59 Leon Pollak
2000-03-28 5:27 ` laurent.duperval
2000-03-29 11:36 ` Jim Blandy [this message]
2000-03-29 12:07 ` laurent.duperval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nppusd1sdh.fsf@zwingli.cygnus.com \
--to=jimb@zwingli.cygnus.com \
--cc=insight@sourceware.cygnus.com \
--cc=laurent.duperval@cgi.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).