labath wrote:

> Is the following correct: Even if the user does not have debug symbols 
> installed, it would always be sufficient to match the **first** named frame.

That *might* work. The complication is that the name of the "first named frame" 
will different depending on whether you have debug symbols, how your libc was 
compiled, and its version, which sounds a bit whack-a-mole-ish, but hopefully 
the list does not end up too long.

> 
> If so, we could change `StackFrameList::SelectMostRelevantFrame` to match 
> against the first frame which has a name available. Although, that might 
> already cause a lot of unwinding, in case no debug info is available at all...

Yes, that sounds like it could be a problem (maybe, I really don't know). I 
think it might be nicer if we were able to put this unwinding into the hands of 
the individual recognizer -- so that it could do some checks (and bail out 
early) on the intermediate frames as well. For example, even though we don't 
know the names of these "unnamed" frames, we can be sure that all of them are 
coming from the c library, so we can bail out as soon as we encounter a 
non-libc frame (*)

(*) I'm ignoring the fact that on linux, none of the libc frames actually have 
to be in a library called `libc.so.6`. If you're linking your binary 
statically, the name of the module can be completely arbitrary.

https://github.com/llvm/llvm-project/pull/109594
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to