Bug 21979

Summary: Make show args show CLI arguments passed via gdbserver
Product: gdb Reporter: Ciro Santilli <ciro.santilli>
Component: serverAssignee: Not yet assigned to anyone <unassigned>
Severity: enhancement    
Priority: P2    
Version: 7.11   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Ciro Santilli 2017-08-20 11:16:29 UTC
Current behavior is a bit confusing:

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

    (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 Andreas Schwab 2017-08-20 12:57:19 UTC

*** This bug has been marked as a duplicate of bug 21980 ***