Re: [PATCH 1/5] gdb/python: handle saving user registers in a frame unwinder

Tom Tromey
2021-06-07T20:56:28Z

>> I was worried that requesting this would require unwinding the register,
>> which is what is currently being done. But I suppose the idea is that
>> the value is normally lazy, so it isn't actually unwound?

Andrew> You are correct, accessing any register from an unwinder is going to
Andrew> give us a lazy register value, which we'd expect (in this case) to
Andrew> have the real register number for $pc, and the frame-id of the next
Andrew> frame.

Andrew> When you open with "I was worried that requesting this would require
Andrew> unwinding the register...", was our concern just that this unwinding
Andrew> might be expensive? Or are you worried that trying to do that might
Andrew> break in some way?

I was concerned that it would break in some way, by trying to unwind a
register while in the process of unwinding.

If it works, and is reasonably robust, then I'm fine.

Andrew> I guess what I'm saying is, that yes it will be lazy, but I hadn't
Andrew> really considered that an important part of the system.

I think I see. Thanks.

Tom