From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>, drow@false.org
Subject: Re: [RFA] gdb/gdbserver/linux-ppc-low.c: Wrong return value in ppc_cannot_store_register()
Date: Fri, 19 Jan 2007 11:27:00 -0000 [thread overview]
Message-ID: <45B0AB10.1060205@de.ibm.com> (raw)
In-Reply-To: <20070118162855.GA14330@nevyn.them.org>
Hi,
Daniel Jacobowitz schrieb:
> On Thu, Jan 18, 2007 at 01:37:21PM +0100, Markus Deuling wrote:
>> Hi,
>>
>> ppc_cannot_store_register() from linux-ppc-low.c returns 2 instead of 1.
>> This seems to be broken. In linux-low.c:usr_store_inferior_registers()
>> there is following comparison:
>>
>> if ((*the_low_target.cannot_store_register) (regno) == 1)
>> return;
>>
>> This won't work with ppc low target. The patch returns 1 instead of 2.
>
> That's the whole point - the return value of two exists to avoid that
> check.
>
> Why did you want this patch, i.e. does it fix a problem you
> encountered?
>
it's not a fix. I didn't realize that there's a "return 2" to avoid that check.
As far as I've seen it, *the_low_target.cannot_store_register is called two
times in linux-low.c and only there. One time result is compared with 1, the other time with 0.
So no one works with that returning 2. If the check has to be avoided in ppc,
then the three lines below can re removed, can't they? Then it's like in linux-ppc64-low always returning 0.
I think it's not useful to return 2.
static int
ppc_cannot_store_register (int regno)
{
- /* Some kernels do not allow us to store fpscr. */
- if (regno == find_regno ("fpscr"))
- return 2;
return 0;
}
What do you think about that ?
Regards,
Markus
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
next prev parent reply other threads:[~2007-01-19 11:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-18 12:37 Markus Deuling
2007-01-18 16:29 ` Daniel Jacobowitz
2007-01-19 11:27 ` Markus Deuling [this message]
2007-01-20 4:35 ` 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=45B0AB10.1060205@de.ibm.com \
--to=deuling@de.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/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