Skip to contentSkip to conversation

Fix register definitions for hppa

PATCH Randolph Chung 1 participant 1 message Aug 3, 2007 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 6 lines

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"

Quoted 8 lines
        "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

Quoted 1 line

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

Signature · 7 lines
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux