home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!ut-emx!tivoli!TIVOLI.COM!stuart
- From: stuart@TIVOLI.COM (Stuart Jarriel)
- Newsgroups: comp.sys.hp
- Subject: attaching xdb to a running process...
- Message-ID: <3739@tivoli.UUCP>
- Date: 3 Sep 92 02:15:05 GMT
- Sender: news@tivoli.UUCP
- Organization: Tivoli Systems, Inc
- Lines: 37
-
- This is more of a signals question I think. I would like to be able to
- fork/exec xdb in a hpterm window that in turn will attach to the parent
- process. The code flow looks like this:
-
- main
- |
- |
- fork----------------|
- (parent) | | (child PID = XXX)
- | |
- wait() |
- |
- fork--------------------|
- | |
- | | (child)
- | |
- | |
- pause() exec()
- | (hpterm -e xdb -P XXX)
- |
- (debug code here)
-
- Well, this works REALLY well except that after the debugger attached to the
- code that is in the pause(), I cant get it to start. SIGCONT has no effect.
-
- As for signal handlers, the main has a handler for SIGCLD prior to the first
- fork, and after the fork ignores SIGHUP, SIGINT and SIGPIPE.
-
- I suspect that I just dont know enough about xdb to see what it needs to
- do to get a process started, but the only manual Ive seen is a really good
- users manual, and this is a little beyond that.
-
- If anyone knows more about xdb and what signals it uses to start/stop a
- process once it has gotten it with ptrace, please let me know.
-
- Thanks
- stuart
-