From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/breakpoints] Fix sigsegv in info prog at exec catchpoint
Date: Wed, 25 Jul 2018 19:17:00 -0000 [thread overview]
Message-ID: <87wotjyvkh.fsf@tromey.com> (raw)
In-Reply-To: <20180720141359.qycrai5coi5rdyag@delia> (Tom de Vries's message of "Fri, 20 Jul 2018 16:14:00 +0200")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> The patch fixes the segfault by returning an error in info_program_command
Tom> if get_last_target_status returns minus_one_ptid.
Tom> The test-case is non-standard, because the standard approach runs into
Tom> PR23020, a problem with gdb going to the background.
Is it possible to fix this part first?
Otherwise it seems to me that the test case has some issues.
Also, is the bug dependent on -batch? This wasn't clear to me, but I
guess if it is then the approach to the test case makes more sense.
Tom> PR breakpoints/23366
Tom> * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
This part looks ok to me.
Tom> +if { ![file exists /bin/bash] } {
...
Tom> +if { ![file exists /bin/ls] } {
...
Tom> + catch {exec /bin/bash -c "$GDB $FLAGS"} catchlog
I think this sort of thing can't be done when doing remote host testing,
so some sort of check is needed for that. I don't remember any more
exactly how this is done but there should be other examples in the tree.
Tom> +if { ![file exists /bin/bash] } {
Tom> + unsupported "no bash"
Tom> +}
Also there has to be a "return" after the "unsupported"; unsupported
just logs a message and without the return, the rest of the test will
still be run.
Tom
next prev parent reply other threads:[~2018-07-25 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-20 14:13 Tom de Vries
2018-07-25 19:17 ` Tom Tromey [this message]
2018-07-25 23:05 ` Tom de Vries
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=87wotjyvkh.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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