From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Itai Berli Newsgroups: gmane.emacs.devel Subject: Re: Help getting started debugging Emacs on macOS Sierra Date: Fri, 11 Aug 2017 15:14:23 +0300 Message-ID: References: <87556904-541c-6ef5-5a2b-9b7199ffb603@cs.ucla.edu> <7b152bb1-5768-633c-8b7a-172cc6227a26@cs.ucla.edu> <83valuqvmw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045f4d1a4c13de05567943ce" X-Trace: blaine.gmane.org 1502453725 21156 195.159.176.226 (11 Aug 2017 12:15:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2017 12:15:25 +0000 (UTC) Cc: Emacs developers To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 11 14:15:20 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dg8qO-0004iP-34 for ged-emacs-devel@m.gmane.org; Fri, 11 Aug 2017 14:15:12 +0200 Original-Received: from localhost ([::1]:34993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg8qU-0002zI-BA for ged-emacs-devel@m.gmane.org; Fri, 11 Aug 2017 08:15:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg8qL-0002uZ-F4 for emacs-devel@gnu.org; Fri, 11 Aug 2017 08:15:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dg8qH-0001yL-69 for emacs-devel@gnu.org; Fri, 11 Aug 2017 08:15:09 -0400 Original-Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:36393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dg8qG-0001wk-Ro for emacs-devel@gnu.org; Fri, 11 Aug 2017 08:15:05 -0400 Original-Received: by mail-wr0-x229.google.com with SMTP id y43so12806629wrd.3 for ; Fri, 11 Aug 2017 05:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=n4mnkxn5OyGTYBRMfh+JvT+6El6sXqpUWtwVkbc2204=; b=vL3+B8kp4+R8sr+arP0Kaf4mh1p9oj4Z5sBtB4jauN0sXFp75aDedpIrmGswA/dYWT 9AvNqtc836Re7f4bPif6Z8A04K0cGxgudxwGwgP1tYHrvK0+hz4H7d9mteqcRRQovEgG LCJlfrsbcbybXeQTyJwYsxbfSBaK2QoSQ/sREgwU9wOwzMz0p27E1NFmnZk/VDN1z5Gu SmHY/fwTGgGUs6Kr/BiuA8iLvs7WYkdvyK5MJ37aU2QE4kTp2YJh5MXwTfQ1Ggvj6lRa Hdx0dKsn2Za+2Y2VuEJFPgoBeIazOVC6Bw73Fwhj0Osd8P1K0Ciy5SiBHLkXSXQqmhGn dEFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=n4mnkxn5OyGTYBRMfh+JvT+6El6sXqpUWtwVkbc2204=; b=hgaLpNiofX83PFKAOKITc2s8iVH2GYMUQ9ti+Ft0c9tsMeZJJJ3MAE4OoNeHnOe2CG z3MCkmdTfdPZJym/j6guXvaXyoKNp2ij0IzW/BHzjKo3+J73V+4gAOYRBi8QyAhc7YF9 xZXeSNX68HWHtX8vBc6JqM7BD7MbKSaZYYVsXXyn48JyoASvlxKM2xWe2p1j78MB9VQx q3Oep4reG75ElTftk4h88EgQs3S/CPLzwjEe4G95WSmmI6idOm+dfVFMUYLxqRd9W/YB ge9lpeG2f3gS1rYcbJq9ZJR9iwUqUOsd7rcg6hS3uuVLsgcNKIsgf4Jb8h2Glz2ZgWbz BiUA== X-Gm-Message-State: AHYfb5igUSmGAnPucBoKlSgilbETU1NUKmn9E0Hcf2eA4EaeO5QRUZZ1 6r1+QFbwH9+uJuO6vLd9nkFETjsykw== X-Received: by 10.223.153.234 with SMTP id y97mr10184909wrb.41.1502453703642; Fri, 11 Aug 2017 05:15:03 -0700 (PDT) Original-Received: by 10.28.197.196 with HTTP; Fri, 11 Aug 2017 05:14:23 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217427 Archived-At: --f403045f4d1a4c13de05567943ce Content-Type: text/plain; charset="UTF-8" Thanks, Tino. I've finally managed to get gdb to work by executing the following two instructions at the gdb command prompt: (gdb) cd ~/emacs (gdb) file src/bootstrap-emacs However, your suggestion to execute the following from the terminal, didn't work: > emacs ~/emacs/src Is there a way to configure gdb to use the above settings (cd and file) automatically? On Fri, Aug 11, 2017 at 2:46 PM, Tino Calancha wrote: > > > On Fri, 11 Aug 2017, Itai Berli wrote: > > However, now I get the >> following complaint from gdb: >> >> > No executable file specified. >> > Use the "file" or "exec-file" command. >> > That means, gdb doesn't know which program to debug. > > Here's the complete contents of the *gud* buffer. >> > > Current directory is ~/ >> No symbol table is loaded. Use the "file" command. >> Make breakpoint pending on future shared library load? (y or [n]) y >> Breakpoint 1 (main) pending. >> (gdb) r >> Starting program: >> No executable file specified. >> Use the "file" or "exec-file" command. >> > Assuming your executable is at: > ~/emacs/src/bootstrap-emacs > you can do in the gdb command line: > file ~/emacs/src/bootstrap-emacs > > On Fri, Aug 11, 2017 at 12:59 PM, Itai Berli wrote: >> By the way, the *gud* buffer's first line is >> > Current directory is ~/ >> >> However, the Emacs source code is in ~/emacs. Maybe this is the problem? >> But I started Emacs from ~/emacs. How can I set >> the *gud* buffer's current directory? >> > DUNNO why it doesn't starts at ~/emacs. > You can try from a terminal: > |> emacs ~/emacs/src > ;; now call gdb > M-x gdb RET ; it should offer to debug 'bootstrap-emacs' --f403045f4d1a4c13de05567943ce Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, Tino.

I've finally managed = to get gdb to work by executing the following two instructions at the gdb c= ommand prompt:

(gdb) cd ~/emacs
(gdb) file src= /bootstrap-emacs

However, your suggestion to execu= te the following from the terminal, didn't work:

> emacs ~/emacs/src
=

Is there a way to configure gdb to use the above se= ttings (cd and file) automatically?

On Fri, Aug 11, 2017 at 2:46 PM, Tino = Calancha <tino.calancha@gmail.com> wrote:


On Fri, 11 Aug 2017, Itai Berli wrote:

However, now I get the
following complaint from gdb:

> No executable file specified.
> Use the "file" or "exec-file" command.
That means, gdb doesn't know which program to debug.
Here's the complete contents of the *gud* buffer.

Current directory is ~/
No symbol table is loaded.=C2=A0 Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (main) pending.
(gdb) r
Starting program: =C2=A0
No executable file specified.
Use the "file" or "exec-file" command.
Assuming your executable is at:
~/emacs/src/bootstrap-emacs
you can do in the gdb command line:
file ~/emacs/src/bootstrap-emacs

On Fri, Aug 11, 2017 at 12:59 PM, Itai Berli <itai.berli@gmail.com> wrote:
=C2=A0 =C2=A0 =C2=A0 By the way, the *gud* buffer's first line is
>=C2=A0Current directory is ~/

However, the Emacs source code is in ~/emacs. Maybe this is the problem? Bu= t I started Emacs from ~/emacs. How can I set
the *gud* buffer's current directory?
DUNNO why it doesn't starts at ~/emacs.
You can try from a terminal:
|> emacs ~/emacs/src
;; now call gdb
M-x gdb RET ; it should offer to debug 'bootstrap-emacs'

--f403045f4d1a4c13de05567943ce--