gdb: convert arm to new-style debug macros
gdb/ChangeLog: * arm-tdep.c (arm_debug_printf): Add and use throughout file. Change-Id: Iec5c2955cb79d8c0288ffded2c8a58b7eb7e3554
This commit is contained in:
parent
be07043ea8
commit
7cb6d92a3f
@ -1,3 +1,7 @@
|
|||||||
|
2021-01-21 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* arm-tdep.c (arm_debug_printf): Add and use throughout file.
|
||||||
|
|
||||||
2021-01-20 Simon Marchi <simon.marchi@polymtl.ca>
|
2021-01-20 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* gdb_bfd.c (debug_bfd_cache): Change type to bool.
|
* gdb_bfd.c (debug_bfd_cache): Change type to bool.
|
||||||
|
@ -68,6 +68,11 @@
|
|||||||
|
|
||||||
static bool arm_debug;
|
static bool arm_debug;
|
||||||
|
|
||||||
|
/* Print an "arm" debug statement. */
|
||||||
|
|
||||||
|
#define arm_debug_printf(fmt, ...) \
|
||||||
|
debug_prefixed_printf_cond (arm_debug, "arm", fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
/* Macros for setting and testing a bit in a minimal symbol that marks
|
/* Macros for setting and testing a bit in a minimal symbol that marks
|
||||||
it as Thumb function. The MSB of the minimal symbol's "info" field
|
it as Thumb function. The MSB of the minimal symbol's "info" field
|
||||||
is used for this purpose.
|
is used for this purpose.
|
||||||
@ -1122,8 +1127,7 @@ thumb_analyze_prologue (struct gdbarch *gdbarch,
|
|||||||
start += 2;
|
start += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arm_debug)
|
arm_debug_printf ("Prologue scan stopped at %s",
|
||||||
fprintf_unfiltered (gdb_stdlog, "Prologue scan stopped at %s\n",
|
|
||||||
paddress (gdbarch, start));
|
paddress (gdbarch, start));
|
||||||
|
|
||||||
if (unrecognized_pc == 0)
|
if (unrecognized_pc == 0)
|
||||||
@ -1782,8 +1786,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
|||||||
cache->saved_regs[regno].set_addr (offset);
|
cache->saved_regs[regno].set_addr (offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arm_debug)
|
arm_debug_printf ("Prologue scan stopped at %s",
|
||||||
fprintf_unfiltered (gdb_stdlog, "Prologue scan stopped at %s\n",
|
|
||||||
paddress (gdbarch, unrecognized_pc));
|
paddress (gdbarch, unrecognized_pc));
|
||||||
|
|
||||||
return unrecognized_pc;
|
return unrecognized_pc;
|
||||||
@ -3789,10 +3792,10 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
|||||||
passing register. */
|
passing register. */
|
||||||
if (return_method == return_method_struct)
|
if (return_method == return_method_struct)
|
||||||
{
|
{
|
||||||
if (arm_debug)
|
arm_debug_printf ("struct return in %s = %s",
|
||||||
fprintf_unfiltered (gdb_stdlog, "struct return in %s = %s\n",
|
|
||||||
gdbarch_register_name (gdbarch, argreg),
|
gdbarch_register_name (gdbarch, argreg),
|
||||||
paddress (gdbarch, struct_addr));
|
paddress (gdbarch, struct_addr));
|
||||||
|
|
||||||
regcache_cooked_write_unsigned (regcache, argreg, struct_addr);
|
regcache_cooked_write_unsigned (regcache, argreg, struct_addr);
|
||||||
argreg++;
|
argreg++;
|
||||||
}
|
}
|
||||||
@ -3938,12 +3941,11 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
|||||||
register. */
|
register. */
|
||||||
if (byte_order == BFD_ENDIAN_BIG)
|
if (byte_order == BFD_ENDIAN_BIG)
|
||||||
regval <<= (ARM_INT_REGISTER_SIZE - partial_len) * 8;
|
regval <<= (ARM_INT_REGISTER_SIZE - partial_len) * 8;
|
||||||
if (arm_debug)
|
|
||||||
fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n",
|
arm_debug_printf ("arg %d in %s = 0x%s", argnum,
|
||||||
argnum,
|
gdbarch_register_name (gdbarch, argreg),
|
||||||
gdbarch_register_name
|
|
||||||
(gdbarch, argreg),
|
|
||||||
phex (regval, ARM_INT_REGISTER_SIZE));
|
phex (regval, ARM_INT_REGISTER_SIZE));
|
||||||
|
|
||||||
regcache_cooked_write_unsigned (regcache, argreg, regval);
|
regcache_cooked_write_unsigned (regcache, argreg, regval);
|
||||||
argreg++;
|
argreg++;
|
||||||
}
|
}
|
||||||
@ -3955,9 +3957,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
|||||||
store_unsigned_integer (buf, partial_len, byte_order, regval);
|
store_unsigned_integer (buf, partial_len, byte_order, regval);
|
||||||
|
|
||||||
/* Push the arguments onto the stack. */
|
/* Push the arguments onto the stack. */
|
||||||
if (arm_debug)
|
arm_debug_printf ("arg %d @ sp + %d", argnum, nstack);
|
||||||
fprintf_unfiltered (gdb_stdlog, "arg %d @ sp + %d\n",
|
|
||||||
argnum, nstack);
|
|
||||||
si = push_stack_item (si, buf, ARM_INT_REGISTER_SIZE);
|
si = push_stack_item (si, buf, ARM_INT_REGISTER_SIZE);
|
||||||
nstack += ARM_INT_REGISTER_SIZE;
|
nstack += ARM_INT_REGISTER_SIZE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user