This is the mail archive of the gdb@sources.redhat.com 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: [6.2] PROBLEMS file


joel> FWIW: As a user, I don't mind when the unwinder goes too far and
joel> displays too many frames.  The info we're looking for is there, and
joel> that's what really counts for me. Not pretty, but good enough.
joel> So I wouldn't mind closing that particular PR, especially since
joel> there doesn't seem to be any accurate way of detecting the top
joel> of the call stack.

There are really two separate problems here.  gdb/1505 is all about
top-of-stack detection.  How about we document the limitation and
live with it.

The existing text is:

  Most programs have a standard user entry point---a place where system
  libraries and startup code transition into user code.  For C this is
  @code{main}.  When @value{GDBN} finds the entry function in a
  backtrace it will terminate the backtrace, to avoid tracing into highly
  system-specific (and generally uninteresting) code.

How about adding something like this:

  @value{GDBN} is not perfect at detecting the top of the call stack.
  For instance, if your program creates multiple threads, then the
  stack of an individual thread may not start with @code{main} at all.
  So you may see strange frames at the top of the stack; it is safe to
  ignore these.

If we document it, I am okay with closing the PR.

(And while I was reading the doco I noticed "set backtrace limit" is
already implemented, which is exactly what I want for callfuncs.exp!)

The other problem is strange frames in the middle that cause the
trace to go bad before it gets to any interesting user code.
That's a different, and much worse, problem, but it's not PR gdb/1505.
See PR gdb/1255 and PR gdb/1253.  Those two particular PR's have been
fixed.

Michael C


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