From: Andrew Cagney <ac131313@cygnus.com>
To: Andrew Morton <akpm@zip.com.au>
Cc: Daniel Jacobowitz <drow@mvista.com>,
Eli Zaretskii <eliz@is.elta.co.il>,
gdb@sources.redhat.com
Subject: Re: bitwise operations on registers
Date: Thu, 14 Mar 2002 19:12:00 -0000 [thread overview]
Message-ID: <3C916697.5060302@cygnus.com> (raw)
In-Reply-To: <20020311103942.A9410@nevyn.them.org>
Andrew,
Sounds like a bug report is in order (http://sources.redhat.com/gdb/bugs)
Andrew
> On Mon, Mar 11, 2002 at 10:35:11AM -0500, Andrew Cagney wrote:
>
>> >On Sun, 10 Mar 2002, Andrew Morton wrote:
>> >
>> >
>
>> >>(gdb) p $esp & 4
>> >>Argument to arithmetic operation not a number or boolean.
>> >>(gdb)
>> >>
>> >>I don't seem to be able to perform the `&' and `|' arithmetic
>> >>operators against machine registers.
>
>> >
>> >
>> >"p $eax & 4" works for me. Doesn't it work for you?
>> >
>> >As for $esp, I think GDB knows that it's not a number, so try
>> >
>> > (gdb) p (int)$esp & 4
>> >
>> >(I don't know whether the built-in knowledge GDB has about $esp should
>> >prevent it from working without the cast, though.)
>
>>
>> Yes, try:
>> (gdb) p (void*)0 & 4
>> So, this a bug?
>
>
> I think so. C won't let you do it either, but historically we've been
> more permissive than C about things that have a clearly defined
> meaning, and this does.
>
>
next prev parent reply other threads:[~2002-03-15 3:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-10 23:50 Andrew Morton
2002-03-11 3:04 ` Eli Zaretskii
2002-03-11 7:35 ` Andrew Cagney
2002-03-11 7:39 ` Daniel Jacobowitz
2002-03-14 19:12 ` Andrew Cagney [this message]
[not found] ` <3C9173AD.E2FBA5DA@zip.com.au>
2002-03-14 21:03 ` Daniel Jacobowitz
2002-03-27 13:43 ` Andrew Cagney
2002-03-27 14:55 ` Daniel Jacobowitz
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=3C916697.5060302@cygnus.com \
--to=ac131313@cygnus.com \
--cc=akpm@zip.com.au \
--cc=drow@mvista.com \
--cc=eliz@is.elta.co.il \
--cc=gdb@sources.redhat.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox