[Bug gdb/27989] gdb.base/args.exp fails with native-extended-gdbserver board

simark at simark dot ca sourceware-bugzilla@sourceware.org
Wed Jun 16 19:11:16 GMT 2021


https://sourceware.org/bugzilla/show_bug.cgi?id=27989

--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
Same goes for a newline.  The argument passed on the shell is literally just a
newline character, 0x0a.  I added some HTML-like annotations to see where the
args start and end, for clarity.  With native:

$ ./gdb -nx -q --data-directory=data-directory \
    -ex r \              
    --args
/home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/args/args salut
"              
" toi

produces

<arg1>salut</arg1>
<arg2>
</arg2>
<arg3>toi</arg3>


With extended-remote:

./gdb -nx -q --data-directory=data-directory \
    -ex "tar ext :1234" \
    -ex "set remote exec-file
/home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/args/args" \
    -ex "set sysroot" \
    -ex r \
    --args
/home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/args/args salut
"
" toi

produces

<arg1>salut</arg1>
<arg2>'
'</arg2>
<arg3>toi</arg3>


In the second case, single quotes appeared out of nowhere.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list