*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index 5196ef049b68516b4404164113ec414389b9a3fa..11fd1df94689287770fbfada74e0e2b302bf7c93 100644 (file)
@@ -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);
 \f
 
@@ -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;
 
@@ -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);
-}
-\f
-
 void
 _initialize_printcmd (void)
 {
This page took 0.025612 seconds and 4 git commands to generate.