new option --readnever & script gstack?

Andrew Cagney cagney@gnu.org
Mon Nov 29 16:11:00 GMT 2004


Eli Zaretskii wrote:
>>Cc: gdb@sources.redhat.com
>>From: "Andrew Burgess" <aab@cichlid.com>
>>Date: Tue, 23 Nov 2004 13:42:54 -0800
>>
>>
>>>It sounds like the -readnever option you propose would be useful only
>>>in the pstack-like situation.  So how about adding a -pstack option
>>>which will do whatever it takes for GDB to emulate pstack, i.e. avoid
>>>reading the symbols, produce a backtrace, and then detach from the
>>>process?
>>
>>I think I would tend to use it 'with' symbols myself...
> 
> 
> Then perhaps using the -readnow switch would do what you want.
> 
> I understand that the motivation for not reading the symbols is the
> long time it takes GDB to do that, right?

Yes, the objective is to get in, get a minimal backtrace, and get out. 
Apparently this is a relatively common task in production environments - 
  a few seconds down time is considered acceptable but not a few minutes 
(that's the magnitude difference I'm seeing :-/).  I also don't see the 
option as being pstack specific - this technique is equally applicable 
to other scripts - gcore comes to mind - again only minimal symbol 
information being required.

So, ..., would a gstack.sh script and an option to disable symbolic 
debug information reading be useful additions to GDB?

Andrew



More information about the Gdb mailing list