This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Backtrace extraction ONLY gdb


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]