From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Newsgroups: gmane.emacs.devel Subject: Re: How to build Emacs with debugging information? Date: Sat, 24 Jan 2015 21:52:13 +0100 Message-ID: References: <20150124171029.GA2628@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1422132755 538 80.91.229.3 (24 Jan 2015 20:52:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2015 20:52:35 +0000 (UTC) Cc: emacs-devel To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 24 21:52:34 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YF7gz-00068r-E3 for ged-emacs-devel@m.gmane.org; Sat, 24 Jan 2015 21:52:29 +0100 Original-Received: from localhost ([::1]:36039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YF7gy-0006y9-PI for ged-emacs-devel@m.gmane.org; Sat, 24 Jan 2015 15:52:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YF7gl-0006y3-HH for emacs-devel@gnu.org; Sat, 24 Jan 2015 15:52:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YF7gk-0004km-JR for emacs-devel@gnu.org; Sat, 24 Jan 2015 15:52:15 -0500 Original-Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:61189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YF7gk-0004kZ-CG for emacs-devel@gnu.org; Sat, 24 Jan 2015 15:52:14 -0500 Original-Received: by mail-we0-f171.google.com with SMTP id k11so766029wes.2 for ; Sat, 24 Jan 2015 12:52:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mEAHhbz02YF2zZaVtPlkpuIfYJANNm+JzuWs0x+yua8=; b=W2jDnlJcrc5eOzr9cUpagLU0qtC2V4Y2bzBInMKQ3asvlX2yL0ut3Eb9IVz0I7XLcx pmGu8soI+bKrfY++i1meWg5m7l4+NsUMDrVrAYbFKXy34dmoMAu+zAvdIMXJ10YxjI4l F6tkuih/3WvV671XdjOzM0s7VrzVTwp4TTi9qCy0WFyKIp7oupEExFeYYWNF1u4BP83F 8t1axZaFP0bactKzvPMeu4MPezsxkpjmzbbb/Moc3YYr6aKCdDNrNz1jiz1kZoY7F2YN SkXrm9ntkvP1XMQlQuPwvxP6xVdcCNT9M9p39j20h5k7o/BdRjTeIHfmMOftI8BXIY6+ Vrjg== X-Received: by 10.180.37.197 with SMTP id a5mr16651466wik.2.1422132733664; Sat, 24 Jan 2015 12:52:13 -0800 (PST) Original-Received: by 10.27.137.137 with HTTP; Sat, 24 Jan 2015 12:52:13 -0800 (PST) In-Reply-To: <20150124171029.GA2628@acm.acm> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181730 Archived-At: > What exactly do you want here? Do you really just want to know the > answer to your question about scanning "<" and ">", or do you > specifically want to find it out yourself with the debugger? If it's the > first of these, I can tell you. ;-) The second. > If it's the second of these, .... > >> Anyway, stepping with gdb, inside another Emacs instance, I see that >> many values are "", e.g. > >> (gdb) p found >> $1 = > >> Normally I would pass "-g -O0" flags to gcc to solve this for the >> C/C++ programs that I write. How can I do the equivalent thing for >> Emacs? > > You'll need to reconfigure and rebuild Emacs. If you're on a GNU or > other Unix-like system, do something like: > > $ CFLAGS='-g3 -O0' ./configure > > , then call make in the usual way. (If you're on a different OS, such as > Microsoft Windows, then I can't help you here, but somebody else will.) > >> Is there a way to have both the "debug" and "release" configurations >> for the Emacs executable? > > I'm not sure what you mean by "configurations", but you can have two > Emacs executables side by side. (Again, on GNU etc.,) when you build > Emacs, the executable is called something like emacs-25.0.50.4, where the > 4 is incremented each time you build. The last build is hard linked to > the file emacs. So you just have the hassle of typing in "-25.0.50.4" > when you start the "release" version. Thanks, it works just as I wanted. I simply renamed "emacs-25.0.50.2" to "emacs-debug". Now I can inspect all the values.