Backtrace extraction ONLY gdb
Tom Tromey
tromey@redhat.com
Tue Mar 22 16:46:00 GMT 2011
>>>>> "Cyrille" == Maucci, Cyrille <cyrille.maucci@hp.com> writes:
Cyrille> Is there any possibility to 'recompile' gdb where only the 'bt'
Cyrille> (or 'threads apply all bt') feature would be enabled?
Maybe with a lot of hacking.
If the process you need to attach to is always owned by a particular
user, you can play games with suid to restrict gdb to doing backtraces.
(Install gdb so that it is only executable by that user. Then, make a
suid wrapper owned by that user that invokes `gdb -batch -p PID -ex
"thread apply all bt full"'.)
Alternatively, core files are good for this kind of use. You can make
them on the production machine and then analyze them elsewhere.
Tom
More information about the Gdb
mailing list