aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-11-12 21:45:08 +0000
committerAndrew Cagney <cagney@redhat.com>2004-11-12 21:45:08 +0000
commitdf407dfe2e8452c0a3edfcf50d55942ff0273433 (patch)
tree11b770a7071b50d36d54f0e817d8c8c4f60ce076 /gdb/printcmd.c
parent69e5711542042a5b591907f8f96d28fd8d2c3c17 (diff)
downloadgdb-df407dfe2e8452c0a3edfcf50d55942ff0273433.zip
gdb-df407dfe2e8452c0a3edfcf50d55942ff0273433.tar.gz
gdb-df407dfe2e8452c0a3edfcf50d55942ff0273433.tar.bz2
2004-11-12 Andrew Cagney <cagney@gnu.org>
* value.h (VALUE_TYPE, VALUE_NEXT, VALUE_OFFSET, VALUE_BITSIZE) (VALUE_BITPOS): Delete. (value_type, value_offset, value_bitsize, value_bitpos): Declare. * value.c (value_type, value_offset, value_bitpos) (value_bitsize): New functions. Update references. * arm-tdep.c, gnu-v3-abi.c, hpacc-abi.c, gnu-v2-abi.c: Update. * f-valprint.c, cp-valprint.c, c-valprint.c: Update. * ada-valprint.c, typeprint.c, scm-valprint.c, scm-exp.c: Update. * p-valprint.c, jv-valprint.c, jv-lang.c, varobj.c: Update. * objc-lang.c, ada-lang.c, std-regs.c, stack.c: Update. * infcall.c, linespec.c, printcmd.c, valarith.c: Update. * valops.c, eval.c, findvar.c, breakpoint.c: Update. * tracepoint.c, ax-gdb.c, mi/mi-main.c, cli/cli-dump.c: * rs6000-tdep.c, ppc-sysv-tdep.c: Update.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 7f683d5..6ca1f6b 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -275,7 +275,7 @@ static void
print_formatted (struct value *val, int format, int size,
struct ui_file *stream)
{
- struct type *type = check_typedef (VALUE_TYPE (val));
+ struct type *type = check_typedef (value_type (val));
int len = TYPE_LENGTH (type);
if (VALUE_LVAL (val) == lval_memory)
@@ -888,15 +888,15 @@ print_command_1 (char *exp, int inspect, int voidprint)
else
val = access_value_history (0);
- if (voidprint || (val && VALUE_TYPE (val) &&
- TYPE_CODE (VALUE_TYPE (val)) != TYPE_CODE_VOID))
+ if (voidprint || (val && value_type (val) &&
+ TYPE_CODE (value_type (val)) != TYPE_CODE_VOID))
{
int histindex = record_latest_value (val);
if (histindex >= 0)
- annotate_value_history_begin (histindex, VALUE_TYPE (val));
+ annotate_value_history_begin (histindex, value_type (val));
else
- annotate_value_begin (VALUE_TYPE (val));
+ annotate_value_begin (value_type (val));
if (inspect)
printf_unfiltered ("\031(gdb-makebuffer \"%s\" %d '(\"", exp, histindex);
@@ -967,7 +967,7 @@ output_command (char *exp, int from_tty)
val = evaluate_expression (expr);
- annotate_value_begin (VALUE_TYPE (val));
+ annotate_value_begin (value_type (val));
print_formatted (val, format, fmt.size, gdb_stdout);
@@ -1283,12 +1283,12 @@ x_command (char *exp, int from_tty)
*exp = 0;
old_chain = make_cleanup (free_current_contents, &expr);
val = evaluate_expression (expr);
- if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_REF)
+ if (TYPE_CODE (value_type (val)) == TYPE_CODE_REF)
val = value_ind (val);
/* In rvalue contexts, such as this, functions are coerced into
pointers to functions. This makes "x/i main" work. */
if (/* last_format == 'i' && */
- TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FUNC
+ TYPE_CODE (value_type (val)) == TYPE_CODE_FUNC
&& VALUE_LVAL (val) == lval_memory)
next_address = VALUE_ADDRESS (val);
else
@@ -1308,7 +1308,7 @@ x_command (char *exp, int from_tty)
/* Make last address examined available to the user as $_. Use
the correct pointer type. */
struct type *pointer_type
- = lookup_pointer_type (VALUE_TYPE (last_examine_value));
+ = lookup_pointer_type (value_type (last_examine_value));
set_internalvar (lookup_internalvar ("_"),
value_from_pointer (pointer_type,
last_examine_address));
@@ -1902,11 +1902,11 @@ printf_command (char *arg, int from_tty)
if (argclass[nargs] == double_arg)
{
- struct type *type = VALUE_TYPE (val_args[nargs]);
+ struct type *type = value_type (val_args[nargs]);
if (TYPE_LENGTH (type) == sizeof (float))
- VALUE_TYPE (val_args[nargs]) = builtin_type_float;
+ val_args[nargs]->type = builtin_type_float;
if (TYPE_LENGTH (type) == sizeof (double))
- VALUE_TYPE (val_args[nargs]) = builtin_type_double;
+ val_args[nargs]->type = builtin_type_double;
}
nargs++;
s = s1;