- struct frame_unwind_cache *cache = *this_prologue_cache;
- /* Describe the register's location. A reg-frame maps all registers
- onto the corresponding hardware register. */
- *optimized = 0;
- *lvalp = lval_register;
- *addrp = 0;
- *realnum = regnum;
-
- /* If needed, find and return the value of the register. */
- if (bufferp != NULL)
- {
- /* Return the actual value. */
- /* Use the regcache_cooked_read() method so that it, on the fly,
- constructs either a raw or pseudo register from the raw
- register cache. */
- regcache_cooked_read (cache->regcache, regnum, bufferp);
- }
+ struct frame_unwind_cache *cache
+ = (struct frame_unwind_cache *) *this_prologue_cache;
+ struct value *value;
+
+ value = cache->regcache->cooked_read_value (regnum);
+ VALUE_NEXT_FRAME_ID (value) = sentinel_frame_id;
+
+ return value;