[PATCH 1/8] Disallow using --attach and --wrapper together.

Pedro Alves palves@redhat.com
Thu Jul 23 22:29:00 GMT 2015


On 07/20/2015 12:35 PM, Yao Qi wrote:
> gdb/gdbserver:
> 
> 2015-07-15  Yao Qi  <yao.qi@linaro.org>
> 
> 	* server.c (captured_main): Call gdbserver_usage and exit if
> 	attach is true and wrapper_argv isn't NULL.

Really not sure about this.  It's reasonable to do e.g.,
alias gs="gdbserver --wrapper=/whatever/wrapper --"
(or the equivalent wrapper shell script that execs gdbserver)
and then always start that instead of gdbserver:

sometimes:

 $ gs :9999 PROGRAM

othertimes:

 $ gs --attach :9999 $pid

but after the patch, the latter errors out.

Plus, one can combine --attach and --multi, which means
that the wrapper would still apply to processes spawned
after connecting.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list