From: Randolph Chung <randolph@tausq.org>
To: Carlos O'Donell <carlos@systemhalted.org>
Cc: gdb-patches@sources.redhat.com, parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] [hppa patch] Fix register definitions for hppa
Date: Fri, 03 Aug 2007 20:12:00 -0000 [thread overview]
Message-ID: <20070803201219.GC32611@tausq.org> (raw)
In-Reply-To: <119aab440708031132h58d94c38l672a241301bda9ee@mail.gmail.com>
> Isn't there a way we can teach gdb that cr27 is writable via this sequence?
>
> e.g.
> static inline void __set_cr27(struct pthread *cr27)
> {
> asm ( "ble 0xe0(%%sr2, %%r0)\n\t"
> "copy %0, %%r26"
> : : "r" (cr27) : "r26" );
> }
>
> At the very least please adjust the comment to say "cr27 is writable via
> a kernel helper function."
>
> How does gdb read cr27? It must know how to use mfctl?
Remember that gdb is reading the cr27 of the debuggee, not of itself, so
__set_cr27 is irrelevant.
From the architecture point of view, CR26 and CR27 are only readable
from userspace, so gdb should not enable somebody to set them from
inside gdb.
GDB gets the value of cr26/cr27 the same way it gets the value of other
registers -- via ptrace or the register set returned in a core dump,
etc...
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
next prev parent reply other threads:[~2007-08-03 20:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 17:06 Randolph Chung
2007-08-03 17:11 ` Daniel Jacobowitz
2007-08-03 18:42 ` [parisc-linux] " Carlos O'Donell
2007-08-03 20:12 ` Randolph Chung [this message]
2007-08-04 16:35 ` Carlos O'Donell
2007-08-04 17:02 ` 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=20070803201219.GC32611@tausq.org \
--to=randolph@tausq.org \
--cc=carlos@systemhalted.org \
--cc=gdb-patches@sources.redhat.com \
--cc=parisc-linux@lists.parisc-linux.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