public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* It will be great if Insight will remember BP too
@ 2000-03-28  0:59 Leon Pollak
  2000-03-28  5:27 ` laurent.duperval
  0 siblings, 1 reply; 4+ messages in thread
From: Leon Pollak @ 2000-03-28  0:59 UTC (permalink / raw)
  To: insight

Hello, gurus.
    It will be great if Insight will remember breakpoints set in its
last session when restarted too.
Thanks ahead.


leonp@plris.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: It will be great if Insight will remember BP too
  2000-03-28  0:59 It will be great if Insight will remember BP too Leon Pollak
@ 2000-03-28  5:27 ` laurent.duperval
  2000-03-29 11:36   ` Jim Blandy
  0 siblings, 1 reply; 4+ messages in thread
From: laurent.duperval @ 2000-03-28  5:27 UTC (permalink / raw)
  To: Insight Mailing List

On 28 Mar, Leon Pollak wrote:
> Hello, gurus.
>     It will be great if Insight will remember breakpoints set in its
> last session when restarted too.
> Thanks ahead.
> 
> 
> leonp@plris.com
> 

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.

L

-- 
Laurent Duperval                   "Montreal winters are an intelligence test,
CGI - SARM Project                        and we who are here have failed it."
Phone: (514) 350-3368                                            -Don Camilli
mailto:laurent.duperval@cgi.ca      Penguin Power!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: It will be great if Insight will remember BP too
  2000-03-28  5:27 ` laurent.duperval
@ 2000-03-29 11:36   ` Jim Blandy
  2000-03-29 12:07     ` laurent.duperval
  0 siblings, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2000-03-29 11:36 UTC (permalink / raw)
  To: laurent.duperval; +Cc: Insight Mailing List

> 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
$ 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: It will be great if Insight will remember BP too
  2000-03-29 11:36   ` Jim Blandy
@ 2000-03-29 12:07     ` laurent.duperval
  0 siblings, 0 replies; 4+ messages in thread
From: laurent.duperval @ 2000-03-29 12:07 UTC (permalink / raw)
  To: Insight Mailing List

On 29 Mar, Jim Blandy wrote:
> 
> 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?
> 

This seems to work in the same session. I'd have to check to make sure it
works at home too, but I believe it does. What I'm asking is for the same to
work between sessions. So that I can set a breakpoint in a shared library,
save the breakpoint and have it set again when I exit gdb and restart it.
I'm not even sure that's feasible.

L

-- 
Laurent Duperval                   "Montreal winters are an intelligence test,
CGI - SARM Project                        and we who are here have failed it."
Phone: (514) 350-3368                                            -Don Camilli
mailto:laurent.duperval@cgi.ca      Penguin Power!


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-03-29 12:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-28  0:59 It will be great if Insight will remember BP too Leon Pollak
2000-03-28  5:27 ` laurent.duperval
2000-03-29 11:36   ` Jim Blandy
2000-03-29 12:07     ` laurent.duperval

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).