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 13:09:09 +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="001a114451d2734ed105567783ba" X-Trace: blaine.gmane.org 1502446243 10296 195.159.176.226 (11 Aug 2017 10:10:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2017 10:10:43 +0000 (UTC) Cc: Paul Eggert , Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 11 12:10:35 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 1dg6tl-00024W-8l for ged-emacs-devel@m.gmane.org; Fri, 11 Aug 2017 12:10:33 +0200 Original-Received: from localhost ([::1]:54404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg6tp-0006mT-S3 for ged-emacs-devel@m.gmane.org; Fri, 11 Aug 2017 06:10:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg6t9-0006lU-6o for emacs-devel@gnu.org; Fri, 11 Aug 2017 06:09:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dg6t7-0001vO-JQ for emacs-devel@gnu.org; Fri, 11 Aug 2017 06:09:55 -0400 Original-Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:34911) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dg6t5-0001uA-8X; Fri, 11 Aug 2017 06:09:51 -0400 Original-Received: by mail-wm0-x235.google.com with SMTP id m85so38289249wma.0; Fri, 11 Aug 2017 03:09:51 -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=F4bY76sWO0+c8C2+HgWPDPTWqxCMP6znjG3pdaA58aA=; b=sOl7H+8B0/Url2ptJ4wRWyzIlDXRFomSO8xCCkJNchEZ74roVasDZoB+OzXlNMwPds TS3x8m4KST/yIZatybcWJr/Rg+WvAlOQinM1qTU/roCo742r0Xlx0LstONVOxi9Hle/e o9h/s5kfEzpv+5dV25u0DRq3etv83HubCF8Pf1/G0kgMEdGWWSomvSWik+Vf66Q1SCoY srewJ/aAmptsj4bE8b8vKUmo2tX7EXBXilyr8O180W5WPk7GstFqV08jyhlem/aHAee9 zWgm1f53tpVK0xIEEbDGxQ9vOsFnvqdhDmn70CsbDHVOVG+3EwHZ4TsJBWJNBSeHK1a2 UMQQ== 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=F4bY76sWO0+c8C2+HgWPDPTWqxCMP6znjG3pdaA58aA=; b=sHN6YvHrkT29FiYB3I9BIs43QhfMu9fna7ANyr6iTW3P7bSPwLcXvtflio+Qi44TnY 3hwA1eA8i95TZwCGAnm2sL67MUNJh6sKaH4gkr3c9nsuDthM6bXzIBfv027ygEJVXwd7 XWwuxX9hTSQsI4amXPYhS3fSB/m8ni4mo80iqaT2rWz8h3oFabzA47dhv5T8N37jO3Jg 2NNXDz9RPRsNq+omNYXx2O3Tji8hmFtEQPHv2stEEq/0OsNHo1n+1kt7UivLCV+6LImw QqWIIbx2vEBCtBAL/TvlPqRTHJahG/E2MsJdHPV9ykGCqbPwijUMgdwl5pMM7QscMUbL Vu2Q== X-Gm-Message-State: AHYfb5gYpCBJqDdsq+ZjJDPA4EWFuKMXLYI8GalSIxr9Y3G802sYbm41 R3CFr9EIiueBRVWV8BzGPfsTI5Fqzp7o X-Received: by 10.28.136.147 with SMTP id k141mr10685174wmd.131.1502446190020; Fri, 11 Aug 2017 03:09:50 -0700 (PDT) Original-Received: by 10.28.197.196 with HTTP; Fri, 11 Aug 2017 03:09:09 -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:c09::235 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:217424 Archived-At: --001a114451d2734ed105567783ba Content-Type: text/plain; charset="UTF-8" OK, I think I misunderstood Paul's command line "M-x gud-gdb RET bootstrap-emacs RET" as meaning that after executing "M-x gud-gdb RET" the only thing that should appear after the prompt is "bootstrap-emacs", so I deleted the "gdb --full-name" prefix that appeared there automatically. If I keep this prefix, the error reported above doesn't occur. However, now I get the following complaint from gdb: > No executable file specified. > Use the "file" or "exec-file" command. Here's the complete contents of the *gud* buffer. Current directory is ~/ GNU gdb (GDB) 8.0 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-apple-darwin16.6.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... bootstrap-emacs: No such file or directory. (gdb) b main 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. 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? > > On Fri, Aug 11, 2017 at 12:55 PM, Itai Berli wrote: > >> Typing "b main" in the *gud* buffer results in the following error >> message: >> >> > Current buffer has no process >> >> On Fri, Aug 11, 2017 at 12:52 PM, Eli Zaretskii wrote: >> >>> > From: Itai Berli >>> > Date: Fri, 11 Aug 2017 12:27:01 +0300 >>> > Cc: Emacs developers >>> > >>> > Paul Eggert wrote: >>> > >>> > > type the GDB command "b Fexpand_file_name" to plant a breakpoint in >>> (say) Fexpand_file_name >>> > >>> > What do you mean by 'Fexpand_file_name'? The name of a file, or the >>> name of a function? >>> >>> It's the name of a function. >>> >>> > Could you give me >>> > a concrete example? Suppose, for instance, I wish to place a >>> breakpoint at the start of the 'main; function. How >>> > can I do so? >>> >>> "b main". "b" is a short for "break". >>> >> >> > --001a114451d2734ed105567783ba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
OK, I think I misunderstood Paul's command line= =C2=A0"M-x gud-gdb RET bootstrap-emac= s RET" as meaning that after executing "M-x gud-gdb RET" the only thing that should appear afte= r the prompt is "bootstrap-ema= cs", so I deleted the "gdb --full-name" prefix that appeared= there automatically. If I keep this prefix, the error reported above doesn= 't occur. However, now I get the following complaint from gdb:

> No executable file specified.
> Use the "file" or &= quot;exec-file" command.

Here'= s the complete contents of the *gud* buffer.

Current directory is ~/
GNU gdb (GDB) 8.0
C= opyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/l= icenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the= extent permitted by law.=C2=A0 Type "show copying"
<= div>and "show warranty" for deta= ils.
This GDB was configu= red as "x86_64-apple-darwin16.6.0".
Type "show configuration" for configuration= details.
For bug reporti= ng instructions, please see:
Find the GDB manual and other documentation res= ources online at:
For help, type "help".<= /div>
Type "apropos word" to= search for commands related to "word"...
bootstrap-emacs: No such file or directory.
(gdb) b main
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.

On Fri, Aug 11, 2017 at 12:59 PM, Itai Berli <itai= .berli@gmail.com> wrote:
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? But I started Emacs from ~/emacs. How can I set the *gud* buffer&#= 39;s current directory?
=
On Fri, Aug 11, 2017 at 12:55 PM, Itai Berli= <itai.berli@gmail.com> wrote:
Typing "b main<RET= >" in the *gud* buffer results in the following error message:

> Current buffer has no process

On Fri, Aug 11, 2017 at 12:52 PM, Eli Zaretskii <eliz@gnu.org= > wrote:
> From: Itai Berli <itai.berli@gmail.com>
> Date: Fri, 11 Aug 2017 12:27:01 +0300
> Cc: Emacs developers <emacs-devel@gnu.org>
>
> Paul Eggert wrote:
>
> > type the GDB command "b Fexpand_file_name" to plant a b= reakpoint in (say) Fexpand_file_name
>
> What do you mean by 'Fexpand_file_name'? The name of a file, o= r the name of a function?

It's the name of a function.

> Could you give me
> a concrete example? Suppose, for instance, I wish to place a breakpoin= t at the start of the 'main; function. How
> can I do so?

"b main".=C2=A0 "b" is a short for "break&q= uot;.



--001a114451d2734ed105567783ba--