This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/resend/rfa] (3/4) Remove DEPRECATED_CLEAN_UP_REGISTER_VALUE



+static void
+hppa_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+			   int regnum, void *buf)
+{
+    regcache_raw_read (regcache, regnum, buf);
+    if (regnum == PCOQ_HEAD_REGNUM || regnum == PCOQ_TAIL_REGNUM)
+      ((char *)buf)[sizeof(CORE_ADDR) -1 ] &= ~0x3;
+}
+

Almost, this needs to be portable across byte-orders which means using something like:
[U]LONGEST tmp;
regcache_raw_read_[un]signed (&tmp)
mask tmp
store_[un]signed_integer buf, tmp
with that tweak it is ok to commit (for reference, post the final patch)


andrew
(this also lets me clean-up more of the register code, ya!)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]