This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems setting a breakpoint in forked process


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>




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]