From 00a4c844d2c851177adf911848689e99db9a2cdb Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 9 Nov 2004 14:43:27 +0000 Subject: 2004-11-09 Andrew Cagney * value.h (struct value): Delete field bfd_section. (VALUE_BFD_SECTION): Delete macro. (COERCE_REF): Update. (value_at, value_at_lazy): Delete asection parameter. * printcmd.c (print_formatted, x_command): Update. (do_examine): Delete asection parameter. (next_section): Delete variable. * valops.c (value_cast, value_at, value_at_lazy) (value_coerce_function, value_addr, value_ind, value_string) (find_rt_vbase_offset, value_full_object): Update. * hpacc-abi.c (hpacc_virtual_fn_field) (hpacc_value_rtti_type): Update. * gnu-v3-abi.c (gnuv3_rtti_type, gnuv3_virtual_fn_field) (gnuv3_baseclass_offset): Update. * f-valprint.c (f_val_print): Update. * c-valprint.c (c_val_print): Update. * p-valprint.c (pascal_val_print): Update. * jv-valprint.c (java_value_print): Update. * jv-lang.c (java_class_from_object, evaluate_subexp_java): Update. * ada-lang.c (ada_value_primitive_packed_val) (ada_evaluate_subexp): Update. * dwarf2loc.c (dwarf2_evaluate_loc_desc): Update. * expprint.c (print_subexp_standard): Update. * infcall.c (call_function_by_hand): Update. * valarith.c (value_add): Update. * eval.c (evaluate_subexp_standard): Update. * values.c (allocate_value, value_copy, value_static_field): Update. * findvar.c (read_var_value, locate_var_value): Update. --- gdb/printcmd.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'gdb/printcmd.c') diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 8b7d31d..7f683d5 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -70,10 +70,6 @@ static char last_size = 'w'; static CORE_ADDR next_address; -/* Default section to examine next. */ - -static asection *next_section; - /* Last address examined. */ static CORE_ADDR last_examine_address; @@ -170,9 +166,6 @@ static void print_command_1 (char *, int, int); static void validate_format (struct format_data, char *); -static void do_examine (struct format_data, CORE_ADDR addr, - asection * section); - static void print_formatted (struct value *, int, int, struct ui_file *); static struct format_data decode_format (char **, int, int); @@ -288,7 +281,6 @@ print_formatted (struct value *val, int format, int size, if (VALUE_LVAL (val) == lval_memory) { next_address = VALUE_ADDRESS (val) + len; - next_section = VALUE_BFD_SECTION (val); } switch (format) @@ -297,7 +289,6 @@ print_formatted (struct value *val, int format, int size, /* FIXME: Need to handle wchar_t's here... */ next_address = VALUE_ADDRESS (val) + val_print_string (VALUE_ADDRESS (val), -1, 1, stream); - next_section = VALUE_BFD_SECTION (val); break; case 'i': @@ -311,7 +302,6 @@ print_formatted (struct value *val, int format, int size, wrap_here (" "); next_address = VALUE_ADDRESS (val) + gdb_print_insn (VALUE_ADDRESS (val), stream); - next_section = VALUE_BFD_SECTION (val); break; default: @@ -763,7 +753,7 @@ static struct type *examine_g_type; Fetch it from memory and print on gdb_stdout. */ static void -do_examine (struct format_data fmt, CORE_ADDR addr, asection *sect) +do_examine (struct format_data fmt, CORE_ADDR addr) { char format = 0; char size; @@ -776,7 +766,6 @@ do_examine (struct format_data fmt, CORE_ADDR addr, asection *sect) size = fmt.size; count = fmt.count; next_address = addr; - next_section = sect; /* String or instruction format implies fetch single bytes regardless of the specified size. */ @@ -831,7 +820,7 @@ do_examine (struct format_data fmt, CORE_ADDR addr, asection *sect) the disassembler be modified so that LAST_EXAMINE_VALUE is left with the byte sequence from the last complete instruction fetched from memory? */ - last_examine_value = value_at_lazy (val_type, next_address, sect); + last_examine_value = value_at_lazy (val_type, next_address); if (last_examine_value) release_value (last_examine_value); @@ -1304,12 +1293,10 @@ x_command (char *exp, int from_tty) next_address = VALUE_ADDRESS (val); else next_address = value_as_address (val); - if (VALUE_BFD_SECTION (val)) - next_section = VALUE_BFD_SECTION (val); do_cleanups (old_chain); } - do_examine (fmt, next_address, next_section); + do_examine (fmt, next_address); /* If the examine succeeds, we remember its size and format for next time. */ last_size = fmt.size; @@ -1549,7 +1536,7 @@ do_one_display (struct display *d) annotate_display_value (); - do_examine (d->format, addr, VALUE_BFD_SECTION (val)); + do_examine (d->format, addr); } else { -- cgit v1.1