From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: [22.1.90]: Point before start of properties Date: Wed, 20 Feb 2008 21:40:13 +0200 Message-ID: References: <6EE216E1AA959543A555C60FF34FB76702E48034@maileube01.misys.global.ad> <87wspcj0ou.fsf@stupidchicken.com> <6EE216E1AA959543A555C60FF34FB76702EED4A1@maileube01.misys.global.ad> <6EE216E1AA959543A555C60FF34FB76702EEDA6E@maileube01.misys.global.ad> <6EE216E1AA959543A555C60FF34FB7670300E86B@maileube01.misys.global.ad> <6EE216E1AA959543A555C60FF34FB7670305B82C@maileube01.misys.global.ad> <6EE216E1AA959543A555C60FF34FB7670305BF82@maileube01.misys.global.ad> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1203536514 1868 80.91.229.12 (20 Feb 2008 19:41:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2008 19:41:54 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Simon.Marshall@misys.com, cyd@stupidchicken.com To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 20:42:17 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JRupQ-0008Pu-F2 for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2008 20:42:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRuov-0004V2-IQ for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2008 14:41:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRuoX-00048U-NR for emacs-devel@gnu.org; Wed, 20 Feb 2008 14:41:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRuoV-00045m-O3 for emacs-devel@gnu.org; Wed, 20 Feb 2008 14:41:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRuoV-00045X-Ix for emacs-devel@gnu.org; Wed, 20 Feb 2008 14:41:07 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRuoV-0002Zg-8T for emacs-devel@gnu.org; Wed, 20 Feb 2008 14:41:07 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JRuoU-0003aN-Tc for emacs-pretest-bug@gnu.org; Wed, 20 Feb 2008 14:41:06 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JRunx-0002Mp-Vn for emacs-pretest-bug@gnu.org; Wed, 20 Feb 2008 14:40:37 -0500 Original-Received: from nitzan.inter.net.il ([213.8.233.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRunx-0002MS-Dv for emacs-pretest-bug@gnu.org; Wed, 20 Feb 2008 14:40:33 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-31-26.inter.net.il [80.230.31.26]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id JFW73309 (AUTH halo1); Wed, 20 Feb 2008 21:37:50 +0200 (IST) In-reply-to: (message from Stefan Monnier on Wed, 20 Feb 2008 12:17:01 -0500) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89729 gmane.emacs.pretest.bugs:21251 Archived-At: > From: Stefan Monnier > Date: Wed, 20 Feb 2008 12:17:01 -0500 > Cc: emacs-pretest-bug@gnu.org, Chong Yidong > > Whenever I have to debug optimized code, I tend to rely a lot on good'ol > fprintf (stderr, ...), so try to add a few such printfs just before > calling `error', where you print things like `i', i->up.interval, > i->up_obj, ... So 20 years after GCC was a pioneer of the idea that it should be possible to debug optimized code, we are back at printf debugging because GCC developers no longer think it's important enough. Progress, indeed... To Simon: if compiling with -O1 does not give you reasonably debuggable code, you may wish to look at the machine code at the offending places. For example, you might find out that, while "p (((i)->up_obj || (i)->up.interval == 0))" yields zero, the real values of up_obj and/or up.interval are loaded in registers, and thus the condition does fire. Although I find this rather surprising for "-O1". Btw, I'd also suggest to try "-ggdb -g3" instead of just -g, it should cause GCC to produce more elaborate debug info, and could help you discover real values of variables.