X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fprintcmd.c;h=11fd1df94689287770fbfada74e0e2b302bf7c93;hb=db16b7486486282b8831f38d759da1bc3255cd9c;hp=c7b0ffb1b3e75575ae85183bf0155eaf8daaed5c;hpb=22abf04a5d5485d051adac9d2447ad2fcbfb2704;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/printcmd.c b/gdb/printcmd.c index c7b0ffb1b3..11fd1df946 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -42,6 +42,7 @@ #include "ui-out.h" #include "gdb_assert.h" #include "block.h" +#include "disasm.h" extern int asm_demangle; /* Whether to demangle syms in asm printouts */ extern int addressprint; /* Whether to print hex addresses in HLL " */ @@ -175,8 +176,6 @@ static void print_formatted (struct value *, int, int, struct ui_file *); static struct format_data decode_format (char **, int, int); -static int print_insn (CORE_ADDR, struct ui_file *); - static void sym_info (char *, int); @@ -310,7 +309,7 @@ print_formatted (struct value *val, register int format, int size, /* We often wrap here if there are long symbolic names. */ wrap_here (" "); next_address = VALUE_ADDRESS (val) - + print_insn (VALUE_ADDRESS (val), stream); + + gdb_print_insn (VALUE_ADDRESS (val), stream); next_section = VALUE_BFD_SECTION (val); break; @@ -343,7 +342,7 @@ print_formatted (struct value *val, register int format, int size, with a format. */ void -print_scalar_formatted (char *valaddr, struct type *type, int format, int size, +print_scalar_formatted (void *valaddr, struct type *type, int format, int size, struct ui_file *stream) { LONGEST val_long; @@ -1077,7 +1076,7 @@ address_info (char *exp, int from_tty) if (exp == 0) error ("Argument required."); - sym = lookup_symbol (exp, get_selected_block (0), VAR_NAMESPACE, + sym = lookup_symbol (exp, get_selected_block (0), VAR_DOMAIN, &is_a_field_of_this, (struct symtab **) NULL); if (sym == NULL) { @@ -1845,7 +1844,7 @@ print_frame_args (struct symbol *func, struct frame_info *fi, int num, struct symbol *nsym; nsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), - b, VAR_NAMESPACE, (int *) NULL, (struct symtab **) NULL); + b, VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); if (SYMBOL_CLASS (nsym) == LOC_REGISTER) { /* There is a LOC_ARG/LOC_REGISTER pair. This means that @@ -1956,28 +1955,13 @@ print_frame_nameless_args (struct frame_info *fi, long start, int num, for (i = 0; i < num; i++) { QUIT; -#ifdef NAMELESS_ARG_VALUE - NAMELESS_ARG_VALUE (fi, start, &arg_value); -#else - argsaddr = FRAME_ARGS_ADDRESS (fi); + argsaddr = get_frame_args_address (fi); if (!argsaddr) return; - arg_value = read_memory_integer (argsaddr + start, sizeof (int)); -#endif - if (!first) fprintf_filtered (stream, ", "); - -#ifdef PRINT_NAMELESS_INTEGER - PRINT_NAMELESS_INTEGER (stream, arg_value); -#else -#ifdef PRINT_TYPELESS_INTEGER - PRINT_TYPELESS_INTEGER (stream, builtin_type_int, (LONGEST) arg_value); -#else fprintf_filtered (stream, "%ld", arg_value); -#endif /* PRINT_TYPELESS_INTEGER */ -#endif /* PRINT_NAMELESS_INTEGER */ first = 0; start += sizeof (int); } @@ -2255,27 +2239,6 @@ printf_command (char *arg, int from_tty) do_cleanups (old_cleanups); } -/* Print the instruction at address MEMADDR in debugged memory, - on STREAM. Returns length of the instruction, in bytes. */ - -static int -print_insn (CORE_ADDR memaddr, struct ui_file *stream) -{ - if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) - TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_BIG; - else - TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_LITTLE; - - if (TARGET_ARCHITECTURE != NULL) - TARGET_PRINT_INSN_INFO->mach = TARGET_ARCHITECTURE->mach; - /* else: should set .mach=0 but some disassemblers don't grok this */ - - TARGET_PRINT_INSN_INFO->stream = stream; - - return TARGET_PRINT_INSN (memaddr, TARGET_PRINT_INSN_INFO); -} - - void _initialize_printcmd (void) {