From: Simon Marchi <simon.marchi@polymtl.ca>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Make "info proc cmdline" show args on GNU/Linux
Date: Thu, 22 Mar 2018 11:18:00 -0000 [thread overview]
Message-ID: <a50c3a8291a217b1d6f2591798850b8e@polymtl.ca> (raw)
In-Reply-To: <m3po3wv5v4.fsf@oc1027705133.ibm.com>
On 2018-03-22 05:04, Andreas Arnez wrote:
>>>
>>> +# Set command line arguments to be verified later with "info proc
>>> +# cmdline". However, if we're using a stub, then "set args" would
>>> not
>>> +# have any effect, so then just skip this.
>>> +
>>> +set cmdline ""
>>> +if { ! [target_info exists use_gdb_stub] } {
>>
>> The use_gdb_stub proc from lib/gdb.exp should be used instead (its
>> comment
>> explains why).
>
> Ah, OK. There are still some occurrences of "target_info exists
> use_gdb_stub" in the test suite. Should these be replaced as well?
Yes, they probably should.
>>
>>> + set cmdline "-i foo bar -o baz 1234"
>>> + gdb_test_no_output "set args $cmdline" "set args"
>>> +}
>>> +
>>> if { ! [ runto_main ] } then {
>>> untested "could not run to main"
>>> return -1
>>> @@ -50,6 +60,9 @@ gdb_test "info proc mapping" \
>>> "info proc mapping"
>>>
>>> if {[istarget "*-*-linux*"]} {
>>> + if { $cmdline != "" } {
>>> + gdb_test "info proc cmdline" "cmdline = \'.* $cmdline\'"
>>
>> The backslashes are unnecessary.
>
> Right.
>
> Thanks for your review. Pushed with these fixes.
Thanks!
Simon
next prev parent reply other threads:[~2018-03-22 11:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 13:15 Andreas Arnez
2018-03-21 19:28 ` Simon Marchi
2018-03-22 9:04 ` Andreas Arnez
2018-03-22 11:18 ` Simon Marchi [this message]
2018-03-22 18:46 ` Andreas Arnez
2018-03-22 20:12 ` Simon Marchi
2018-03-23 10:02 ` Andreas Arnez
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=a50c3a8291a217b1d6f2591798850b8e@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).