From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Ok, somebody give me a clue. Date: Mon, 28 Feb 2005 17:20:07 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1109607797 28218 80.91.229.2 (28 Feb 2005 16:23:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Feb 2005 16:23:17 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 28 17:23:17 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D5nfP-0007sX-9K for ged-emacs-devel@m.gmane.org; Mon, 28 Feb 2005 17:22:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D5nxn-0000s0-1L for ged-emacs-devel@m.gmane.org; Mon, 28 Feb 2005 11:41:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D5nxG-0000nl-Tl for emacs-devel@gnu.org; Mon, 28 Feb 2005 11:41:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D5nxD-0000le-Rz for emacs-devel@gnu.org; Mon, 28 Feb 2005 11:41:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D5nxD-0000kN-Cf for emacs-devel@gnu.org; Mon, 28 Feb 2005 11:41:07 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D5ncv-0002dg-IW for emacs-devel@gnu.org; Mon, 28 Feb 2005 11:20:09 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1D5ncv-00005L-1Q; Mon, 28 Feb 2005 11:20:09 -0500 Original-To: Andreas Schwab In-Reply-To: (Andreas Schwab's message of "Mon, 28 Feb 2005 15:48:48 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33934 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33934 Andreas Schwab writes: > storm@cua.dk (Kim F. Storm) writes: > >> David Kastrup writes: >> >>> For debugging purposes, I have been using the following: >>> >>> struct trbuf { void* pc; int value; } trbuf[256]; >>> unsigned char trptr; >>> #define RECORD_INPUT do { __label__ woozle; \ >>> woozle: trbuf[trptr++] = (struct trbuf) \ >> >> Does [trptr++%256] give better results ? > > trptr is unsigned char, so won't ever be bigger than 255. Type promotion can lead to strange effects. While trptr++ seems like a safe bet, I would not trust ++trptr... Anyway, this apparently is a compiler or a dumper problem with the local label. I have to get at the current address with a different method, probably inline assembly. Pity. Or construct a non-local label name from __LINE__. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum