Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [rfc] "reset" / "create-inferior" commands
@ 2006-11-01 20:28 Daniel Jacobowitz
  2006-11-01 20:37 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2006-11-01 20:28 UTC (permalink / raw)
  To: gdb

Some time ago I asked about name choices for a command which would create a
new process, or restart an existing process, without running it.  I've
already done the GDB internals work for such a command; the only reason I
haven't added one already is that I couldn't come up with a name.

Here's what it should do:
  - When doing native debugging, it should fork and exec the program,
    and run until the command shell execs the real program (if necessary).
  - When connected to a remote embedded board, it should send the "restart"
    packet.

That corresponds in both cases to calling target_create_inferior but not
proceed.

I haven't seen a good name which works for both scenarios.  The best idea so
far comes from Paul Brook - if we call the new command "reset", it's
accurate for boards, and not terribly awkward for native processes.
Alternatively, we could add two names for the command which did the same
thing ("create-inferior" or "create-process" as an alias for "reset").

[I would actually have picked "restart" over "reset", but that's taken for
checkpoints.  We could still steal it and use "restart checkpoint 1" for
checkpoints, if others think restart is preferable to reset.]

Any comments on this name?  I keep wanting the command, so I'd like to find
an acceptable name, and then I can go ahead and implement it.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] "reset" / "create-inferior" commands
  2006-11-01 20:28 [rfc] "reset" / "create-inferior" commands Daniel Jacobowitz
@ 2006-11-01 20:37 ` Eli Zaretskii
  2006-11-02  3:06   ` Joel Brobecker
  2006-11-01 22:56 ` Mark Kettenis
  2006-11-02 11:53 ` Andrew STUBBS
  2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2006-11-01 20:37 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

> Date: Wed, 1 Nov 2006 15:28:11 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> I haven't seen a good name which works for both scenarios.  The best idea so
> far comes from Paul Brook - if we call the new command "reset", it's
> accurate for boards, and not terribly awkward for native processes.
> Alternatively, we could add two names for the command which did the same
> thing ("create-inferior" or "create-process" as an alias for "reset").
> 
> [I would actually have picked "restart" over "reset", but that's taken for
> checkpoints.  We could still steal it and use "restart checkpoint 1" for
> checkpoints, if others think restart is preferable to reset.]
> 
> Any comments on this name?  I keep wanting the command, so I'd like to find
> an acceptable name, and then I can go ahead and implement it.

"restart" is good, IMHO.  Some alternative names we might consider:
reinvoke, start-again.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] "reset" / "create-inferior" commands
  2006-11-01 20:28 [rfc] "reset" / "create-inferior" commands Daniel Jacobowitz
  2006-11-01 20:37 ` Eli Zaretskii
@ 2006-11-01 22:56 ` Mark Kettenis
  2006-11-01 23:06   ` Daniel Jacobowitz
  2006-11-02 11:53 ` Andrew STUBBS
  2 siblings, 1 reply; 9+ messages in thread
From: Mark Kettenis @ 2006-11-01 22:56 UTC (permalink / raw)
  To: drow; +Cc: gdb

> Date: Wed, 1 Nov 2006 15:28:11 -0500
> From: Daniel Jacobowitz <drow@false.org>
> 
> Some time ago I asked about name choices for a command which would create a
> new process, or restart an existing process, without running it.  I've
> already done the GDB internals work for such a command; the only reason I
> haven't added one already is that I couldn't come up with a name.
> 
> Here's what it should do:
>   - When doing native debugging, it should fork and exec the program,
>     and run until the command shell execs the real program (if necessary).
>   - When connected to a remote embedded board, it should send the "restart"
>     packet.
> 
> That corresponds in both cases to calling target_create_inferior but not
> proceed.
> 
> I haven't seen a good name which works for both scenarios.  The best idea so
> far comes from Paul Brook - if we call the new command "reset", it's
> accurate for boards, and not terribly awkward for native processes.
> Alternatively, we could add two names for the command which did the same
> thing ("create-inferior" or "create-process" as an alias for "reset").
> 
> [I would actually have picked "restart" over "reset", but that's taken for
> checkpoints.  We could still steal it and use "restart checkpoint 1" for
> checkpoints, if others think restart is preferable to reset.]
> 
> Any comments on this name?  I keep wanting the command, so I'd like to find
> an acceptable name, and then I can go ahead and implement it.

This sounds like a command I've always wanted, but I don't associate
it at all with "reset".  "create-inferior" might be more appropriate,
but I don't think it'll make sense to people who don't know GDB's
internals.  How about "setup"?  Sounds to me like that's what this
command will do; setting up a new process to be debugged.

Mark


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] "reset" / "create-inferior" commands
  2006-11-01 22:56 ` Mark Kettenis
@ 2006-11-01 23:06   ` Daniel Jacobowitz
  2006-11-02  4:23     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2006-11-01 23:06 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb

