Frame sniffers in Python/Guile/*

Doug Evans xdje42@gmail.com
Sun Mar 8 20:04:00 GMT 2015


Andy Wingo <wingo@igalia.com> writes:
> [...]
>
> And so on.  From what I can tell, all of this is because there is no
> selected frame.  I recognize that this situation reflects reality in
> some way -- we're still building the selected frame -- but is there any
> way that we could have GDB be in a more "normal" state while the unwind
> callback is running?

I think one gets into trouble if one tries to
apply the word "normal" to gdb. :-)

Things like selected_frame and get_current_arch
are annoying, global state generally is.
Anything you can do untangle the need for global
state will be welcome.

But as you've observed, this is a bit of a special case.
Sometimes the architecture depends on the frame.
And until we know the architecture we don't know
what the registers are. And so on.

I don't have any simple suggestions. Maybe others will.
A lot of times improving/fixing gdb requires first
improving/fixing several other parts first.
Welcome to gdb. :-)



More information about the Gdb-patches mailing list