Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Dec 2016 09:18:55 +1100
From:      Greg 'groggy' Lehey <grog@FreeBSD.org>
To:        Bertram Scharpf <lists@bertram-scharpf.de>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Where is Gdb's start command?
Message-ID:  <20161219221855.GB16173@eureka.lemis.com>
In-Reply-To: <20161219215115.GA8918@becker.bs.l>
References:  <20161219215115.GA8918@becker.bs.l>

next in thread | previous in thread | raw e-mail | index | archive | help

--yEPQxsgoJgBvi8ip
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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@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

--yEPQxsgoJgBvi8ip
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAlhYXM8ACgkQIubykFB6QiPRrwCgq+09zvPB1epzHNHbyoJXUBo/
+zEAoJ24mK0jWKHpG0dMbs21J44ZPuq0
=Ouyk
-----END PGP SIGNATURE-----

--yEPQxsgoJgBvi8ip--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161219221855.GB16173>