#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 " */
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
/* 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;
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;
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)
{
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
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);
}
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)
{