Techie Q - dbx.
#1
Anyone experience of using dbx (sun debugger) with multiple processes?
I'm using follow_fork_mode child, following into child proc after attaching to the parent. I'm actually tracing a server that takes multiple requests from a client, serving each sequentially in a child process.
Has anyone found a way of persuading dbx to re-attach to the parent process when the child quits?
Ta.
Mark.
I'm using follow_fork_mode child, following into child proc after attaching to the parent. I'm actually tracing a server that takes multiple requests from a client, serving each sequentially in a child process.
Has anyone found a way of persuading dbx to re-attach to the parent process when the child quits?
Ta.
Mark.
#2
Scooby Regular
Try with 'truss -f -p <pid>' if you just need to see the calls it's making - I haven't used the Solaris debugger, but truss is usually as far as I need to go.
Steve.
Steve.
#3
Ought to have mentioned I'm using RTC (runtime checking) to sort out memory leaks/rui/bad frees etc in several thousand lines
I've even tried a handler for exit:
where exit { attach pid; } (parent pid consistent..)
Tells me to stuff off, can't use attach in handler.
Or:
stop sig sigchld
in parent proc. doesn't work either. Starting to really irritate me; surely it's not that bizarre a thing to need to do?
- M.
P.S. Don't tell me to use purify, can't
I've even tried a handler for exit:
where exit { attach pid; } (parent pid consistent..)
Tells me to stuff off, can't use attach in handler.
Or:
stop sig sigchld
in parent proc. doesn't work either. Starting to really irritate me; surely it's not that bizarre a thing to need to do?
- M.
P.S. Don't tell me to use purify, can't
#6
Scooby Regular
Trending Topics
#9
Both might be the answer - but only works if you're using a gui workshop tool from sun, ask just asks you what you want to do.
If you can visualise what's going on: follow fork allows you to either stay with the original process when a fork happens, or to follow the split to the new process. There appears to be no way of 'automagically' getting back to the parent process having followed into the child; I can manually issue an attach at the prompt to get the parent again, but by this time the second child has already spawned, and gone on it's merry way.. so I get 1, 3, 5 etc.. not much help when the mem leaks could be in 2, 4, 6 etc...
Ah well....
Thanks for the ideas anyhow.
- Mark.
If you can visualise what's going on: follow fork allows you to either stay with the original process when a fork happens, or to follow the split to the new process. There appears to be no way of 'automagically' getting back to the parent process having followed into the child; I can manually issue an attach at the prompt to get the parent again, but by this time the second child has already spawned, and gone on it's merry way.. so I get 1, 3, 5 etc.. not much help when the mem leaks could be in 2, 4, 6 etc...
Ah well....
Thanks for the ideas anyhow.
- Mark.
#10
Scooby Regular
Yeah I understood the problem, I'm surprised that wasn't the default behaviour. If you find out how, mail me and let me know because it may well come in handy
Thread
Thread Starter
Forum
Replies
Last Post
The TunnelMeister
General Technical
16
08 December 2002 01:33 PM
Scoobychick
Computer & Technology Related
12
12 January 2002 05:49 PM