This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] PR/12691 Add the inferior to Python exited event
> ?An integer representing the exit code, if available, which the
>> ?inferior has returned. ?(The exit code could be unavailable if, for
>> ?example, @value{GDBN} detaches from the inferior.)
>>
>
> right, I've updated the patch, is it fine for you ?
The old text is more explicit about what you see if the exit code is not available. It would be good to keep that -- i.e., the attribute isn't there if the exit code is not available. The reason for being explicit is that a different way of handling that situation -- and arguably a more "Pythonic" one -- is for the attribute to exist in all cases but have the value None if not applicable. So you might make it:
+An integer representing the exit code, if available, which the inferior
+has returned. (The exit code could be unavailable if, for example,
+@value{GDBN} detaches from the inferior.) If the exit code is
+unavailable, the attribute does not exist.
paul