Debugger for C

Russ Poffenberger poffen at sj.ate.slb.com
Wed Jan 23 07:54:36 AEST 1991


In article <1375 at brchh104.bnr.ca> tru at sactoh0.sac.ca.us (Troy R. Underwood) writes:

>We are looking for a debugger, similar to the dbx and/or dbxtool used on
>Suns.  We need it to work with both the Sun3 executables and Sun4
>executables.  What we want to do differently in that we need to be able to
>run the debugger in one window/terminal and the program and it's screen
>input and output to run in another terminal/window.

One way to achieve this, although less convenient, is to start the program
to be debugged in one window. You need to make sure that it has a way to
pause execution. More later.

Get its process id using ps.

Start dbx or dbxtool. When it comes up, enter "debug progname pid". Make
sure you are cd'ed to the directory where the program resides. What this
will do is load the symbols, and attach to the already running program.
The IO for the program stays in the original window. You may have to use
the "use" command and do "up" then "down" to see the source.

You can force the test program to pause, by putting "pause()" near the
beginning of the file. As soon as dbx attaches, it signals pause and it will
continue normally.

Russ Poffenberger               DOMAIN: poffen at sj.ate.slb.com
Schlumberger Technologies       UUCP:   {uunet,decwrl,amdahl}!sjsca4!poffen
1601 Technology Drive		CIS:	72401,276
San Jose, Ca. 95110             (408)437-5254



More information about the Comp.sys.sun mailing list