This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New "attach" and "rsh" features for GDB/gdbserver on PowerPC


Just FYI,
> Description:
> 
> Many  embedded  systems  use  gdbserver  for  application  debugging.
> However  the  current  implementation  (on PowerPC) requires that the
> processes to be debugged are started under control of gdbserver.  But
> often  you  want to debug (examine) some process on the target system
> that is already running. This is supported by the new support for the
> "attach" command.

I get the feeling that this change is pretty sigifnicant in terms of the 
protocol (new ``I'' response, new attach packet, ...?).  Could you 
please post something describing what you plan on changing.

> This allows to have always one instance of gdbserver running  on  the
> target  as  a general purpose debug server that can be used to attach
> to any of the running application processes. In  this  "server  mode"
> (when  no  command  to  debug is given on the gdbserver command line)
> gdbserver will not terminate when the debugged  process  exits,  thus
> making sure you can continue to use the debug server.
> 
> The "rshell" (remote shell) extension allows to use GDB/gdbserver  to
> run arbitrary commands on the target system. The main intention is to
> be  able  to find out the PIDs of the processes you want to attach to
> by running a "ps" command without need for additional services on the
> target.

BTW,  there is already the ``(gdb) monitor'' command and the 
corresponding ``qRcmd'' packet.

As a general rule, features are always present - using #ifdef 
HAVE_TARGET_ATTACH #ifdef FOO #else #endif is probably not a good idea.

enjoy,
Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]