Does anyone know how to debug multi-process programs using dbx?

Does anyone know how to debug multi-process programs using dbx?

Post by Sean Li » Fri, 03 Jul 1998 04:00:00



I'm using dbx for solaris 2.5. I've trying dbx command "lwp" and "lwps"
but got the message "lwp(s) is not available".

Thanks in advance,

--
                        ("`-''-/").___..--''"`-._
                         `6_ 6  )   `-.  (     ).`-.__.`)
                         (_Y_.)'  ._   )  `._ `. ``-..-'
 Sean Liu              _..`--'_..-_/  /--'_.' ,'

--------------------------------------------------------
 "It takes both the sun and the rain to make a rainbow."
--------------------------------------------------------

 
 
 

Does anyone know how to debug multi-process programs using dbx?

Post by Tor Norby » Fri, 03 Jul 1998 04:00:00



> I'm using dbx for solaris 2.5. I've trying dbx command "lwp" and "lwps"
> but got the message "lwp(s) is not available".

The lwp command is for use with multithreaded programs. If you want to
use only dbx to debug a multi-process program, then you need to run
multiple dbx's, attaching to each process.

A better solution is to use Sun WorkShop, if you have it.
It is not only a gui to dbx, but cooperates with dbx for multisession
programs. For example, when the program forks, you can choose to
follow the parent, the child, or both. You can then use the
session manager to switch between the processes you're debugging. By
default, WorkShop stays with only the parent after a fork, so if you
want to debug all processes that are created go into Debugging
Options, select the "Forks and Threads" category, and under
"Process to follow after a fork" select "Both" (or "Ask" if you want a
popup every time) and hit OK.

-- Tor

 
 
 

1. How can UNIX Multi-process with Multi-process interface

I am fairly new to UNIX so pardon me if the following questions seem trivial.
I have some basic UNIX books, but they do not cover the following:

I have two applications that can run totally independent.  My goal is to
link the two programs via stdout and file sharing.  Because each process
is computationally intensive, I would like to run the process concurrently
on two different processors (either one machine when dual processors are
available to me, or two machines).  I realize this is a global hunger
problem so my initial goal is to have both programs running on one machine
concurrently.

From my simple point of view, two possibilities come to mind:

        1.  Have each process run in the background of a single shell
        2.  Have each process run under seperate shells

I would appreciate any information on how to accomplish this task or where
I can get the information to accomplish this task.

Note:  I have an HP 715/50 and reading the man pages on the shell (ksh) has
only confused me.

2. NDS server for UNIX/Linux/Solaris?

3. Debugging F90 programs under Solaris (using dbx)

4. Fragmentation needed and DF set ?!?

5. Can't debug multithreaded program using WS 6.2 dbx on Solaris 10

6. Big trouble: Linux + PCI card = *CRASH*

7. Multi-Process C programming in UNIX/Linux ?

8. How to detect Ctrl+C in script?

9. Debugging Multiple Processes with dbx & xde

10. How to use dbx for solaris to debug programs with arguments?

11. Anyone know of military programs using Linux?

12. DBX hangs when debugging multithreaded programs

13. SEGV signal when debugging a multithreaded program with dbx