public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: gdb@sources.redhat.com
Subject: Re: RFC: GDB as a loader 2/3: return child result
Date: Sat, 05 Nov 2005 02:46:00 -0000	[thread overview]
Message-ID: <20051105024606.GA20989@nevyn.them.org> (raw)
In-Reply-To: <4354DC55.4090706@st.com>

On Tue, Oct 18, 2005 at 12:28:21PM +0100, Andrew STUBBS wrote:
> Hi all,
> 
> The attached patch implements a new option --return-child-result. This
> option causes GDB to return the return value of the last child
> (inferior) program to run. The patch assumes that the batch-silent patch
> has already been applied.
> 
> Note that 'quit <expr>' still works as expected. Also, any exit through
> a mechanism other than quit_force (i.e. errors) gives the same exit code
> as it did before. Batch mode has been adjusted to exit through
> quit_force in order to ensure it give the right result.
> 
> I am not sure that this has been implemented in the best way. The
> declaration of extern variables probably ought to be moved to a header
> file somewhere, but I'm not sure which is best. It has also been
> suggested that it ought to use the value stored in the existing
> $_exitcode convenience variable.

Sorry, I never got around to looking at the code portion of this. 
Would you mind making one cleanup for me?

It doesn't really matter which header the externs go in.  But they have
to go in a header, visible at both the point of definition and the
point of use.  No externs in C files.  top.h or main.h should be fine.

Otherwise it looks great.  Thanks.


-- 
Daniel Jacobowitz
CodeSourcery, LLC

  parent reply	other threads:[~2005-11-05  2:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-18 11:30 Andrew STUBBS
2005-10-28 11:06 ` Andrew STUBBS
2005-10-28 12:58   ` Eli Zaretskii
2005-10-28 14:01     ` Andrew STUBBS
2005-10-28 17:00       ` Eli Zaretskii
2005-11-03 11:57         ` Andrew STUBBS
2005-11-04 10:46           ` Eli Zaretskii
2005-11-04 11:52             ` Andrew STUBBS
2005-11-05  2:46 ` Daniel Jacobowitz [this message]
2005-11-07 12:20   ` Andrew STUBBS
2005-11-07 14:02     ` Daniel Jacobowitz
2005-11-07 14:40       ` Andrew STUBBS
2005-11-07 14:42         ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051105024606.GA20989@nevyn.them.org \
    --to=drow@false.org \
    --cc=andrew.stubbs@st.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).