From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org, "Kim F. Storm" <storm@cua.dk>
Subject: Re: Ok, somebody give me a clue.
Date: Mon, 28 Feb 2005 17:20:07 +0100 [thread overview]
Message-ID: <x5is4cfyh4.fsf@lola.goethe.zz> (raw)
In-Reply-To: <jeis4cbuzz.fsf@sykes.suse.de> (Andreas Schwab's message of "Mon, 28 Feb 2005 15:48:48 +0100")
Andreas Schwab <schwab@suse.de> writes:
> storm@cua.dk (Kim F. Storm) writes:
>
>> David Kastrup <dak@gnu.org> 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
next prev parent reply other threads:[~2005-02-28 16:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-28 12:02 Ok, somebody give me a clue David Kastrup
2005-02-28 14:06 ` Kim F. Storm
2005-02-28 14:48 ` Andreas Schwab
2005-02-28 16:20 ` David Kastrup [this message]
2005-02-28 15:55 ` David Kastrup
2005-03-02 11:23 ` Richard Stallman
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=x5is4cfyh4.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=storm@cua.dk \
/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.