From owner-freebsd-hackers@freebsd.org Mon Dec 19 22:01:50 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CB28C88FF6 for ; Mon, 19 Dec 2016 22:01:50 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (unknown [IPv6:2001:4060:1:1001::14:54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15FD91EC1 for ; Mon, 19 Dec 2016 22:01:49 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 5A666F6B7E for ; Mon, 19 Dec 2016 23:01:46 +0100 (CET) Subject: Re: Where is Gdb's start command? To: freebsd-hackers@freebsd.org References: <20161219215115.GA8918@becker.bs.l> From: Andreas Tobler Message-ID: <69318469-42ce-ceba-3892-94d9a100226a@fgznet.ch> Date: Mon, 19 Dec 2016 23:03:29 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161219215115.GA8918@becker.bs.l> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: Obelix Submit on 127.0.1.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2016 22:01:50 -0000 On 19.12.16 22:51, 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". 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? > > $ gdb -version > GNU gdb 6.1.1 [FreeBSD] > ... > $ uname -r > 10.3-STABLE > > Thanks in advance. If you use the ports devel/gdb the start command works as documented. If you are bound to the src gdb then you might want to try the 'run' command. Personally I'd recommend using the ports gdb. Andreas