1753449 Members
6705 Online
108794 Solutions
New Discussion юеВ

gdb 5.2 (wdb) problem

 
mversaci
Occasional Contributor

gdb 5.2 (wdb) problem

I'm getting an error when attempting to run gdb against a process. Here is a sample of the error, any ideas ? TIA

going to run gdb -nx --batch --command 21331/commands /v100u/psoft/psfs8uat/bin/PSAPPSRV 18148

ttrace_wait: No child processes.
n.
21331/commands:1: Error in sourced command file:
Couldn't read register flags (#0): Invalid argument
Quitting: ttrace: Permission denied.
=== gdb 18148
(no debugging symbols found)
--- gdb 18148

3 REPLIES 3

Re: gdb 5.2 (wdb) problem

Can you tell what exactly you have in 21331/commands file? Also, please make sure that the process with pid 18148 is live at attach time.
mversaci
Occasional Contributor

Re: gdb 5.2 (wdb) problem

Thanks for your response. This is the contents of the commands file:

set height 0

echo \n
echo ==== Thread Information\n
info thread
echo ---- Thread Information\n\n

echo ==== Backtraces\n
thread apply all backtrace 500
echo ---- Backtraces\n\n

echo ==== Shared Libraries\n
info sharedlibrary
echo ---- Shared Libraries\n\n

echo ==== Local Backtrace\n
backtrace 500
echo ---- Local Backtrace\n\n

detach

Re: gdb 5.2 (wdb) problem

It looks like the debuggee process died while gdb is debuggee. Can you make sure this happened? I.e., check if 18148 is in ps output.

Also, try issuing the commands at gdb command prompt and see which command is cauing the problem. For this, you want to start up gdb without --batch and --command options.