[RFC][Python] gdbpy_frame_stop_reason_string bug
Phil Muldoon
pmuldoon@redhat.com
Wed Oct 12 14:33:00 GMT 2011
Kevin Pouget <kevin.pouget@gmail.com> writes:
> Hi,
>
> I wanted to discuss the best way to solve this bug before going any
> further in the development:
>
>> (gdb) py print gdb.frame_stop_reason_string(2)
>> /home/kevin/travail/git/gdb/gdb/frame.c:2372: internal-error: Invalid frame stop reason
>> A problem internal to GDB has been detected,further debugging may prove unreliable.
Why not use the supplied gdb constants in this case? "2" does not map
to any enum.
IE gdb.FRAME_UNWIND_NO_REASON
These 1:1 mappings of the internal GDB enums.
FWIW I think we should error check this function for each enum. The < 0
&& >UNWIND_NO_SAVED_PC check seems too liberal.
Cheers,
Phil
More information about the Gdb-patches
mailing list