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.
dup *** This bug has been marked as a duplicate of bug 21980 ***