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

Tom Tromey
2021-06-07T14:51:29Z

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> So, in this patch I propose that in the unwinder code, when
Andrew> add_saved_register is called, if it is passed a
Andrew> user-register (i.e. non-cooked) then we first fetch the register,
Andrew> extract the real register number from the value's location, and use
Andrew> that new register number when handling the add_saved_register call.

Andrew> If either the value location that we get for the user-register is not
Andrew> a cooked register then we can throw a 'Bad register' error back to the
Andrew> Python code, but in most cases this will not happen.

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?

Tom