This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC][Python] gdbpy_frame_stop_reason_string bug
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Kevin Pouget <kevin dot pouget at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 12 Oct 2011 15:33:03 +0100
- Subject: Re: [RFC][Python] gdbpy_frame_stop_reason_string bug
- References: <CAPftXULjbKonB=-YneTVg+jeZiUDUruqtjrTighL8dgXTWoo_g@mail.gmail.com>
- Reply-to: pmuldoon at redhat dot com
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