2003-03-01 Andrew Cagney <cagney@redhat.com>

* Makefile.in (ax-gdb.o): Update dependencies.
	* ax-gdb.c: Include "regcache.h".
	(gen_expr): Use register_type instead of REGISTER_VIRTUAL_TYPE.
	* findvar.c (value_of_register): Ditto.
	* infcmd.c (default_print_registers_info): Ditto.

Index: mi/ChangeLog
2003-03-01  Andrew Cagney  <cagney@redhat.com>

	* mi-main.c (get_register): Use register_type instead of
	REGISTER_VIRTUAL_TYPE.
This commit is contained in:
Andrew Cagney 2003-03-01 17:03:19 +00:00
parent 00416c6ed6
commit 7b83296f22
7 changed files with 29 additions and 13 deletions

View File

@ -1,3 +1,11 @@
2003-03-01 Andrew Cagney <cagney@redhat.com>
* Makefile.in (ax-gdb.o): Update dependencies.
* ax-gdb.c: Include "regcache.h".
(gen_expr): Use register_type instead of REGISTER_VIRTUAL_TYPE.
* findvar.c (value_of_register): Ditto.
* infcmd.c (default_print_registers_info): Ditto.
2003-03-01 Mark Kettenis <kettenis@gnu.org>
* i386-linux-tdep.c (find_minsym_and_objfile): Replace usage of

View File

@ -1530,7 +1530,8 @@ avr-tdep.o: avr-tdep.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
$(symfile_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h)
ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
$(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \
$(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h)
$(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \
$(regcache_h)
ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h)
bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h)
block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h)

View File

@ -34,6 +34,7 @@
#include "ax-gdb.h"
#include "gdb_string.h"
#include "block.h"
#include "regcache.h"
/* To make sense of this file, you should read doc/agentexpr.texi.
Then look at the types and enums in ax-gdb.h. For the code itself,
@ -1595,7 +1596,7 @@ gen_expr (union exp_element **pc, struct agent_expr *ax,
(*pc) += 3;
value->kind = axs_lvalue_register;
value->u.reg = reg;
value->type = REGISTER_VIRTUAL_TYPE (reg);
value->type = register_type (current_gdbarch, reg);
}
break;

View File

@ -288,7 +288,7 @@ store_typed_address (void *buf, struct type *type, CORE_ADDR addr)
/* Return a `value' with the contents of (virtual or cooked) register
REGNUM as found in the specified FRAME. The register's type is
determined by REGISTER_VIRTUAL_TYPE.
determined by register_type().
NOTE: returns NULL if register value is not available. Caller will
check return value or die! */
@ -320,13 +320,13 @@ value_of_register (int regnum, struct frame_info *frame)
if (register_cached (regnum) < 0)
return NULL; /* register value not available */
reg_val = allocate_value (REGISTER_VIRTUAL_TYPE (regnum));
reg_val = allocate_value (register_type (current_gdbarch, regnum));
/* Convert raw data to virtual format if necessary. */
if (REGISTER_CONVERTIBLE (regnum))
{
REGISTER_CONVERT_TO_VIRTUAL (regnum, REGISTER_VIRTUAL_TYPE (regnum),
REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
raw_buffer, VALUE_CONTENTS_RAW (reg_val));
}
else if (REGISTER_RAW_SIZE (regnum) == REGISTER_VIRTUAL_SIZE (regnum))

View File

@ -1665,7 +1665,7 @@ default_print_registers_info (struct gdbarch *gdbarch,
/* Convert raw data to virtual format if necessary. */
if (REGISTER_CONVERTIBLE (i))
{
REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
REGISTER_CONVERT_TO_VIRTUAL (i, register_type (current_gdbarch, i),
raw_buffer, virtual_buffer);
}
else
@ -1676,11 +1676,11 @@ default_print_registers_info (struct gdbarch *gdbarch,
/* If virtual format is floating, print it that way, and in raw
hex. */
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
if (TYPE_CODE (register_type (current_gdbarch, i)) == TYPE_CODE_FLT)
{
int j;
val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0,
file, 0, 1, 0, Val_pretty_default);
fprintf_filtered (file, "\t(raw 0x");
@ -1698,14 +1698,14 @@ default_print_registers_info (struct gdbarch *gdbarch,
else
{
/* Print the register in hex. */
val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0,
file, 'x', 1, 0, Val_pretty_default);
/* If not a vector register, print it also according to its
natural format. */
if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
if (TYPE_VECTOR (register_type (current_gdbarch, i)) == 0)
{
fprintf_filtered (file, "\t");
val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
val_print (register_type (current_gdbarch, i), virtual_buffer, 0, 0,
file, 0, 1, 0, Val_pretty_default);
}
}

View File

@ -1,3 +1,8 @@
2003-03-01 Andrew Cagney <cagney@redhat.com>
* mi-main.c (get_register): Use register_type instead of
REGISTER_VIRTUAL_TYPE.
2003-02-25 David Carlton <carlton@math.stanford.edu>
* mi-cmd-stack.c: Replace all instances of SYMBOL_NAME with

View File

@ -534,7 +534,8 @@ get_register (int regnum, int format)
if (REGISTER_CONVERTIBLE (regnum))
{
REGISTER_CONVERT_TO_VIRTUAL (regnum, REGISTER_VIRTUAL_TYPE (regnum),
REGISTER_CONVERT_TO_VIRTUAL (regnum,
register_type (current_gdbarch, regnum),
raw_buffer, virtual_buffer);
}
else
@ -559,7 +560,7 @@ get_register (int regnum, int format)
}
else
{
val_print (REGISTER_VIRTUAL_TYPE (regnum), virtual_buffer, 0, 0,
val_print (register_type (current_gdbarch, regnum), virtual_buffer, 0, 0,
stb->stream, format, 1, 0, Val_pretty_default);
ui_out_field_stream (uiout, "value", stb);
ui_out_stream_delete (stb);