This is the mail archive of the gdb@sourceware.org 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]

"run" behavior for "target remote"


This is just a thought extracted from my TODO list; not planning on making
any changes right now, but I wanted to throw out the idea for comments.

If you are connected to a target which does not support "run", for instance
a remote (not extended-remote) target, then run does these things:

  - kill
  - disconnect
  - run natively

If you're using gdbserver to localhost, you'll almost not notice the
difference.  Suddenly, instead of using a TCP connection to debug, you're
using native ptrace within GDB.  If you're using a cross debugger, the first
two steps will happen and then GDB will give you an error "Don't know how to
run".

Does anyone think that this behavior is useful?  If not, when connected to a
target which can execute (target_has_execution), but can't create new
processes or restart (no to_create_inferior) I think that "run" should
issue an error.

This originates, I think, with corefiles.  "run" when debugging a core file
switches from the core target to the native target and executes.  We can
easily preserve that.

-- 
Daniel Jacobowitz
CodeSourcery


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