On Wed, Nov 01, 2006 at 11:55:49PM +0100, Mark Kettenis wrote:
> This sounds like a command I've always wanted, but I don't associate
> it at all with "reset".  "create-inferior" might be more appropriate,
> but I don't think it'll make sense to people who don't know GDB's
> internals.  How about "setup"?  Sounds to me like that's what this
> command will do; setting up a new process to be debugged.

That does seem more intuitive.

Mark, Eli, how do you feel about using both "restart" and "setup"? 
While they're the same action in GDB internals, I think they're
different actions from the user's point of view.

I'm not going to rush ahead on this - I feel like I've been trying to
come up with a good name for this command for a year now :-)

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] "reset" / "create-inferior" commands
  2006-11-01 20:37 ` Eli Zaretskii
@ 2006-11-02  3:06   ` Joel Brobecker
  0 siblings, 0 replies; 9+ messages in thread
From: Joel Brobecker @ 2006-11-02  3:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Daniel Jacobowitz, gdb

> > Any comments on this name?  I keep wanting the command, so I'd like to find
> > an acceptable name, and then I can go ahead and implement it.
> 
> "restart" is good, IMHO.  Some alternative names we might consider:
> reinvoke, start-again.

The only nit I have with "restart" is that it implies that something
is already running. But I presume that the command could be used when
no process has been started yet, right? I would have liked
"start-process", but then it creates a completion collision with
"start".

"create-process" sounds more accurate to me.

-- 
Joel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] "reset" / "create-inferior" commands
  2006-11-01 23:06   ` Daniel Jacobowitz
@ 2006-11-02  4:23     ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2006-11-02  4:23 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: mark.kettenis, gdb

> Date: Wed, 1 Nov 2006 18:06:23 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sourceware.org
> 
> Mark, Eli, how do you feel about using both "restart" and "setup"? 
> While they're the same action in GDB internals, I think they're
> different actions from the user's point of view.

"setup" is too general, IMO.

OTOH, I have no problems with "create-process" or "create-inferior" or
"init-inferior" or "reinit-inferior".


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] "reset" / "create-inferior" commands
  2006-11-01 20:28 [rfc] "reset" / "create-inferior" commands Daniel Jacobowitz
  2006-11-01 20:37 ` Eli Zaretskii
  2006-11-01 22:56 ` Mark Kettenis
@ 2006-11-02 11:53 ` Andrew STUBBS
  2006-11-02 13:15   ` Frederic RISS
  2 siblings, 1 reply; 9+ messages in thread
From: Andrew STUBBS @ 2006-11-02 11:53 UTC (permalink / raw)
  To: gdb

Daniel Jacobowitz wrote:
> [I would actually have picked "restart" over "reset", but that's taken for
> checkpoints.  We could still steal it and use "restart checkpoint 1" for
> checkpoints, if others think restart is preferable to reset.]

If the initial state is (or can be) considered a special checkpoint then 
this is what it should be.

Otherwise the concepts, and therefore commands, should not be confused.

Another possible name I haven't seen yet is 'launch'.

Andrew


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] "reset" / "create-inferior" commands
  2006-11-02 11:53 ` Andrew STUBBS
@ 2006-11-02 13:15   ` Frederic RISS
  0 siblings, 0 replies; 9+ messages in thread
From: Frederic RISS @ 2006-11-02 13:15 UTC (permalink / raw)
  To: GDB Patches


Daniel Jacobowitz wrote:
> [I would actually have picked "restart" over "reset", but that's taken for
> checkpoints.  We could still steal it and use "restart checkpoint 1" for
> checkpoints, if others think restart is preferable to reset.]

I would say that 'reset' is better. The issue I have with 'restart' is
simple: it seems related to the 'start' command which does something
totally different.

Even semantically 'reset' seems more clear (to set anew). Maybe 'reinit'
would be even better?

That's a command for pretty advanced users. Even if the name isn't
descriptive enough it isn't a big deal... but I think avoiding the
confusion with 'start' is important for basic users.

Fred.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [rfc] "reset" / "create-inferior" commands
@ 2006-11-03 17:16 David Anderson
  0 siblings, 0 replies; 9+ messages in thread
From: David Anderson @ 2006-11-03 17:16 UTC (permalink / raw)
  To: gdb

Did anyone suggest "recreate"?
David Anderson


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-11-03 17:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-01 20:28 [rfc] "reset" / "create-inferior" commands Daniel Jacobowitz
2006-11-01 20:37 ` Eli Zaretskii
2006-11-02  3:06   ` Joel Brobecker
2006-11-01 22:56 ` Mark Kettenis
2006-11-01 23:06   ` Daniel Jacobowitz
2006-11-02  4:23     ` Eli Zaretskii
2006-11-02 11:53 ` Andrew STUBBS
2006-11-02 13:15   ` Frederic RISS
2006-11-03 17:16 David Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox