Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrey Utkin <autkin@undo.io>
To: gdb@sourceware.org, Yao Qi <yao.qi@linaro.org>
Subject: Help request on making a gdb testsuite case
Date: Tue, 06 Mar 2018 18:01:00 -0000	[thread overview]
Message-ID: <20180306180136.GA27627@undo-autkin> (raw)

Hi GDB devs,

I have found that the case of restarting the debuggee in extended-remote
session has been broken in GDB for undetermined, but quite long time
(predating gdb 7.10.1).

It got fixed in git master just recently, on February 15 by Yao Qi in
commit 85046ae23f85 (thanks a lot!). Anyway, now I have an automated way
to detect the bug which got fixed, and would like to turn it into a case
in GDB test suite.

# "./simple" is built from "int main(){return 0;}", must be unstripped
timeout 4 "$GDB" \
	-ex "target extended-remote | $GDBSERVER --once - ./simple" \
	-ex 'break main' \
	-ex 'set confirm off' \
	-ex 'run' \
	-ex 'quit' \
	;
# buggy gdb would hang

It is not obvious to me how to write such a testcase. There are three
elements: the debuggee, the server process and the frontend process. I
have very rough idea that some goodness to use is in
lib/gdbserver-support.exp, and almost certainly i'll use gdb_target_cmd
procedure, but beyond that, I'm pretty much lost. How would I specify a
debuggee program, or where do I find one to reuse after other tests?

Any help would be highly appreciated!


             reply	other threads:[~2018-03-06 18:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 18:01 Andrey Utkin [this message]
2018-03-07  3:08 ` 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=20180306180136.GA27627@undo-autkin \
    --to=autkin@undo.io \
    --cc=gdb@sourceware.org \
    --cc=yao.qi@linaro.org \
    /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