aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-01 17:03:19 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-01 17:03:19 +0000
commit7b83296f2249f4252acecdc5af64595d66daadbd (patch)
treebfa2014356313408862a3df02b7072341a8c5012 /gdb
parent00416c6ed6b354207787df2ac7a6b1e8ad11fece (diff)
downloadgdb-7b83296f2249f4252acecdc5af64595d66daadbd.zip
gdb-7b83296f2249f4252acecdc5af64595d66daadbd.tar.gz
gdb-7b83296f2249f4252acecdc5af64595d66daadbd.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/Makefile.in3
-rw-r--r--gdb/ax-gdb.c3
-rw-r--r--gdb/findvar.c6
-rw-r--r--gdb/infcmd.c12
-rw-r--r--gdb/mi/ChangeLog5
-rw-r--r--gdb/mi/mi-main.c5
7 files changed, 29 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 70e0be5..6048ffb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c63f2fb..e0e812e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -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)
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 2536369..5692c35 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -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;
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 973b990..3147126 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -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))
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 0bdfc6c..19077b4 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -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);
}
}
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 6d2f685..a103802 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -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
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 8a54108..f08bd3f 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -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);