Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	gdb-patches@sourceware.org,        marc.khouzam@ericsson.com
Subject: Re: [PATCH v2] Exit code of exited inferiors
Date: Mon, 17 Jun 2013 16:51:00 -0000	[thread overview]
Message-ID: <51BF3B57.3010906@redhat.com> (raw)
In-Reply-To: <51BF3393.30002@ericsson.com>

On 06/17/2013 05:04 PM, Simon Marchi wrote:
> On 13-06-06 12:50 PM, Pedro Alves wrote:
>> Please also make sure the test works with gdbserver, with:
>>
>>    make check RUNTESTFLAGS="--target_board=native-gdbserver"
>>
>> Thanks,
> 
> Hmm, it seems that testing with gdbserver doesn't handle arguments passing, so it doesn't work. How could it be done?

We haven't seen exit-code.c yet :-) but I imagine that it just
returns a different error code depending on the argument?
You could instead make gdb run to main, and then set a global in the
program with the desired return code.  Or build two programs, and pick
the return code depending on a macro.  You can pass additional_flags=-Dfoo=bar
to prepare_for_testing/gdb_compile to define macros/symbols.  Several
examples on that in the testsuite.

Do note:
http://sourceware.org/gdb/wiki/GDBTestcaseCookbook#Make_sure_test_executables_are_unique

-- 
Pedro Alves


  reply	other threads:[~2013-06-17 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51A5160D.40800@ericsson.com>
2013-05-29 15:57 ` Eli Zaretskii
2013-05-29 16:02   ` Simon Marchi
2013-06-06 17:41     ` Pedro Alves
2013-06-06 18:34       ` Tom Tromey
2013-06-06 19:09       ` Simon Marchi
2013-06-17 16:13       ` Simon Marchi
2013-06-17 16:51         ` Pedro Alves [this message]
2013-06-17 18:42           ` Simon Marchi

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=51BF3B57.3010906@redhat.com \
    --to=palves@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    --cc=simon.marchi@ericsson.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