This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v5] Exit code of exited inferiors in -list-thread-groups
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: gdb-patches at sourceware dot org, Tom Tromey <tromey at redhat dot com>
- Date: Tue, 03 Jun 2014 16:27:46 +0100
- Subject: Re: [PATCH v5] Exit code of exited inferiors in -list-thread-groups
- Authentication-results: sourceware.org; auth=none
- References: <1400018204-29559-1-git-send-email-simon dot marchi at ericsson dot com> <87mweh31qi dot fsf at fleche dot redhat dot com> <537CE38B dot 7040000 at ericsson dot com> <537CEBCB dot 5020401 at redhat dot com> <538CC2CD dot 9040309 at ericsson dot com> <538CCF1F dot 5000902 at redhat dot com> <538CDC9E dot 9020506 at ericsson dot com>
On 06/02/2014 09:20 PM, Simon Marchi wrote:
>> > keeping things octal, for consistency with what the user sees in the
>> > console.
> I had forgotten that the exit-code was already displayed somewhere else in the MI. Indeed,
> having the same field in different formats in different records would make a very bad interface.
>
> Speaking of which, the documentation for the *stopped record does not mention exit-code at
> all. I think it should, since it appears in it when the exit code is not 0.
Yeah. It only appears in an example of -exec-run:
@smallexample
(gdb)
-exec-run
^running
(gdb)
x = 55
*stopped,reason="exited",exit-code="01"
(gdb)
@end smallexample
>
>> > (Note you had missed updating at least one example in the manual.)
> I am not sure I understand. The examples in the -list-thread-groups command section? If so, I
> believe they should not contain a exit-code field, as the process is running.
I meant the -exec-run example above. But that was kind of me getting
confused, as the patch doesn't change the output in that case. So read
that as me pointing out a place in the manual where we show the result
in octal, that would need updating if we ever want to change the
output format consistently. :-)
--
Pedro Alves