public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/27989] New: gdb.base/args.exp fails with native-extended-gdbserver board
@ 2021-06-16 18:45 simark at simark dot ca
  2021-06-16 19:11 ` [Bug gdb/27989] " simark at simark dot ca
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: simark at simark dot ca @ 2021-06-16 18:45 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27989
           Summary: gdb.base/args.exp fails with native-extended-gdbserver
                    board
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: simark at simark dot ca
  Target Milestone: ---

It boils down to this.  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:

salut
''
toi


With extended-remote (with a gdbserver --multi listening on 1234):

$ ./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:

salut
\'\'
toi


I have not dug more than that, but I think that shows a bug in the
extended-remote version.  Here, I want to literally pass
<single-quote><single-quote> as the argument to my program, such that

  strcmp ("''", argv[2]) == 0

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-09 14:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 18:45 [Bug gdb/27989] New: gdb.base/args.exp fails with native-extended-gdbserver board simark at simark dot ca
2021-06-16 19:11 ` [Bug gdb/27989] " simark at simark dot ca
2021-06-17 13:42 ` cvs-commit at gcc dot gnu.org
2021-10-21 13:52 ` m.weghorn at posteo dot de
2023-10-06 12:08 ` cvs-commit at gcc dot gnu.org
2023-10-06 12:08 ` cvs-commit at gcc dot gnu.org
2023-10-09 14:40 ` aburgess at redhat dot com

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).