* gdbtk-cmds.c (get_register): Call get_saved_register instead of

read_relative_register_raw_bytes to fetch registers.
This commit is contained in:
Keith Seitz 1998-12-21 19:18:57 +00:00
parent e97b18f728
commit 54faf0d7bc
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Dec 21 11:11:02 1998 Keith Seitz <keiths@cygnus.com>
* 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 <keiths@cygnus.com>
* gdbtk-cmds.c (gdb_search): Don't mention C++ RTTI and

View File

@ -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));