Consultor Eletrônico



Kbase P110651: How to attach to a process using  gdb  to generate a stack
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/01/2009
Status: Verified

GOAL:

How to attach to a process using gdb to generate a stack

GOAL:

How to use the gdb debugger in Linux to attach to a process

FACT(s) (Environment):

UNIX
Progress/OpenEdge Product Family

FIX:

Use the following steps to attach to a process and generate a stack:
1. Run ps-elf | grep <process>
2. Mark down the pid for the process to attach to
3. Copy the full path to the process
4. Run the following command which reads the symbols from the executable and attaches to the process ID in memory:
gdb <full path to process> <pid # of process>
example:
gdb /dlc/bin/_sqlsrv2 18227
5. type the following at the gdb command prompt:
where
(this will display the stack)
6. type the following at the gdb command prompt:
detach
(this will detach from process without causing the process to terminate)
7. type the following at the gdb command prompt:
q
(this will quit the debugger)