public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Problems setting a breakpoint in forked process
@ 2001-04-16 11:55 Laurent Duperval
  2001-04-17  9:21 ` Keith Seitz
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Duperval @ 2001-04-16 11:55 UTC (permalink / raw)
  To: Insight Mailing List

Hi,

Ok, so I'm trying to debug a Tcl process which forks a sub process. I
believe the problem I'm trying to debug is in the forked process. I'm hoping
that since a lot of the Insight developers have some Tcl experience, one of
'em will be able o explain to me what I'm doing wrong.

I compiled Tcl 8.4 statically, with stubs. When I run my process (tkrat), it
loads .so files containing the code that I want to debug. I found that the
list of files contained in the .so file don't appear in the list of files
I'm allowed to debug. IOW, I can't set a breakpoint in any of the .so
sources, unless I trace the execution to the point where the .so file is
loaded and its initialising routine is loaded. In that case, I can only set
breakpoints in the functions that appear in the same file as the
initialisation routine.

The above is not very effective but it's the only way I've managed to debug
my process. But it breaks when it is forked. I've tried attaching to the
forked process but just as I explained in the previous paragraph, I can' set
any breakpoints anywhere interesting, because by the time the process is
forked, it looks like all the .so files that are needed are loaded by the
process that was forked.

So how would I go about doing this? I thought I would be able to just add
give the name of the function where I want to break, but I can't seem to do
that. It looks to me like the only way to add a breakpoint is if the GUI can
see that function and list it in the drop down box.

Any ideas?

Thanks,

L

-- 
Laurent Duperval < mailto:lduperval@microcelli5.com >



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

* Re: Problems setting a breakpoint in forked process
  2001-04-16 11:55 Problems setting a breakpoint in forked process Laurent Duperval
@ 2001-04-17  9:21 ` Keith Seitz
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Seitz @ 2001-04-17  9:21 UTC (permalink / raw)
  To: Laurent Duperval; +Cc: Insight Mailing List

On Mon, 16 Apr 2001, Laurent Duperval wrote:

> So how would I go about doing this? I thought I would be able to just add
> give the name of the function where I want to break, but I can't seem to do
> that. It looks to me like the only way to add a breakpoint is if the GUI can
> see that function and list it in the drop down box.

If the file is not listed in the combobox, you can still type it in to 
the file entry. This should ask gdb about the file and load it into the 
source file. If that doesn't work, you can still (hark!) use the console window to enter 
the breakpoint.

Of course if none of that works, you could be looking at a gdb bug...
Keith

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

end of thread, other threads:[~2001-04-17  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-16 11:55 Problems setting a breakpoint in forked process Laurent Duperval
2001-04-17  9:21 ` Keith Seitz

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