diff options
Diffstat (limited to 'gdb/m68hc11-tdep.c')
-rw-r--r-- | gdb/m68hc11-tdep.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 005a01f5474..ced6eabb520 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -279,7 +279,7 @@ m68hc11_which_soft_register (CORE_ADDR addr) /* Fetch a pseudo register. The 68hc11 soft registers are treated like pseudo registers. They are located in memory. Translate the register fetch into a memory read. */ -static void +static enum register_status m68hc11_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int regno, gdb_byte *buf) @@ -292,8 +292,11 @@ m68hc11_pseudo_register_read (struct gdbarch *gdbarch, { ULONGEST pc; const int regsize = 4; + enum register_status status; - regcache_cooked_read_unsigned (regcache, HARD_PC_REGNUM, &pc); + status = regcache_cooked_read_unsigned (regcache, HARD_PC_REGNUM, &pc); + if (status != REG_VALID) + return status; if (pc >= 0x8000 && pc < 0xc000) { ULONGEST page; @@ -304,7 +307,7 @@ m68hc11_pseudo_register_read (struct gdbarch *gdbarch, pc += 0x1000000; } store_unsigned_integer (buf, regsize, byte_order, pc); - return; + return REG_VALID; } m68hc11_initialize_register_info (); @@ -318,6 +321,8 @@ m68hc11_pseudo_register_read (struct gdbarch *gdbarch, { memset (buf, 0, 2); } + + return REG_VALID; } /* Store a pseudo register. Translate the register store |