mchoo7 wrote:

> > > > Also pcb's LR fields stores LR not PC for normal threads
> > > 
> > > 
> > > This is a bit confusing given we expose LR as PC. Otherwise the diff 
> > > itself looks good to me (I had also not noticed PC was missing for the 
> > > <14 case).
> > 
> > 
> > I thought thread crashed threads store their pc in `pcb.lr` while threads 
> > that didn't cause the crash preserves its `pcb.lr`. Does it store pc for 
> > both types of threads?
> 
> They do, but that's not because they're different, it's to make them look the 
> same as if it had called cpu_switch at that point in time. Really, pcb_lr 
> _is_ the PC, it's just that normally you get the PC calling cpu_switch and 
> reading LR. To be honest, I'm not sure why we even return pcb_lr for LR, it's 
> useless (like any other call-clobbered register, which isn't saved, and so we 
> don't show), but I guess KGDB does that.

I just verified that KGDB doesn't expose LR at all. I'll update the diff and 
description.

https://github.com/llvm/llvm-project/pull/183947
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to