all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Pankaj Jangid <p4j@j4d.net>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: How to run emacs under a debugger on macOS?
Date: Sat, 11 Jan 2020 13:48:35 +0000	[thread overview]
Message-ID: <20200111134835.GA40597@breton.holly.idiocy.org> (raw)
In-Reply-To: <0100016f94604822-8343ce50-8fdf-4b92-9e0b-70d45cda9dc2-000000@email.amazonses.com>

On Sat, Jan 11, 2020 at 11:32:15AM +0000, Pankaj Jangid wrote:
> I haven't done any C/C++ programming on macOS. I am just a user who
> connects to remote machines for development. Those who have done it on
> macos, please help.
> 
> On GNU/Linux, launching a debug build under a debugger is simple "gdb
> <binary>". How does Emacs dev community do so on macos? Also tell me how
> to make a debug build on macos. Usually I just
> 
> make install
> test the binary (./src/emacs -Q)
> rm -rf /Applications/Emacs.app
> cp -r nextstep/Emacs.app /Applications/Emacs.app
> 
> In short,
> 1. How to make debug build?
> 2. How to launch emacs under a debugger on macos?
> 3. Any other instructions relevant for debugging.

I usually do something like:

    ./configure CFLAGS="-g -O0"
    make
    make install
    lldb nextstep/Emacs.app/Contents/MacOS/Emacs

and in lldb

    run -Q

lldb’s not ideal, though, as it doesn’t support the commands in
src/.gdbinit that make working with lisp structures easier.

It’s possible to use gdb on macOS, but you need to at a minimum sign
it, and upgrades will undo that so you have to do it again. I don’t
usually bother with gdb.

-- 
Alan Third



  reply	other threads:[~2020-01-11 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11 11:32 How to run emacs under a debugger on macOS? Pankaj Jangid
2020-01-11 13:48 ` Alan Third [this message]
2020-01-11 13:58   ` Yuan Fu
2020-01-11 19:00   ` Pankaj Jangid
2020-01-11 19:11     ` Alan Third
2020-01-12  4:24       ` Pankaj Jangid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200111134835.GA40597@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    --cc=p4j@j4d.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.