Bug 21980 - Make "show args" show arguments passed through the CLI to gdbserver
Summary: Make "show args" show arguments passed through the CLI to gdbserver
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: server (show other bugs)
Version: 7.11
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 21979 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-20 11:18 UTC by Ciro Santilli
Modified: 2017-08-20 14:27 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ciro Santilli 2017-08-20 11:18:44 UTC
Current behavior is a bit confusing:

    gdbserver :1234 ./prog.out arg0 arg1
    gdb -ex 'target remote :1234' ./prog.out
    
Then:

    (gdb) b main
    (gdb) c
    (gdb) show args
    Argument list to give program being debugged when it is started is ""
    (gdb) print argc
    $1 = 3

Would require sending the arguments over the protocol I expect.
Comment 1 Ciro Santilli 2017-08-20 11:37:11 UTC
And while we are at it, also make args persist for --multi across runs: currently it is only used for the first one. See also: https://sourceware.org/bugzilla/show_bug.cgi?id=21981
Comment 2 Andreas Schwab 2017-08-20 12:57:19 UTC
*** Bug 21979 has been marked as a duplicate of this bug. ***
Comment 3 Ciro Santilli 2017-08-20 14:27:47 UTC
Sorry, the site or my internet was a bit shaky.