From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: How to run emacs under a debugger on macOS? Date: Sat, 11 Jan 2020 13:48:35 +0000 Message-ID: <20200111134835.GA40597@breton.holly.idiocy.org> References: <0100016f94604822-8343ce50-8fdf-4b92-9e0b-70d45cda9dc2-000000@email.amazonses.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="87305"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel To: Pankaj Jangid Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 11 14:51:48 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iqHAp-000IMG-Sx for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Jan 2020 14:51:32 +0100 Original-Received: from localhost ([::1]:57742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqHAo-0006pi-NF for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Jan 2020 08:51:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47036) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqH84-0003rQ-MT for emacs-devel@gnu.org; Sat, 11 Jan 2020 08:48:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqH83-0005hh-LJ for emacs-devel@gnu.org; Sat, 11 Jan 2020 08:48:40 -0500 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:38057) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iqH83-0005ZM-CS for emacs-devel@gnu.org; Sat, 11 Jan 2020 08:48:39 -0500 Original-Received: by mail-wr1-x431.google.com with SMTP id y17so4365572wrh.5 for ; Sat, 11 Jan 2020 05:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=fnIxMM43zoxQUp0xiGgfRbj/DGYbFtOBz1bkbpceihs=; b=cvIp6aWmCffaRplduAoEAdkESq7kk5pofZFZNbGq6fSk7D3ERdRMW1MjyfcsZSvCk9 J2qNOkllt7WxUXkZW52t2KdESoBQt5ZNYhiDe0wuMzLojX8fSOSiiDenRNdwVWFLW4dF 0irGiFVNmWY6jYQlj5udlMb3RJhs+L/BalDV4QxF7ax8mF4o+K6Eylo4AGM8Tdg++zGP DTK3a7/Hg+NR+GQHng/Gf5jBszGPyphWo04e3mpsHcffArzUqRWswojZhOFTHTDb7Ziy v72jObU/K+Rwl8Stv36m2MfuDm90G+QRwDb1b2kaYi1V4gCBFSD6jQ+br/NiVfK0jAAU uSRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=fnIxMM43zoxQUp0xiGgfRbj/DGYbFtOBz1bkbpceihs=; b=IQZr6SaKzSbyij4lFbPLMS/eY0AxkCvHzL4bIFY5rmAlPkfTFbUXjzrGAYLxxiUtjx pUG3uf4lxXAJlolCSUrm+UHwNhOP8Cj24kd8kuyyzkVf4h6IXOzgHOTd+wHHADiabGSU 2MpXa4DyNEODQzzQHPESZBv6J0uN4sQq7GbcH7DJQjtMvoOcg1oxgX4is5kR3c4fCcfQ MYInSDkBLnk5jsSbEl1L0fLxddznoBqxRAjPjifzhPHMZhYmrgBzfX62r+niwWekZ9tI 77H+sgHc3HMbvJPdkq1WzYrQ11QWaEcbqUYmTJiC6XCYOzqKfXbU1VxFv/faK/Ki1lr2 hF5Q== X-Gm-Message-State: APjAAAUDUcGIRluAGTZ5EXSIQpr9p8c/tVK/JKCfaxv0PKaPdnIhKaNv y0r61GOfGd+tO5tqwnFfpMUBo8hXfIM= X-Google-Smtp-Source: APXvYqxJmq1moMQkQhFk09rJgJYI8mPTLA4OkfA9MU6KQkd1f09Mm0JhKXR2vRudieyf9JfRT/Yvvg== X-Received: by 2002:a05:6000:118d:: with SMTP id g13mr9569752wrx.141.1578750517509; Sat, 11 Jan 2020 05:48:37 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-3181-38ae-3880-6acc.holly.idiocy.org. [2001:8b0:3f8:8129:3181:38ae:3880:6acc]) by smtp.gmail.com with ESMTPSA id g25sm11131729wmh.3.2020.01.11.05.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2020 05:48:36 -0800 (PST) Content-Disposition: inline In-Reply-To: <0100016f94604822-8343ce50-8fdf-4b92-9e0b-70d45cda9dc2-000000@email.amazonses.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:244198 Archived-At: 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 > ". 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