Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit/ia64-linux] Allow libunwind to fetch register 0
Date: Wed, 28 Mar 2012 12:52:00 -0000	[thread overview]
Message-ID: <4F730961.6030003@redhat.com> (raw)
In-Reply-To: <20120327230317.GG2701@adacore.com>

On 03/28/2012 12:03 AM, Joel Brobecker wrote:

>>> I will make the small changes you suggested at the beginning of
>>> > > the patch. I just wanted to confirm something:
>> >
>> > <snip my own confusion>
>> >
>>> > > I will send a new patch...
>> >
>> > Do you have that new patch handy?  Want to check it in?
>> > I'm testing something on ia64-linux, and notice that gr0 shows up
>> > as *unavailable*.
> Argh - I could have sworn I sent the new patch, but I cannot find it
> anyway in my sent box, or my repository on my laptop. 


> And bad luck on the timing, as we've done an emergency shutdown of most of our

> machines due to some construction going on in our building (TMI?).


( :-) )

> 
> Anyway, I didn't want you to wait, so I redid the changes. I just
> cannot compile or test them. I will do that tomorrow, hoping that
> the machines will be powered up again, and if that shows no
> regression, I will check it in.


I've tested them on ia64-unknown-linux-gnu (debian 6).  No regressions,
and a few progressions.

> 
> Given that the cannot_fetch_register gdbarch hook wasn't attached,
> my understanding is that there isn't anything else that really needs
> changing...


Yeah.  Please check it in.

I see that $f0 (always 0.0) and $f1 (always 1.0) could/should be given
similar treatment:

(gdb) info register $f0 $f1
f0             *value not available*
f1             *value not available*

$p0 also has one bit that should always be read as 1, but it
seems something (the kernel?) is already handling that:

(gdb) info register $p0
p0             0x1      1

gcore.exp failures related to these issues.  It shows the $f0/$f1 issue, and
also, that $ec is read back from the core as 0, but it is read as
*unavailable* when debugging a live process.  The latter is because
have (ia64-linux-nat.c):

static int u_offsets[] =
  {
...
    PT_AR_LC,
    -1,		/* Not available: EC, the Epilog Count register.  */

But in ia64-linux-nat.c:supply_gregset:

  regcache_raw_supply (regcache, IA64_LC_REGNUM, regp + 53);
  regcache_raw_supply (regcache, IA64_EC_REGNUM, regp + 54);

which is suspicious (the registers is not retrievable with ptrace, but
it's in the core?).  Indeed, on this system's /usr/include/asm/ptrace_offsets.h
I see:

#define PT_AR_EC                0x0800
#define PT_AR_LC                0x0808

So it does look like it is available with ptrace.

I'm testing patches for these issues.

GDBserver also needs the same treatment for these things.  (e.g.,
you can see gdb.server/ tests failing on ia64-linux).

-- 
Pedro Alves


  reply	other threads:[~2012-03-28 12:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-25 16:55 Joel Brobecker
2011-10-25 17:27 ` Pedro Alves
2011-10-25 17:37   ` Pedro Alves
2011-10-25 20:49   ` Joel Brobecker
2011-10-26  0:27     ` Pedro Alves
2012-03-27 19:32     ` Pedro Alves
2012-03-27 23:03       ` Joel Brobecker
2012-03-28 12:52         ` Pedro Alves [this message]
2012-03-28 14:55           ` [PATCH] IA64: EC, the Epilog Count register, is available in ptrace Pedro Alves
2012-03-28 17:12             ` Joel Brobecker
2012-03-28 17:55               ` Pedro Alves
2012-03-28 14:55           ` [PATCH] IA64: $fr0==0.0, $fr1==1.0 Pedro Alves
2012-03-28 17:15             ` Joel Brobecker
2012-03-28 17:56               ` Pedro Alves
2012-03-28 17:10           ` [RFA/commit/ia64-linux] Allow libunwind to fetch register 0 Joel Brobecker

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=4F730961.6030003@redhat.com \
    --to=palves@redhat.com \
    --cc=brobecker@adacore.com \
    --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