This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][Python] gdbpy_frame_stop_reason_string bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]