[PATCH 4/4] [PR gdbserver/25893]: Add gdbserver test for argument with space in it

Simon Marchi simark@simark.ca
Tue May 12 16:50:19 GMT 2020


On 2020-05-12 12:20 p.m., Michael Weghorn via Gdb-patches wrote:
> On 11/05/2020 17.04, Simon Marchi wrote:
>> On 2020-05-11 10:33 a.m., Michael Weghorn wrote:
>>> These don't work yet with the last patch series. I'll recheck once I
>>> have finished updating the patch series and in particular fixed the
>>> segfault you mentioned earlier.
>>>
>>> I hope to be able to send an updated patch series tomorrow.
>>>
>>> Do I understand correctly that I can just drop my patch adding the test,
>>> since this is now already covered in a better way by the test case added
>>> in your second patch?
>>
>> I think so.  You can insert my two patches in your series, as the test depends
>> on the fix.
>>
>> If you haven't found already: after running the `make check` commands, the
>> transcript is found in testsuite/gdb.log.
> 
> Thanks a lot, in particular also for your previous explanations of how
> those things work together and how to run the various configurations.
> Those really helped in finding out what was going wrong.
> 
> The problem was that 'handle_v_run' in 'gdbserver/server.cc' already had
> some special handling for empty args, passing them as "''" into the arg
> vector, and 'construct_inferior_arguments' then took this as a literal
> string, so the output of the empty argv[2] was "''" instead of "".
> 
> I adapted this in the new version of that patch:
> https://sourceware.org/pipermail/gdb-patches/2020-May/168350.html
> 
> All of
> 
>   make check TESTS="gdb.base/inferior-args.exp"
> RUNTESTFLAGS="--target_board=native-gdbserver"
> 
>   make check TESTS="gdb.base/inferior-args.exp"
> RUNTESTFLAGS="--target_board=unix"
> 
>   make check TESTS="gdb.base/inferior-args.exp"
> RUNTESTFLAGS="--target_board=native-extended-gdbserver"
> 
> now pass for me on linux-amd64 (Debian testing) with the new patch set
> and your two commits on top.
> 
> I did not explicitly add your commits in the patch series I sent, just
> applied them locally (since I was uncertain of how to properly handle
> the mismatch between you being the patch author and myself being the
> submitter/email sender).

If you try to git-send-email a commit for which you are not the "Author",
it will still send the email with you as the "From:", but there will be
an extra "From:" line in the body, such that when applied, the correct
author will be used.  In other words, it works to git-send-email patches
made by somebody else.

Thanks for sending a new version, I'll take a look.

Simon


More information about the Gdb-patches mailing list