Proposal: New command "begin"

Joel Brobecker
Wed Apr 7 07:40:00 GMT 2004

> - I think GDB's current source-and-line, should be initialized to 
> "main", as defined by the language.  That way operations such as:
>   $ gdb java-program
>   (gdb) break
>   Breakpoint 1 at Foo::Main(...)
>   (gdb) run
>   Hit breakpoint 1
>   (gdb)
> work.

Hmmm, could be nice.

> - Perhaphs a GDB variable ($main?) that points to the program entry point.

(frown) I am not too keen on this one.

> - And yes, some sort of command to perform a "runto_main".  It's a 
> sufficiently standard GUI operation to justify its presence.
> I'm just not sure about "begin" as a good choice of command name - 
> begin goes better with end, and that's a compound command terminator.

I like "begin", but I'm not that attached to this name. If we can agree
on a better command name, I'll take care of sending an implementation
plan on gdb-patches.

> Is this mainly for GUI, or the user?

Both, actually. We have a button for it in our GUI, but I use it all the
time, and never use a GUI.


More information about the Gdb mailing list