saintmike has asked for the wisdom of the Perl Monks concerning the following question:
Esteemed monks,
the gdb debugger can connect to any running process, perl scripts included. So if I know that my script has process id 1234, I can simply call
and boom! I'm connected to the script. But can I also figure out which file and which line the script is currently processing? Typing where shows a stack trace:gdb -p 1234
Does anyone know enough about perlguts to figure out from here where (file/line) the script is right now?(gdb) where #0 0x55000402 in ?? () #1 0x00c75420 in __nanosleep_nocancel () from /lib/tls/libc.so.6 #2 0x00c7526f in sleep () from /lib/tls/libc.so.6 #3 0x080dacea in Perl_pp_sleep () #4 0x080a6044 in Perl_runops_standard () #5 0x0806103e in S_run_body () #6 0x08060e36 in perl_run () #7 0x0805e359 in main ()
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Connect gdb to a running perl process
by Zaxo (Archbishop) on Feb 14, 2005 at 09:55 UTC | |
Re: Connect gdb to a running perl process
by rob_au (Abbot) on Feb 14, 2005 at 09:56 UTC | |
by saintmike (Vicar) on Feb 14, 2005 at 19:32 UTC | |
Re: Connect gdb to a running perl process
by rockyb (Scribe) on Apr 12, 2014 at 15:50 UTC |
Back to
Seekers of Perl Wisdom