Where is Gdb's start command?
Greg 'groggy' Lehey
grog at FreeBSD.org
Mon Dec 19 22:19:03 UTC 2016
On Monday, 19 December 2016 at 22:51:15 +0100, Bertram Scharpf wrote:
> Hi,
>
> I do not actually want to debug something but rather write
> some Gdb examples for a tutorial. I would like the program
> to stop at the first instruction of main(). Normally I do
> this using the command "start".
I've never seen this before.
> But on my FreeBSD this command doesn't seem to exist.
>
> (gdb) n
> The program is not being run.
> (gdb) start
> Undefined command: "start". Try "help".
> (gdb) help start
> Undefined command: "start". Try "help".
>
> Why isn't it defined? What should I say instead?
It is defined, just not in terms that you're expecting. run or r.
But that will run the program. First you need to set a breakpoint
where you want to stop:
(gdb) b main
(gbb) r
Greg
--
Sent from my desktop computer.
Finger grog at FreeBSD.org for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed. If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20161220/22656d9c/attachment.sig>
More information about the freebsd-hackers
mailing list