* dbx on Alpha
@ 1996-09-11 4:00 Brian McIlwrath
1996-09-12 4:00 ` Tony Quan
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Brian McIlwrath @ 1996-09-11 4:00 UTC (permalink / raw)
I only use Digital Unix periodically and, often when I come to debug some
code, I hit the folling problem:
If a process forks off a child to do some work for it dbx says
"New child attached. Use switch to gain access to process nnnnnn"
It then seems to hang. There is no dbx prompt to type 'switch' to. I am
totally uninterested in the child process. I want to debug the parent!
I have NOT used "attach" to gain access to a running program (it was
started by a simple 'dbx imagefile')
All most frustrating.
Is there an answer?
Brian McIlwrath
--
-------------------------------------------------------------------------
Brian McIlwrath, e-mail: bkm@star.rl.ac.uk
Starlink Project,
Space Science Department,
Rutherford Appleton Laboratory, UK.
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: dbx on Alpha
1996-09-11 4:00 dbx on Alpha Brian McIlwrath
@ 1996-09-12 4:00 ` Tony Quan
1996-09-13 4:00 ` Murray S. Kucherawy
1996-10-02 4:00 ` Jeff Diewald
2 siblings, 0 replies; 5+ messages in thread
From: Tony Quan @ 1996-09-12 4:00 UTC (permalink / raw)
In article <515uu5$o3e@newton.cc.rl.ac.uk>, bkm@star.rl.ac.uk (Brian
McIlwrath) wrote:
> I only use Digital Unix periodically and, often when I come to debug some
> code, I hit the folling problem:
>
> If a process forks off a child to do some work for it dbx says
>
> "New child attached. Use switch to gain access to process nnnnnn"
>
> It then seems to hang. There is no dbx prompt to type 'switch' to. I am
> totally uninterested in the child process. I want to debug the parent!
> I have NOT used "attach" to gain access to a running program (it was
> started by a simple 'dbx imagefile')
>
> All most frustrating.
>
> Is there an answer?
>
> Brian McIlwrath
> --
> -------------------------------------------------------------------------
> Brian McIlwrath, e-mail: bkm@star.rl.ac.uk
> Starlink Project,
> Space Science Department,
> Rutherford Appleton Laboratory, UK.
> -------------------------------------------------------------------------
Try using the -noproc flag when starting up dbx, ie
dbx -noproc imagefile
--Tony
tquan@ibm.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dbx on Alpha
1996-09-11 4:00 dbx on Alpha Brian McIlwrath
1996-09-12 4:00 ` Tony Quan
@ 1996-09-13 4:00 ` Murray S. Kucherawy
1996-09-15 4:00 ` Brian McIlwrath
1996-10-02 4:00 ` Jeff Diewald
2 siblings, 1 reply; 5+ messages in thread
From: Murray S. Kucherawy @ 1996-09-13 4:00 UTC (permalink / raw)
In article <515uu5$o3e@newton.cc.rl.ac.uk>,
Brian McIlwrath <bkm@star.rl.ac.uk> wrote:
>I only use Digital Unix periodically and, often when I come to debug some
>code, I hit the folling problem:
>
>If a process forks off a child to do some work for it dbx says
>
>"New child attached. Use switch to gain access to process nnnnnn"
>
>It then seems to hang. There is no dbx prompt to type 'switch' to. I am
>totally uninterested in the child process. I want to debug the parent!
>I have NOT used "attach" to gain access to a running program (it was
>started by a simple 'dbx imagefile')
>
>All most frustrating.
>
>Is there an answer?
Perhaps the main (attached) program is waiting for input at that point?
--
Murray S. Kucherawy ====================================== mskucher@hookup.net
Vice-President, Software Services HookUp Communication Corporation
(905) 847-8000 NIC Handle "MSK" Oakville, Ontario, CANADA
-- EMACS: Eight Megs And Constantly Swapping --
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dbx on Alpha
1996-09-13 4:00 ` Murray S. Kucherawy
@ 1996-09-15 4:00 ` Brian McIlwrath
0 siblings, 0 replies; 5+ messages in thread
From: Brian McIlwrath @ 1996-09-15 4:00 UTC (permalink / raw)
Murray S. Kucherawy (mskucher@vertex.tor.hookup.net) wrote:
: In article <515uu5$o3e@newton.cc.rl.ac.uk>,
: I wrote:
: >If a process forks off a child to do some work for it dbx says
: >
: >"New child attached. Use switch to gain access to process nnnnnn"
: Perhaps the main (attached) program is waiting for input at that point?
No - in the case I referred to the main program called a function which ran
up a c-shell to expand some file names. I tried to step over this function
call but I was still caught by dbx.
The reply from Tony Quan has the solution (using an, apparently undocumented,
switch -noproc in the dbx command line). I would argue that the default
behaviour of dbx is stupid and that the lack of any documentation that I
could discover is unfortunate!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dbx on Alpha
1996-09-11 4:00 dbx on Alpha Brian McIlwrath
1996-09-12 4:00 ` Tony Quan
1996-09-13 4:00 ` Murray S. Kucherawy
@ 1996-10-02 4:00 ` Jeff Diewald
2 siblings, 0 replies; 5+ messages in thread
From: Jeff Diewald @ 1996-10-02 4:00 UTC (permalink / raw)
Brian McIlwrath wrote:
>
> I only use Digital Unix periodically and, often when I come to debug some
> code, I hit the folling problem:
>
> If a process forks off a child to do some work for it dbx says
>
> "New child attached. Use switch to gain access to process nnnnnn"
>
> It then seems to hang. There is no dbx prompt to type 'switch' to. I am
> totally uninterested in the child process. I want to debug the parent!
> I have NOT used "attach" to gain access to a running program (it was
> started by a simple 'dbx imagefile')
>
> All most frustrating.
>
> Is there an answer?
There are two that I can think of.
First, with dbx, what is the value of $stop_on_fork? I believe that
the default is 1. Setting it to 0 may help you out.
Second, you can check out the Ladebug debugger. There's extensive
documentation in our user manual for debugging programs across forks,
with examples.
-----------------------------------------------------------------------
Jeff Diewald EASYNET: VIRRUS::DIEWALD
Ladebug group INTERNET: diewald@zko.dec.com
Digital Equipment Corp.
Note: I don't read every article in this group. If you have debugger
questions, I may be able to get you an answer. You're much more likely
to get an answer if you put "Ladebug" somewhere in your subject line.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1996-10-02 4:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-11 4:00 dbx on Alpha Brian McIlwrath
1996-09-12 4:00 ` Tony Quan
1996-09-13 4:00 ` Murray S. Kucherawy
1996-09-15 4:00 ` Brian McIlwrath
1996-10-02 4:00 ` Jeff Diewald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox