From: Keith Seitz Date: Mon, 21 Dec 1998 19:18:57 +0000 (+0000) Subject: * gdbtk-cmds.c (get_register): Call get_saved_register instead of X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54faf0d7bc4e9b268ae5932ccdae9c301ce374f6;p=binutils-gdb.git * gdbtk-cmds.c (get_register): Call get_saved_register instead of read_relative_register_raw_bytes to fetch registers. --- diff --git a/gdb/ChangeLog-gdbtk b/gdb/ChangeLog-gdbtk index e4e02015658..6f8e2dfcb99 100644 --- a/gdb/ChangeLog-gdbtk +++ b/gdb/ChangeLog-gdbtk @@ -1,3 +1,8 @@ +Mon Dec 21 11:11:02 1998 Keith Seitz + + * gdbtk-cmds.c (get_register): Call get_saved_register instead of + read_relative_register_raw_bytes to fetch registers. + Thu Dec 17 09:00:56 1998 Keith Seitz * gdbtk-cmds.c (gdb_search): Don't mention C++ RTTI and diff --git a/gdb/gdbtk-cmds.c b/gdb/gdbtk-cmds.c index da3683e2a70..5ce63b1bef2 100644 --- a/gdb/gdbtk-cmds.c +++ b/gdb/gdbtk-cmds.c @@ -1654,11 +1654,18 @@ get_register (regnum, fp) char raw_buffer[MAX_REGISTER_RAW_SIZE]; char virtual_buffer[MAX_REGISTER_VIRTUAL_SIZE]; int format = (int)fp; + int optim; if (format == 'N') format = 0; - if (read_relative_register_raw_bytes (regnum, raw_buffer)) + /* read_relative_register_raw_bytes returns a virtual frame pointer + (FRAME_FP (selected_frame)) if regnum == FP_REGNUM instead + of the real contents of the register. To get around this, + use get_saved_register instead. */ + get_saved_register (raw_buffer, &optim, (CORE_ADDR *) NULL, selected_frame, + regnum, (enum lval_type *) NULL); + if (optim) { Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr, Tcl_NewStringObj ("Optimized out", -1));