mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
Compare commits
3 Commits
gdb-11-bra
...
users/sima
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1089d50d80 | ||
|
|
7fe4c96eba | ||
|
|
1e0a316632 |
@@ -1117,6 +1117,7 @@ aarch64_prologue_prev_register (struct frame_info *this_frame,
|
||||
/* AArch64 prologue unwinder. */
|
||||
static frame_unwind aarch64_prologue_unwind =
|
||||
{
|
||||
"aarch64 prologue",
|
||||
NORMAL_FRAME,
|
||||
aarch64_prologue_frame_unwind_stop_reason,
|
||||
aarch64_prologue_this_id,
|
||||
@@ -1211,6 +1212,7 @@ aarch64_stub_unwind_sniffer (const struct frame_unwind *self,
|
||||
/* AArch64 stub unwinder. */
|
||||
static frame_unwind aarch64_stub_unwind =
|
||||
{
|
||||
"aarch64 stub",
|
||||
NORMAL_FRAME,
|
||||
aarch64_stub_frame_unwind_stop_reason,
|
||||
aarch64_stub_this_id,
|
||||
|
||||
@@ -333,7 +333,9 @@ alpha_mdebug_frame_sniffer (const struct frame_unwind *self,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const struct frame_unwind alpha_mdebug_frame_unwind = {
|
||||
static const struct frame_unwind alpha_mdebug_frame_unwind =
|
||||
{
|
||||
"alpha mdebug",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
alpha_mdebug_frame_this_id,
|
||||
|
||||
@@ -1012,7 +1012,9 @@ alpha_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct frame_unwind alpha_sigtramp_frame_unwind = {
|
||||
static const struct frame_unwind alpha_sigtramp_frame_unwind =
|
||||
{
|
||||
"alpha sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
alpha_sigtramp_frame_this_id,
|
||||
@@ -1429,7 +1431,9 @@ alpha_heuristic_frame_prev_register (struct frame_info *this_frame,
|
||||
return trad_frame_get_prev_register (this_frame, info->saved_regs, regnum);
|
||||
}
|
||||
|
||||
static const struct frame_unwind alpha_heuristic_frame_unwind = {
|
||||
static const struct frame_unwind alpha_heuristic_frame_unwind =
|
||||
{
|
||||
"alpha prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
alpha_heuristic_frame_this_id,
|
||||
|
||||
@@ -402,10 +402,12 @@ amd64obsd_trapframe_sniffer (const struct frame_unwind *self,
|
||||
|| (startswith (name, "Xintr"))));
|
||||
}
|
||||
|
||||
static const struct frame_unwind amd64obsd_trapframe_unwind = {
|
||||
static const struct frame_unwind amd64obsd_trapframe_unwind =
|
||||
{
|
||||
/* FIXME: kettenis/20051219: This really is more like an interrupt
|
||||
frame, but SIGTRAMP_FRAME would print <signal handler called>,
|
||||
which really is not what we want here. */
|
||||
"amd64 openbsd trap",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
amd64obsd_trapframe_this_id,
|
||||
|
||||
@@ -2698,6 +2698,7 @@ amd64_frame_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
static const struct frame_unwind amd64_frame_unwind =
|
||||
{
|
||||
"amd64 prologue",
|
||||
NORMAL_FRAME,
|
||||
amd64_frame_unwind_stop_reason,
|
||||
amd64_frame_this_id,
|
||||
@@ -2842,6 +2843,7 @@ amd64_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind amd64_sigtramp_frame_unwind =
|
||||
{
|
||||
"amd64 sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
amd64_sigtramp_frame_unwind_stop_reason,
|
||||
amd64_sigtramp_frame_this_id,
|
||||
@@ -2977,6 +2979,7 @@ amd64_epilogue_frame_this_id (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind amd64_epilogue_frame_unwind =
|
||||
{
|
||||
"amd64 epilogue",
|
||||
NORMAL_FRAME,
|
||||
amd64_epilogue_frame_unwind_stop_reason,
|
||||
amd64_epilogue_frame_this_id,
|
||||
|
||||
@@ -756,14 +756,10 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame,
|
||||
(gdb_byte *) &ex_ui, sizeof (ex_ui)) != 0)
|
||||
return;
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered
|
||||
(gdb_stdlog,
|
||||
"amd64_windows_frame_decodes_insn: "
|
||||
"%s: ver: %02x, plgsz: %02x, cnt: %02x, frame: %02x\n",
|
||||
paddress (gdbarch, unwind_info),
|
||||
ex_ui.Version_Flags, ex_ui.SizeOfPrologue,
|
||||
ex_ui.CountOfCodes, ex_ui.FrameRegisterOffset);
|
||||
frame_debug_printf ("%s: ver: %02x, plgsz: %02x, cnt: %02x, frame: %02x",
|
||||
paddress (gdbarch, unwind_info),
|
||||
ex_ui.Version_Flags, ex_ui.SizeOfPrologue,
|
||||
ex_ui.CountOfCodes, ex_ui.FrameRegisterOffset);
|
||||
|
||||
/* Check version. */
|
||||
if (PEX64_UWI_VERSION (ex_ui.Version_Flags) != 1
|
||||
@@ -801,10 +797,9 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame,
|
||||
get_frame_register (this_frame, frreg, buf);
|
||||
save_addr = extract_unsigned_integer (buf, 8, byte_order);
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, " frame_reg=%s, val=%s\n",
|
||||
gdbarch_register_name (gdbarch, frreg),
|
||||
paddress (gdbarch, save_addr));
|
||||
frame_debug_printf (" frame_reg=%s, val=%s",
|
||||
gdbarch_register_name (gdbarch, frreg),
|
||||
paddress (gdbarch, save_addr));
|
||||
}
|
||||
|
||||
/* Read opcodes. */
|
||||
@@ -835,10 +830,8 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame,
|
||||
prologue has been fully executed. */
|
||||
if (cache->pc >= start + p[0] || cache->pc < start)
|
||||
{
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered
|
||||
(gdb_stdlog, " op #%u: off=0x%02x, insn=0x%02x\n",
|
||||
(unsigned) (p - insns), p[0], p[1]);
|
||||
frame_debug_printf (" op #%u: off=0x%02x, insn=0x%02x",
|
||||
(unsigned) (p - insns), p[0], p[1]);
|
||||
|
||||
/* If there is no frame registers defined, the current value of
|
||||
rsp is used instead. */
|
||||
@@ -912,11 +905,11 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
/* Display address where the register was saved. */
|
||||
if (frame_debug && reg >= 0)
|
||||
fprintf_unfiltered
|
||||
(gdb_stdlog, " [reg %s at %s]\n",
|
||||
gdbarch_register_name (gdbarch, reg),
|
||||
paddress (gdbarch, cache->prev_reg_addr[reg]));
|
||||
if (reg >= 0)
|
||||
frame_debug_printf (" [reg %s at %s]",
|
||||
gdbarch_register_name (gdbarch, reg),
|
||||
paddress (gdbarch,
|
||||
cache->prev_reg_addr[reg]));
|
||||
}
|
||||
|
||||
/* Adjust with the length of the opcode. */
|
||||
@@ -978,14 +971,11 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame,
|
||||
unwind_info =
|
||||
extract_unsigned_integer (d.rva_UnwindData, 4, byte_order);
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered
|
||||
(gdb_stdlog,
|
||||
"amd64_windows_frame_decodes_insn (next in chain):"
|
||||
" unwind_data=%s, start_rva=%s, end_rva=%s\n",
|
||||
paddress (gdbarch, unwind_info),
|
||||
paddress (gdbarch, cache->start_rva),
|
||||
paddress (gdbarch, cache->end_rva));
|
||||
frame_debug_printf ("next in chain: unwind_data=%s, start_rva=%s, "
|
||||
"end_rva=%s",
|
||||
paddress (gdbarch, unwind_info),
|
||||
paddress (gdbarch, cache->start_rva),
|
||||
paddress (gdbarch, cache->end_rva));
|
||||
}
|
||||
|
||||
/* Allow the user to break this loop. */
|
||||
@@ -996,10 +986,9 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame,
|
||||
cache->prev_rip_addr = cur_sp;
|
||||
cache->prev_sp = cur_sp + 8;
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, " prev_sp: %s, prev_pc @%s\n",
|
||||
paddress (gdbarch, cache->prev_sp),
|
||||
paddress (gdbarch, cache->prev_rip_addr));
|
||||
frame_debug_printf (" prev_sp: %s, prev_pc @%s",
|
||||
paddress (gdbarch, cache->prev_sp),
|
||||
paddress (gdbarch, cache->prev_rip_addr));
|
||||
}
|
||||
|
||||
/* Find SEH unwind info for PC, returning 0 on success.
|
||||
@@ -1073,11 +1062,9 @@ amd64_windows_find_unwind_info (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||
break;
|
||||
}
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered
|
||||
(gdb_stdlog,
|
||||
"amd64_windows_find_unwind_data: image_base=%s, unwind_data=%s\n",
|
||||
paddress (gdbarch, base), paddress (gdbarch, *unwind_info));
|
||||
frame_debug_printf ("image_base=%s, unwind_data=%s",
|
||||
paddress (gdbarch, base),
|
||||
paddress (gdbarch, *unwind_info));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1139,11 +1126,9 @@ amd64_windows_frame_prev_register (struct frame_info *this_frame,
|
||||
amd64_windows_frame_cache (this_frame, this_cache);
|
||||
CORE_ADDR prev;
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"amd64_windows_frame_prev_register %s for sp=%s\n",
|
||||
gdbarch_register_name (gdbarch, regnum),
|
||||
paddress (gdbarch, cache->prev_sp));
|
||||
frame_debug_printf ("%s for sp=%s",
|
||||
gdbarch_register_name (gdbarch, regnum),
|
||||
paddress (gdbarch, cache->prev_sp));
|
||||
|
||||
if (regnum >= AMD64_XMM0_REGNUM && regnum <= AMD64_XMM0_REGNUM + 15)
|
||||
prev = cache->prev_xmm_addr[regnum - AMD64_XMM0_REGNUM];
|
||||
@@ -1160,8 +1145,8 @@ amd64_windows_frame_prev_register (struct frame_info *this_frame,
|
||||
else
|
||||
prev = 0;
|
||||
|
||||
if (prev && frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, " -> at %s\n", paddress (gdbarch, prev));
|
||||
if (prev != 0)
|
||||
frame_debug_printf (" -> at %s", paddress (gdbarch, prev));
|
||||
|
||||
if (prev)
|
||||
{
|
||||
@@ -1193,6 +1178,7 @@ amd64_windows_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
static const struct frame_unwind amd64_windows_frame_unwind =
|
||||
{
|
||||
"amd64 windows",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
&amd64_windows_frame_this_id,
|
||||
|
||||
@@ -1922,6 +1922,7 @@ arc_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
accepts the frame. */
|
||||
|
||||
static const struct frame_unwind arc_frame_unwind = {
|
||||
"arc prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
arc_frame_this_id,
|
||||
@@ -1937,6 +1938,7 @@ static const struct frame_unwind arc_frame_unwind = {
|
||||
context. */
|
||||
|
||||
static const struct frame_unwind arc_sigtramp_frame_unwind = {
|
||||
"arc sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
arc_sigtramp_frame_this_id,
|
||||
|
||||
@@ -2028,6 +2028,7 @@ arm_prologue_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static frame_unwind arm_prologue_unwind = {
|
||||
"arm prologue",
|
||||
NORMAL_FRAME,
|
||||
arm_prologue_unwind_stop_reason,
|
||||
arm_prologue_this_id,
|
||||
@@ -2737,6 +2738,7 @@ arm_exidx_unwind_sniffer (const struct frame_unwind *self,
|
||||
}
|
||||
|
||||
struct frame_unwind arm_exidx_unwind = {
|
||||
"arm exidx",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
arm_prologue_this_id,
|
||||
@@ -2840,6 +2842,7 @@ arm_epilogue_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind arm_epilogue_frame_unwind =
|
||||
{
|
||||
"arm epilogue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
arm_epilogue_frame_this_id,
|
||||
@@ -2961,6 +2964,7 @@ arm_stub_unwind_sniffer (const struct frame_unwind *self,
|
||||
}
|
||||
|
||||
struct frame_unwind arm_stub_unwind = {
|
||||
"arm stub",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
arm_stub_this_id,
|
||||
@@ -3172,6 +3176,7 @@ arm_m_exception_unwind_sniffer (const struct frame_unwind *self,
|
||||
|
||||
struct frame_unwind arm_m_exception_unwind =
|
||||
{
|
||||
"arm m exception",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
arm_m_exception_this_id,
|
||||
|
||||
@@ -1154,6 +1154,7 @@ avr_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind avr_frame_unwind = {
|
||||
"avr prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
avr_frame_this_id,
|
||||
|
||||
@@ -374,6 +374,7 @@ bfin_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind bfin_frame_unwind =
|
||||
{
|
||||
"bfin prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
bfin_frame_this_id,
|
||||
|
||||
@@ -184,6 +184,7 @@ bpf_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind bpf_frame_unwind =
|
||||
{
|
||||
"bpf prologue",
|
||||
NORMAL_FRAME,
|
||||
bpf_frame_unwind_stop_reason,
|
||||
bpf_frame_this_id,
|
||||
|
||||
@@ -437,6 +437,7 @@ cris_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind cris_sigtramp_frame_unwind =
|
||||
{
|
||||
"cris sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
cris_sigtramp_frame_this_id,
|
||||
@@ -900,6 +901,7 @@ cris_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
static const struct frame_unwind cris_frame_unwind =
|
||||
{
|
||||
"cris prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
cris_frame_this_id,
|
||||
|
||||
@@ -1916,6 +1916,7 @@ csky_frame_prev_register (struct frame_info *this_frame,
|
||||
unwinder. */
|
||||
|
||||
static const struct frame_unwind csky_unwind_cache = {
|
||||
"cski prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
csky_frame_this_id,
|
||||
@@ -1999,6 +2000,7 @@ csky_stub_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static frame_unwind csky_stub_unwind = {
|
||||
"csky stub",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
csky_stub_this_id,
|
||||
|
||||
@@ -379,6 +379,7 @@ dummy_frame_this_id (struct frame_info *this_frame,
|
||||
|
||||
const struct frame_unwind dummy_frame_unwind =
|
||||
{
|
||||
"dummy",
|
||||
DUMMY_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
dummy_frame_this_id,
|
||||
|
||||
@@ -468,6 +468,7 @@ tailcall_frame_prev_arch (struct frame_info *this_frame,
|
||||
|
||||
const struct frame_unwind dwarf2_tailcall_frame_unwind =
|
||||
{
|
||||
"dwarf2 tailcall",
|
||||
TAILCALL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
tailcall_frame_this_id,
|
||||
|
||||
@@ -1380,6 +1380,7 @@ dwarf2_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind dwarf2_frame_unwind =
|
||||
{
|
||||
"dwarf2",
|
||||
NORMAL_FRAME,
|
||||
dwarf2_frame_unwind_stop_reason,
|
||||
dwarf2_frame_this_id,
|
||||
@@ -1391,6 +1392,7 @@ static const struct frame_unwind dwarf2_frame_unwind =
|
||||
|
||||
static const struct frame_unwind dwarf2_signal_frame_unwind =
|
||||
{
|
||||
"dwarf2 signal",
|
||||
SIGTRAMP_FRAME,
|
||||
dwarf2_frame_unwind_stop_reason,
|
||||
dwarf2_frame_this_id,
|
||||
|
||||
@@ -127,10 +127,13 @@ frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
try
|
||||
{
|
||||
frame_debug_printf ("trying unwinder \"%s\"", unwinder->name);
|
||||
res = unwinder->sniffer (unwinder, this_frame, this_cache);
|
||||
}
|
||||
catch (const gdb_exception &ex)
|
||||
{
|
||||
frame_debug_printf ("caught exception: %s", ex.message->c_str ());
|
||||
|
||||
/* Catch all exceptions, caused by either interrupt or error.
|
||||
Reset *THIS_CACHE, unless something reinitialized the frame
|
||||
cache meanwhile, in which case THIS_FRAME/THIS_CACHE are now
|
||||
@@ -153,9 +156,13 @@ frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache,
|
||||
}
|
||||
|
||||
if (res)
|
||||
return 1;
|
||||
{
|
||||
frame_debug_printf ("yes");
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame_debug_printf ("no");
|
||||
/* Don't set *THIS_CACHE to NULL here, because sniffer has to do
|
||||
so. */
|
||||
frame_cleanup_after_sniffer (this_frame);
|
||||
@@ -171,6 +178,10 @@ frame_unwind_try_unwinder (struct frame_info *this_frame, void **this_cache,
|
||||
void
|
||||
frame_unwind_find_by_frame (struct frame_info *this_frame, void **this_cache)
|
||||
{
|
||||
FRAME_SCOPED_DEBUG_ENTER_EXIT;
|
||||
|
||||
frame_debug_printf ("this_frame=%d", frame_relative_level (this_frame));
|
||||
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
struct frame_unwind_table *table
|
||||
= (struct frame_unwind_table *) gdbarch_data (gdbarch, frame_unwind_data);
|
||||
|
||||
@@ -158,6 +158,7 @@ typedef struct gdbarch *(frame_prev_arch_ftype) (struct frame_info *this_frame,
|
||||
|
||||
struct frame_unwind
|
||||
{
|
||||
const char *name;
|
||||
/* The frame's type. Should this instead be a collection of
|
||||
predicates that test the frame for various attributes? */
|
||||
enum frame_type type;
|
||||
|
||||
290
gdb/frame.c
290
gdb/frame.c
@@ -330,7 +330,8 @@ scoped_restore_selected_frame::~scoped_restore_selected_frame ()
|
||||
|
||||
/* Flag to control debugging. */
|
||||
|
||||
unsigned int frame_debug;
|
||||
bool frame_debug;
|
||||
|
||||
static void
|
||||
show_frame_debug (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
@@ -399,10 +400,10 @@ fprint_frame_id (struct ui_file *file, struct frame_id id)
|
||||
else
|
||||
fprintf_unfiltered (file, "stack=%s", hex_string (id.stack_addr));
|
||||
|
||||
fprintf_unfiltered (file, ",");
|
||||
fprintf_unfiltered (file, ", ");
|
||||
|
||||
fprint_field (file, "code", id.code_addr_p, id.code_addr);
|
||||
fprintf_unfiltered (file, ",");
|
||||
fprintf_unfiltered (file, ", ");
|
||||
|
||||
fprint_field (file, "special", id.special_addr_p, id.special_addr);
|
||||
|
||||
@@ -455,21 +456,21 @@ fprint_frame (struct ui_file *file, struct frame_info *fi)
|
||||
|
||||
fprintf_unfiltered (file, "{");
|
||||
fprintf_unfiltered (file, "level=%d", fi->level);
|
||||
fprintf_unfiltered (file, ",");
|
||||
fprintf_unfiltered (file, ", ");
|
||||
|
||||
fprintf_unfiltered (file, "type=");
|
||||
if (fi->unwind != NULL)
|
||||
fprint_frame_type (file, fi->unwind->type);
|
||||
else
|
||||
fprintf_unfiltered (file, "<unknown>");
|
||||
fprintf_unfiltered (file, ",");
|
||||
fprintf_unfiltered (file, ", ");
|
||||
|
||||
fprintf_unfiltered (file, "unwind=");
|
||||
if (fi->unwind != NULL)
|
||||
gdb_print_host_address (fi->unwind, file);
|
||||
else
|
||||
fprintf_unfiltered (file, "<unknown>");
|
||||
fprintf_unfiltered (file, ",");
|
||||
fprintf_unfiltered (file, ", ");
|
||||
|
||||
fprintf_unfiltered (file, "pc=");
|
||||
if (fi->next == NULL || fi->next->prev_pc.status == CC_UNKNOWN)
|
||||
@@ -484,7 +485,7 @@ fprint_frame (struct ui_file *file, struct frame_info *fi)
|
||||
val_print_not_saved (file);
|
||||
else if (fi->next->prev_pc.status == CC_UNAVAILABLE)
|
||||
val_print_unavailable (file);
|
||||
fprintf_unfiltered (file, ",");
|
||||
fprintf_unfiltered (file, ", ");
|
||||
|
||||
fprintf_unfiltered (file, "id=");
|
||||
if (fi->this_id.p == frame_id_status::NOT_COMPUTED)
|
||||
@@ -493,7 +494,7 @@ fprint_frame (struct ui_file *file, struct frame_info *fi)
|
||||
fprintf_unfiltered (file, "<computing>");
|
||||
else
|
||||
fprint_frame_id (file, fi->this_id.value);
|
||||
fprintf_unfiltered (file, ",");
|
||||
fprintf_unfiltered (file, ", ");
|
||||
|
||||
fprintf_unfiltered (file, "func=");
|
||||
if (fi->next != NULL && fi->next->prev_func.status == CC_VALUE)
|
||||
@@ -565,6 +566,8 @@ skip_tailcall_frames (struct frame_info *frame)
|
||||
static void
|
||||
compute_frame_id (struct frame_info *fi)
|
||||
{
|
||||
FRAME_SCOPED_DEBUG_ENTER_EXIT;
|
||||
|
||||
gdb_assert (fi->this_id.p == frame_id_status::NOT_COMPUTED);
|
||||
|
||||
unsigned int entry_generation = get_frame_cache_generation ();
|
||||
@@ -574,9 +577,7 @@ compute_frame_id (struct frame_info *fi)
|
||||
/* Mark this frame's id as "being computed. */
|
||||
fi->this_id.p = frame_id_status::COMPUTING;
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "{ compute_frame_id (fi=%d) ",
|
||||
fi->level);
|
||||
frame_debug_printf ("fi=%d", fi->level);
|
||||
|
||||
/* Find the unwinder. */
|
||||
if (fi->unwind == NULL)
|
||||
@@ -593,9 +594,12 @@ compute_frame_id (struct frame_info *fi)
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame_id (gdb_stdlog, fi->this_id.value);
|
||||
fprintf_unfiltered (gdb_stdlog, " }\n");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> ");
|
||||
fprint_frame_id (&debug_file, fi->this_id.value);
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
}
|
||||
catch (const gdb_exception &ex)
|
||||
@@ -749,9 +753,13 @@ frame_id_p (frame_id l)
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "{ frame_id_p (l=");
|
||||
fprint_frame_id (gdb_stdlog, l);
|
||||
fprintf_unfiltered (gdb_stdlog, ") -> %d }\n", p);
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, "l=");
|
||||
fprint_frame_id (&debug_file, l);
|
||||
fprintf_unfiltered (&debug_file, " -> %d", p);
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
return p;
|
||||
@@ -797,11 +805,15 @@ frame_id_eq (frame_id l, frame_id r)
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "{ frame_id_eq (l=");
|
||||
fprint_frame_id (gdb_stdlog, l);
|
||||
fprintf_unfiltered (gdb_stdlog, ",r=");
|
||||
fprint_frame_id (gdb_stdlog, r);
|
||||
fprintf_unfiltered (gdb_stdlog, ") -> %d }\n", eq);
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, "l=");
|
||||
fprint_frame_id (&debug_file, l);
|
||||
fprintf_unfiltered (&debug_file, ", r=");
|
||||
fprint_frame_id (&debug_file, r);
|
||||
fprintf_unfiltered (&debug_file, " -> %d", eq);
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
return eq;
|
||||
@@ -880,11 +892,15 @@ frame_id_inner (struct gdbarch *gdbarch, struct frame_id l, struct frame_id r)
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "{ frame_id_inner (l=");
|
||||
fprint_frame_id (gdb_stdlog, l);
|
||||
fprintf_unfiltered (gdb_stdlog, ",r=");
|
||||
fprint_frame_id (gdb_stdlog, r);
|
||||
fprintf_unfiltered (gdb_stdlog, ") -> %d }\n", inner);
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, "l=");
|
||||
fprint_frame_id (&debug_file, l);
|
||||
fprintf_unfiltered (&debug_file, ", r=");
|
||||
fprint_frame_id (&debug_file, r);
|
||||
fprintf_unfiltered (&debug_file, " -> %d", inner);
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
return inner;
|
||||
@@ -980,21 +996,15 @@ frame_unwind_pc (struct frame_info *this_frame)
|
||||
{
|
||||
this_frame->prev_pc.status = CC_UNAVAILABLE;
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ frame_unwind_pc (this_frame=%d)"
|
||||
" -> <unavailable> }\n",
|
||||
this_frame->level);
|
||||
frame_debug_printf ("this_frame=%d -> <unavailable>",
|
||||
this_frame->level);
|
||||
}
|
||||
else if (ex.error == OPTIMIZED_OUT_ERROR)
|
||||
{
|
||||
this_frame->prev_pc.status = CC_NOT_SAVED;
|
||||
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ frame_unwind_pc (this_frame=%d)"
|
||||
" -> <not saved> }\n",
|
||||
this_frame->level);
|
||||
frame_debug_printf ("this_frame=%d -> <not saved>",
|
||||
this_frame->level);
|
||||
}
|
||||
else
|
||||
throw;
|
||||
@@ -1004,12 +1014,10 @@ frame_unwind_pc (struct frame_info *this_frame)
|
||||
{
|
||||
this_frame->prev_pc.value = pc;
|
||||
this_frame->prev_pc.status = CC_VALUE;
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ frame_unwind_pc (this_frame=%d) "
|
||||
"-> %s }\n",
|
||||
this_frame->level,
|
||||
hex_string (this_frame->prev_pc.value));
|
||||
|
||||
frame_debug_printf ("this_frame=%d -> %s",
|
||||
this_frame->level,
|
||||
hex_string (this_frame->prev_pc.value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1052,21 +1060,18 @@ get_frame_func_if_available (frame_info *this_frame, CORE_ADDR *pc)
|
||||
if (!get_frame_address_in_block_if_available (this_frame, &addr_in_block))
|
||||
{
|
||||
next_frame->prev_func.status = CC_UNAVAILABLE;
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ get_frame_func (this_frame=%d)"
|
||||
" -> unavailable }\n",
|
||||
this_frame->level);
|
||||
|
||||
frame_debug_printf ("this_frame=%d -> unavailable",
|
||||
this_frame->level);
|
||||
}
|
||||
else
|
||||
{
|
||||
next_frame->prev_func.status = CC_VALUE;
|
||||
next_frame->prev_func.addr = get_pc_function_start (addr_in_block);
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ get_frame_func (this_frame=%d) -> %s }\n",
|
||||
this_frame->level,
|
||||
hex_string (next_frame->prev_func.addr));
|
||||
|
||||
frame_debug_printf ("this_frame=%d -> %s",
|
||||
this_frame->level,
|
||||
hex_string (next_frame->prev_func.addr));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1260,14 +1265,9 @@ frame_unwind_register_value (frame_info *next_frame, int regnum)
|
||||
gdb_assert (next_frame != NULL);
|
||||
gdbarch = frame_unwind_arch (next_frame);
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ frame_unwind_register_value "
|
||||
"(frame=%d,regnum=%d(%s),...) ",
|
||||
next_frame->level, regnum,
|
||||
user_reg_map_regnum_to_name (gdbarch, regnum));
|
||||
}
|
||||
frame_debug_printf ("frame=%d, regnum=%d(%s)",
|
||||
next_frame->level, regnum,
|
||||
user_reg_map_regnum_to_name (gdbarch, regnum));
|
||||
|
||||
/* Find the unwinder. */
|
||||
if (next_frame->unwind == NULL)
|
||||
@@ -1280,40 +1280,42 @@ frame_unwind_register_value (frame_info *next_frame, int regnum)
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "->");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " ->");
|
||||
if (value_optimized_out (value))
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, " ");
|
||||
val_print_not_saved (gdb_stdlog);
|
||||
fprintf_unfiltered (&debug_file, " ");
|
||||
val_print_not_saved (&debug_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (VALUE_LVAL (value) == lval_register)
|
||||
fprintf_unfiltered (gdb_stdlog, " register=%d",
|
||||
fprintf_unfiltered (&debug_file, " register=%d",
|
||||
VALUE_REGNUM (value));
|
||||
else if (VALUE_LVAL (value) == lval_memory)
|
||||
fprintf_unfiltered (gdb_stdlog, " address=%s",
|
||||
fprintf_unfiltered (&debug_file, " address=%s",
|
||||
paddress (gdbarch,
|
||||
value_address (value)));
|
||||
else
|
||||
fprintf_unfiltered (gdb_stdlog, " computed");
|
||||
fprintf_unfiltered (&debug_file, " computed");
|
||||
|
||||
if (value_lazy (value))
|
||||
fprintf_unfiltered (gdb_stdlog, " lazy");
|
||||
fprintf_unfiltered (&debug_file, " lazy");
|
||||
else
|
||||
{
|
||||
int i;
|
||||
const gdb_byte *buf = value_contents (value);
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog, " bytes=");
|
||||
fprintf_unfiltered (gdb_stdlog, "[");
|
||||
fprintf_unfiltered (&debug_file, " bytes=");
|
||||
fprintf_unfiltered (&debug_file, "[");
|
||||
for (i = 0; i < register_size (gdbarch, regnum); i++)
|
||||
fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
|
||||
fprintf_unfiltered (gdb_stdlog, "]");
|
||||
fprintf_unfiltered (&debug_file, "%02x", buf[i]);
|
||||
fprintf_unfiltered (&debug_file, "]");
|
||||
}
|
||||
}
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog, " }\n");
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
return value;
|
||||
@@ -1623,12 +1625,17 @@ create_sentinel_frame (struct program_space *pspace, struct regcache *regcache)
|
||||
/* The sentinel frame has a special ID. */
|
||||
frame->this_id.p = frame_id_status::COMPUTED;
|
||||
frame->this_id.value = sentinel_frame_id;
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "{ create_sentinel_frame (...) -> ");
|
||||
fprint_frame (gdb_stdlog, frame);
|
||||
fprintf_unfiltered (gdb_stdlog, " }\n");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> ");
|
||||
fprint_frame (&debug_file, frame);
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
@@ -1952,12 +1959,8 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
|
||||
{
|
||||
struct frame_info *fi;
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ create_new_frame (addr=%s, pc=%s) ",
|
||||
hex_string (addr), hex_string (pc));
|
||||
}
|
||||
frame_debug_printf ("addr=%s, pc=%s",
|
||||
hex_string (addr), hex_string (pc));
|
||||
|
||||
fi = FRAME_OBSTACK_ZALLOC (struct frame_info);
|
||||
|
||||
@@ -1984,9 +1987,12 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame (gdb_stdlog, fi);
|
||||
fprintf_unfiltered (gdb_stdlog, " }\n");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> ");
|
||||
fprint_frame (&debug_file, fi);
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
return fi;
|
||||
@@ -2060,8 +2066,8 @@ reinit_frame_cache (void)
|
||||
sentinel_frame = NULL; /* Invalidate cache */
|
||||
select_frame (NULL);
|
||||
frame_stash_invalidate ();
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "{ reinit_frame_cache () }\n");
|
||||
|
||||
frame_debug_printf ("called, generation=%d", frame_cache_generation);
|
||||
}
|
||||
|
||||
/* Find where a register is saved (in memory or another register).
|
||||
@@ -2131,9 +2137,13 @@ get_prev_frame_if_no_cycle (struct frame_info *this_frame)
|
||||
detected a cycle. */
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame (gdb_stdlog, NULL);
|
||||
fprintf_unfiltered (gdb_stdlog, " // this frame has same ID }\n");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> ");
|
||||
fprint_frame (&debug_file, NULL);
|
||||
fprintf_unfiltered (&debug_file, " // this frame has same ID");
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
this_frame->stop_reason = UNWIND_SAME_ID;
|
||||
/* Unlink. */
|
||||
@@ -2163,29 +2173,38 @@ get_prev_frame_if_no_cycle (struct frame_info *this_frame)
|
||||
static struct frame_info *
|
||||
get_prev_frame_always_1 (struct frame_info *this_frame)
|
||||
{
|
||||
struct gdbarch *gdbarch;
|
||||
FRAME_SCOPED_DEBUG_ENTER_EXIT;
|
||||
|
||||
gdb_assert (this_frame != NULL);
|
||||
gdbarch = get_frame_arch (this_frame);
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "{ get_prev_frame_always (this_frame=");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, "this_frame=");
|
||||
|
||||
if (this_frame != NULL)
|
||||
fprintf_unfiltered (gdb_stdlog, "%d", this_frame->level);
|
||||
fprintf_unfiltered (&debug_file, "%d", this_frame->level);
|
||||
else
|
||||
fprintf_unfiltered (gdb_stdlog, "<NULL>");
|
||||
fprintf_unfiltered (gdb_stdlog, ") ");
|
||||
fprintf_unfiltered (&debug_file, "<NULL>");
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||
|
||||
/* Only try to do the unwind once. */
|
||||
if (this_frame->prev_p)
|
||||
{
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame (gdb_stdlog, this_frame->prev);
|
||||
fprintf_unfiltered (gdb_stdlog, " // cached \n");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> ");
|
||||
fprint_frame (&debug_file, this_frame->prev);
|
||||
fprintf_unfiltered (&debug_file, " // cached");
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
return this_frame->prev;
|
||||
}
|
||||
@@ -2235,12 +2254,15 @@ get_prev_frame_always_1 (struct frame_info *this_frame)
|
||||
{
|
||||
if (frame_debug)
|
||||
{
|
||||
string_file debug_file;
|
||||
enum unwind_stop_reason reason = this_frame->stop_reason;
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame (gdb_stdlog, NULL);
|
||||
fprintf_unfiltered (gdb_stdlog, " // %s }\n",
|
||||
fprintf_unfiltered (&debug_file, "-> ");
|
||||
fprint_frame (&debug_file, NULL);
|
||||
fprintf_unfiltered (&debug_file, " // %s",
|
||||
frame_stop_reason_symbol_string (reason));
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -2268,10 +2290,14 @@ get_prev_frame_always_1 (struct frame_info *this_frame)
|
||||
{
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame (gdb_stdlog, NULL);
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" // this frame ID is inner }\n");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> ");
|
||||
fprint_frame (&debug_file, NULL);
|
||||
fprintf_unfiltered (&debug_file,
|
||||
" // this frame ID is inner");
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
this_frame->stop_reason = UNWIND_INNER_ID;
|
||||
return NULL;
|
||||
@@ -2314,9 +2340,13 @@ get_prev_frame_always_1 (struct frame_info *this_frame)
|
||||
{
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame (gdb_stdlog, NULL);
|
||||
fprintf_unfiltered (gdb_stdlog, " // no saved PC }\n");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> ");
|
||||
fprint_frame (&debug_file, NULL);
|
||||
fprintf_unfiltered (&debug_file, " // no saved PC");
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
this_frame->stop_reason = UNWIND_NO_SAVED_PC;
|
||||
@@ -2422,9 +2452,12 @@ get_prev_frame_raw (struct frame_info *this_frame)
|
||||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame (gdb_stdlog, prev_frame);
|
||||
fprintf_unfiltered (gdb_stdlog, " }\n");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> ");
|
||||
fprint_frame (&debug_file, prev_frame);
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
return prev_frame;
|
||||
@@ -2438,12 +2471,18 @@ frame_debug_got_null_frame (struct frame_info *this_frame,
|
||||
{
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "{ get_prev_frame (this_frame=");
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (&debug_file, "this_frame=");
|
||||
|
||||
if (this_frame != NULL)
|
||||
fprintf_unfiltered (gdb_stdlog, "%d", this_frame->level);
|
||||
fprintf_unfiltered (&debug_file, "%d", this_frame->level);
|
||||
else
|
||||
fprintf_unfiltered (gdb_stdlog, "<NULL>");
|
||||
fprintf_unfiltered (gdb_stdlog, ") -> // %s}\n", reason);
|
||||
fprintf_unfiltered (&debug_file, "<NULL>");
|
||||
|
||||
fprintf_unfiltered (&debug_file, " -> %s", reason);
|
||||
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2509,6 +2548,8 @@ inside_entry_func (frame_info *this_frame)
|
||||
struct frame_info *
|
||||
get_prev_frame (struct frame_info *this_frame)
|
||||
{
|
||||
FRAME_SCOPED_DEBUG_ENTER_EXIT;
|
||||
|
||||
CORE_ADDR frame_pc;
|
||||
int frame_pc_p;
|
||||
|
||||
@@ -2957,11 +2998,10 @@ frame_unwind_arch (struct frame_info *next_frame)
|
||||
|
||||
next_frame->prev_arch.arch = arch;
|
||||
next_frame->prev_arch.p = true;
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ frame_unwind_arch (next_frame=%d) -> %s }\n",
|
||||
next_frame->level,
|
||||
gdbarch_bfd_arch_info (arch)->printable_name);
|
||||
|
||||
frame_debug_printf ("next_frame=%d -> %s",
|
||||
next_frame->level,
|
||||
gdbarch_bfd_arch_info (arch)->printable_name);
|
||||
}
|
||||
|
||||
return next_frame->prev_arch.arch;
|
||||
@@ -3208,11 +3248,11 @@ Literal \"unlimited\" or zero means no limit."),
|
||||
set_backtrace_option_defs, &set_backtrace_cmdlist, &show_backtrace_cmdlist);
|
||||
|
||||
/* Debug this files internals. */
|
||||
add_setshow_zuinteger_cmd ("frame", class_maintenance, &frame_debug, _("\
|
||||
add_setshow_boolean_cmd ("frame", class_maintenance, &frame_debug, _("\
|
||||
Set frame debugging."), _("\
|
||||
Show frame debugging."), _("\
|
||||
When non-zero, frame specific internal debugging is enabled."),
|
||||
NULL,
|
||||
show_frame_debug,
|
||||
&setdebuglist, &showdebuglist);
|
||||
NULL,
|
||||
show_frame_debug,
|
||||
&setdebuglist, &showdebuglist);
|
||||
}
|
||||
|
||||
11
gdb/frame.h
11
gdb/frame.h
@@ -71,6 +71,7 @@
|
||||
|
||||
#include "language.h"
|
||||
#include "cli/cli-option.h"
|
||||
#include "gdbsupport/common-debug.h"
|
||||
|
||||
struct symtab_and_line;
|
||||
struct frame_unwind;
|
||||
@@ -211,7 +212,15 @@ extern const struct frame_id outer_frame_id;
|
||||
|
||||
/* Flag to control debugging. */
|
||||
|
||||
extern unsigned int frame_debug;
|
||||
extern bool frame_debug;
|
||||
|
||||
/* Print a "frame" debug statement. */
|
||||
|
||||
#define frame_debug_printf(fmt, ...) \
|
||||
debug_prefixed_printf_cond (frame_debug, "frame", fmt, ##__VA_ARGS__)
|
||||
|
||||
#define FRAME_SCOPED_DEBUG_ENTER_EXIT \
|
||||
scoped_debug_enter_exit (frame_debug, "frame")
|
||||
|
||||
/* Construct a frame ID. The first parameter is the frame's constant
|
||||
stack address (typically the outer-bound), and the second the
|
||||
|
||||
@@ -334,6 +334,7 @@ frv_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind frv_linux_sigtramp_frame_unwind =
|
||||
{
|
||||
"frv linux sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
frv_linux_sigtramp_frame_this_id,
|
||||
|
||||
@@ -1411,6 +1411,7 @@ frv_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind frv_frame_unwind = {
|
||||
"frv prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
frv_frame_this_id,
|
||||
|
||||
@@ -525,6 +525,7 @@ ft32_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind ft32_frame_unwind =
|
||||
{
|
||||
"ft32 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
ft32_frame_this_id,
|
||||
|
||||
@@ -501,6 +501,7 @@ h8300_frame_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
}
|
||||
|
||||
static const struct frame_unwind h8300_frame_unwind = {
|
||||
"h8300 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
h8300_frame_this_id,
|
||||
|
||||
@@ -311,6 +311,7 @@ hppa_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
}
|
||||
|
||||
static const struct frame_unwind hppa_linux_sigtramp_frame_unwind = {
|
||||
"hppa linux sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
hppa_linux_sigtramp_frame_this_id,
|
||||
|
||||
@@ -2306,6 +2306,7 @@ hppa_frame_unwind_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind hppa_frame_unwind =
|
||||
{
|
||||
"hppa unwind table",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
hppa_frame_this_id,
|
||||
@@ -2418,6 +2419,7 @@ hppa_fallback_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind hppa_fallback_frame_unwind =
|
||||
{
|
||||
"hppa prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
hppa_fallback_frame_this_id,
|
||||
@@ -2498,6 +2500,7 @@ hppa_stub_unwind_sniffer (const struct frame_unwind *self,
|
||||
}
|
||||
|
||||
static const struct frame_unwind hppa_stub_frame_unwind = {
|
||||
"hppa stub",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
hppa_stub_frame_this_id,
|
||||
|
||||
@@ -391,6 +391,7 @@ i386obsd_trapframe_sniffer (const struct frame_unwind *self,
|
||||
}
|
||||
|
||||
static const struct frame_unwind i386obsd_trapframe_unwind = {
|
||||
"i386 openbsd trap",
|
||||
/* FIXME: kettenis/20051219: This really is more like an interrupt
|
||||
frame, but SIGTRAMP_FRAME would print <signal handler called>,
|
||||
which really is not what we want here. */
|
||||
|
||||
@@ -2195,6 +2195,7 @@ i386_frame_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
static const struct frame_unwind i386_frame_unwind =
|
||||
{
|
||||
"i386 prologue",
|
||||
NORMAL_FRAME,
|
||||
i386_frame_unwind_stop_reason,
|
||||
i386_frame_this_id,
|
||||
@@ -2316,6 +2317,7 @@ i386_epilogue_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind i386_epilogue_frame_unwind =
|
||||
{
|
||||
"i386 epilogue",
|
||||
NORMAL_FRAME,
|
||||
i386_epilogue_frame_unwind_stop_reason,
|
||||
i386_epilogue_frame_this_id,
|
||||
@@ -2397,6 +2399,7 @@ i386_stack_tramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind i386_stack_tramp_frame_unwind =
|
||||
{
|
||||
"i386 stack tramp",
|
||||
NORMAL_FRAME,
|
||||
i386_epilogue_frame_unwind_stop_reason,
|
||||
i386_epilogue_frame_this_id,
|
||||
@@ -2544,6 +2547,7 @@ i386_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind i386_sigtramp_frame_unwind =
|
||||
{
|
||||
"i386 sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
i386_sigtramp_frame_unwind_stop_reason,
|
||||
i386_sigtramp_frame_this_id,
|
||||
|
||||
@@ -2161,6 +2161,7 @@ ia64_frame_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
static const struct frame_unwind ia64_frame_unwind =
|
||||
{
|
||||
"ia64 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
&ia64_frame_this_id,
|
||||
@@ -2348,6 +2349,7 @@ ia64_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind ia64_sigtramp_frame_unwind =
|
||||
{
|
||||
"ia64 sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
ia64_sigtramp_frame_this_id,
|
||||
@@ -3006,6 +3008,7 @@ ia64_libunwind_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind ia64_libunwind_frame_unwind =
|
||||
{
|
||||
"ia64 libunwind",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
ia64_libunwind_frame_this_id,
|
||||
@@ -3094,6 +3097,7 @@ ia64_libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind ia64_libunwind_sigtramp_frame_unwind =
|
||||
{
|
||||
"ia64 libunwind sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
ia64_libunwind_sigtramp_frame_this_id,
|
||||
|
||||
@@ -263,6 +263,7 @@ inline_frame_sniffer (const struct frame_unwind *self,
|
||||
}
|
||||
|
||||
const struct frame_unwind inline_frame_unwind = {
|
||||
"inline",
|
||||
INLINE_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
inline_frame_this_id,
|
||||
|
||||
@@ -426,6 +426,7 @@ iq2000_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
}
|
||||
|
||||
static const struct frame_unwind iq2000_frame_unwind = {
|
||||
"iq2000 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
iq2000_frame_this_id,
|
||||
|
||||
@@ -1044,6 +1044,7 @@ jit_frame_prev_register (struct frame_info *this_frame, void **cache, int reg)
|
||||
|
||||
static const struct frame_unwind jit_frame_unwind =
|
||||
{
|
||||
"jit",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
jit_frame_this_id,
|
||||
|
||||
@@ -458,6 +458,7 @@ lm32_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind lm32_frame_unwind = {
|
||||
"lm32 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
lm32_frame_this_id,
|
||||
|
||||
@@ -1935,6 +1935,7 @@ m32c_prev_register (struct frame_info *this_frame,
|
||||
|
||||
|
||||
static const struct frame_unwind m32c_unwind = {
|
||||
"m32c prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
m32c_this_id,
|
||||
|
||||
@@ -302,6 +302,7 @@ m32r_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
}
|
||||
|
||||
static const struct frame_unwind m32r_linux_sigtramp_frame_unwind = {
|
||||
"m32r linux sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
m32r_linux_sigtramp_frame_this_id,
|
||||
|
||||
@@ -835,6 +835,7 @@ m32r_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind m32r_frame_unwind = {
|
||||
"m32r prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
m32r_frame_this_id,
|
||||
|
||||
@@ -924,6 +924,7 @@ m68hc11_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind m68hc11_frame_unwind = {
|
||||
"m68hc11 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
m68hc11_frame_this_id,
|
||||
|
||||
@@ -316,6 +316,7 @@ m68k_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind m68k_linux_sigtramp_frame_unwind =
|
||||
{
|
||||
"m68k linux sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
m68k_linux_sigtramp_frame_this_id,
|
||||
|
||||
@@ -1003,6 +1003,7 @@ m68k_frame_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
static const struct frame_unwind m68k_frame_unwind =
|
||||
{
|
||||
"m68k prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
m68k_frame_this_id,
|
||||
|
||||
@@ -2053,6 +2053,7 @@ mep_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
|
||||
static const struct frame_unwind mep_frame_unwind = {
|
||||
"mep prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
mep_frame_this_id,
|
||||
|
||||
@@ -492,6 +492,7 @@ microblaze_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind microblaze_frame_unwind =
|
||||
{
|
||||
"microblaze prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
microblaze_frame_this_id,
|
||||
|
||||
@@ -164,6 +164,7 @@ mips_sde_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind mips_sde_frame_unwind =
|
||||
{
|
||||
"mips sde sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
mips_sde_frame_this_id,
|
||||
|
||||
@@ -2902,6 +2902,7 @@ mips_insn16_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind mips_insn16_frame_unwind =
|
||||
{
|
||||
"mips insn16 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
mips_insn16_frame_this_id,
|
||||
@@ -3337,6 +3338,7 @@ mips_micro_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind mips_micro_frame_unwind =
|
||||
{
|
||||
"mips micro prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
mips_micro_frame_this_id,
|
||||
@@ -3712,6 +3714,7 @@ mips_insn32_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind mips_insn32_frame_unwind =
|
||||
{
|
||||
"mips insn32 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
mips_insn32_frame_this_id,
|
||||
@@ -3828,6 +3831,7 @@ mips_stub_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind mips_stub_frame_unwind =
|
||||
{
|
||||
"mips stub",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
mips_stub_frame_this_id,
|
||||
|
||||
@@ -1132,6 +1132,7 @@ mn10300_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind mn10300_frame_unwind = {
|
||||
"mn10300 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
mn10300_frame_this_id,
|
||||
|
||||
@@ -587,6 +587,7 @@ moxie_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind moxie_frame_unwind = {
|
||||
"moxie prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
moxie_frame_this_id,
|
||||
|
||||
@@ -538,6 +538,7 @@ msp430_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind msp430_unwind = {
|
||||
"msp430 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
msp430_this_id,
|
||||
|
||||
@@ -997,6 +997,7 @@ nds32_frame_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
static const struct frame_unwind nds32_frame_unwind =
|
||||
{
|
||||
"nds32 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
nds32_frame_this_id,
|
||||
@@ -1380,6 +1381,7 @@ nds32_epilogue_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind nds32_epilogue_frame_unwind =
|
||||
{
|
||||
"nds32 epilogue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
nds32_epilogue_frame_this_id,
|
||||
|
||||
@@ -1979,6 +1979,7 @@ nios2_frame_base_address (struct frame_info *this_frame, void **this_cache)
|
||||
|
||||
static const struct frame_unwind nios2_frame_unwind =
|
||||
{
|
||||
"nios2 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
nios2_frame_this_id,
|
||||
@@ -2079,6 +2080,7 @@ nios2_stub_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind nios2_stub_frame_unwind =
|
||||
{
|
||||
"nios2 stub",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
nios2_stub_frame_this_id,
|
||||
|
||||
@@ -1096,6 +1096,7 @@ or1k_frame_prev_register (struct frame_info *this_frame,
|
||||
/* Data structures for the normal prologue-analysis-based unwinder. */
|
||||
|
||||
static const struct frame_unwind or1k_frame_unwind = {
|
||||
"or1k prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
or1k_frame_this_id,
|
||||
|
||||
@@ -263,6 +263,7 @@ ppcfbsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind ppcfbsd_sigtramp_frame_unwind = {
|
||||
"ppc freebsd sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
ppcfbsd_sigtramp_frame_this_id,
|
||||
|
||||
@@ -232,6 +232,7 @@ ppcobsd_sigtramp_frame_prev_register (struct frame_info *this_frame,
|
||||
}
|
||||
|
||||
static const struct frame_unwind ppcobsd_sigtramp_frame_unwind = {
|
||||
"ppc openbsd sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
ppcobsd_sigtramp_frame_this_id,
|
||||
|
||||
@@ -602,6 +602,7 @@ pyuw_on_new_gdbarch (struct gdbarch *newarch)
|
||||
struct frame_unwind *unwinder
|
||||
= GDBARCH_OBSTACK_ZALLOC (newarch, struct frame_unwind);
|
||||
|
||||
unwinder->name = "python";
|
||||
unwinder->type = NORMAL_FRAME;
|
||||
unwinder->stop_reason = default_frame_unwind_stop_reason;
|
||||
unwinder->this_id = pyuw_this_id;
|
||||
|
||||
@@ -1888,6 +1888,7 @@ record_btrace_frame_dealloc_cache (struct frame_info *self, void *this_cache)
|
||||
|
||||
const struct frame_unwind record_btrace_frame_unwind =
|
||||
{
|
||||
"record-btrace",
|
||||
NORMAL_FRAME,
|
||||
record_btrace_frame_unwind_stop_reason,
|
||||
record_btrace_frame_this_id,
|
||||
@@ -1899,6 +1900,7 @@ const struct frame_unwind record_btrace_frame_unwind =
|
||||
|
||||
const struct frame_unwind record_btrace_tailcall_frame_unwind =
|
||||
{
|
||||
"record-btrace tailcall",
|
||||
TAILCALL_FRAME,
|
||||
record_btrace_frame_unwind_stop_reason,
|
||||
record_btrace_frame_this_id,
|
||||
|
||||
@@ -3211,6 +3211,7 @@ riscv_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind riscv_frame_unwind =
|
||||
{
|
||||
/*.name =*/ "riscv prologue",
|
||||
/*.type =*/ NORMAL_FRAME,
|
||||
/*.stop_reason =*/ default_frame_unwind_stop_reason,
|
||||
/*.this_id =*/ riscv_frame_this_id,
|
||||
|
||||
@@ -1183,6 +1183,7 @@ rl78_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind rl78_unwind =
|
||||
{
|
||||
"rl78 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
rl78_this_id,
|
||||
|
||||
@@ -156,6 +156,7 @@ aix_sighandle_frame_sniffer (const struct frame_unwind *self,
|
||||
/* AIX signal handler frame unwinder */
|
||||
|
||||
static const struct frame_unwind aix_sighandle_frame_unwind = {
|
||||
"rs6000 aix sighandle",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
aix_sighandle_frame_this_id,
|
||||
|
||||
@@ -3707,6 +3707,7 @@ rs6000_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind rs6000_frame_unwind =
|
||||
{
|
||||
"rs6000 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
rs6000_frame_this_id,
|
||||
@@ -3806,6 +3807,7 @@ rs6000_epilogue_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind rs6000_epilogue_frame_unwind =
|
||||
{
|
||||
"rs6000 epilogue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
rs6000_epilogue_frame_this_id, rs6000_epilogue_frame_prev_register,
|
||||
|
||||
@@ -630,6 +630,7 @@ rx_exception_sniffer (const struct frame_unwind *self,
|
||||
analyzer. */
|
||||
|
||||
static const struct frame_unwind rx_frame_unwind = {
|
||||
"rx prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
rx_frame_this_id,
|
||||
@@ -642,6 +643,7 @@ static const struct frame_unwind rx_frame_unwind = {
|
||||
analyzer. */
|
||||
|
||||
static const struct frame_unwind rx_exception_unwind = {
|
||||
"rx exception",
|
||||
/* SIGTRAMP_FRAME could be used here, but backtraces are less informative. */
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
|
||||
@@ -467,6 +467,7 @@ s12z_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
/* Data structures for the normal prologue-analysis-based unwinder. */
|
||||
static const struct frame_unwind s12z_frame_unwind = {
|
||||
"s12z prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
s12z_frame_this_id,
|
||||
|
||||
@@ -542,6 +542,7 @@ s390_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
/* S390 sigtramp frame unwinder. */
|
||||
|
||||
static const struct frame_unwind s390_sigtramp_frame_unwind = {
|
||||
"s390 linux sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
s390_sigtramp_frame_this_id,
|
||||
|
||||
@@ -2634,6 +2634,7 @@ s390_frame_prev_register (struct frame_info *this_frame,
|
||||
/* Default S390 frame unwinder. */
|
||||
|
||||
static const struct frame_unwind s390_frame_unwind = {
|
||||
"s390 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
s390_frame_this_id,
|
||||
@@ -2727,6 +2728,7 @@ s390_stub_frame_sniffer (const struct frame_unwind *self,
|
||||
/* S390 stub frame unwinder. */
|
||||
|
||||
static const struct frame_unwind s390_stub_frame_unwind = {
|
||||
"s390 stub",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
s390_stub_frame_this_id,
|
||||
|
||||
@@ -1351,6 +1351,7 @@ score_prologue_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind score_prologue_unwind =
|
||||
{
|
||||
"score prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
score_prologue_this_id,
|
||||
|
||||
@@ -79,6 +79,7 @@ sentinel_frame_prev_arch (struct frame_info *this_frame,
|
||||
|
||||
const struct frame_unwind sentinel_frame_unwind =
|
||||
{
|
||||
"sentinel",
|
||||
SENTINEL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sentinel_frame_this_id,
|
||||
|
||||
@@ -1968,6 +1968,7 @@ sh_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
}
|
||||
|
||||
static const struct frame_unwind sh_frame_unwind = {
|
||||
"sh prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sh_frame_this_id,
|
||||
@@ -2034,6 +2035,7 @@ sh_stub_unwind_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind sh_stub_unwind =
|
||||
{
|
||||
"sh stub",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sh_stub_this_id,
|
||||
|
||||
@@ -251,6 +251,7 @@ sparc32nbsd_sigcontext_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind sparc32nbsd_sigcontext_frame_unwind =
|
||||
{
|
||||
"sparc32 netbsd sigcontext",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc32nbsd_sigcontext_frame_this_id,
|
||||
|
||||
@@ -136,6 +136,7 @@ sparc32obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
}
|
||||
static const struct frame_unwind sparc32obsd_sigtramp_frame_unwind =
|
||||
{
|
||||
"sparc32 openbsd sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc32obsd_sigtramp_frame_this_id,
|
||||
|
||||
@@ -182,6 +182,7 @@ sparc32_sol2_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind sparc32_sol2_sigtramp_frame_unwind =
|
||||
{
|
||||
"sparc32 solaris sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc32_sol2_sigtramp_frame_this_id,
|
||||
|
||||
@@ -1358,6 +1358,7 @@ sparc32_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind sparc32_frame_unwind =
|
||||
{
|
||||
"sparc32 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc32_frame_this_id,
|
||||
|
||||
@@ -199,6 +199,7 @@ sparc64fbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind sparc64fbsd_sigtramp_frame_unwind =
|
||||
{
|
||||
"sparc64 freebsd sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc64fbsd_sigtramp_frame_this_id,
|
||||
|
||||
@@ -225,6 +225,7 @@ sparc64nbsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind sparc64nbsd_sigcontext_frame_unwind =
|
||||
{
|
||||
"sparc64 netbsd sigcontext",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc64nbsd_sigcontext_frame_this_id,
|
||||
|
||||
@@ -222,6 +222,7 @@ sparc64obsd_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind sparc64obsd_frame_unwind =
|
||||
{
|
||||
"sparc64 openbsd sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc64obsd_frame_this_id,
|
||||
@@ -305,6 +306,7 @@ sparc64obsd_trapframe_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind sparc64obsd_trapframe_unwind =
|
||||
{
|
||||
"sparc64 openbsd trap",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc64obsd_trapframe_this_id,
|
||||
|
||||
@@ -185,6 +185,7 @@ sparc64_sol2_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind sparc64_sol2_sigtramp_frame_unwind =
|
||||
{
|
||||
"sparc64 solaris sigtramp",
|
||||
SIGTRAMP_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc64_sol2_sigtramp_frame_this_id,
|
||||
|
||||
@@ -1140,6 +1140,7 @@ sparc64_frame_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
static const struct frame_unwind sparc64_frame_unwind =
|
||||
{
|
||||
"sparc64 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
sparc64_frame_this_id,
|
||||
|
||||
@@ -457,6 +457,7 @@ tic6x_frame_base_address (struct frame_info *this_frame, void **this_cache)
|
||||
|
||||
static const struct frame_unwind tic6x_frame_unwind =
|
||||
{
|
||||
"tic6x prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
tic6x_frame_this_id,
|
||||
@@ -519,6 +520,7 @@ tic6x_stub_unwind_sniffer (const struct frame_unwind *self,
|
||||
|
||||
static const struct frame_unwind tic6x_stub_unwind =
|
||||
{
|
||||
"tic6x stub",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
tic6x_stub_this_id,
|
||||
|
||||
@@ -905,6 +905,7 @@ tilegx_frame_base_address (struct frame_info *this_frame, void **this_cache)
|
||||
}
|
||||
|
||||
static const struct frame_unwind tilegx_frame_unwind = {
|
||||
"tilegx prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
tilegx_frame_this_id,
|
||||
|
||||
@@ -1318,6 +1318,7 @@ v850_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
}
|
||||
|
||||
static const struct frame_unwind v850_frame_unwind = {
|
||||
"v850 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
v850_frame_this_id,
|
||||
|
||||
28
gdb/value.c
28
gdb/value.c
@@ -3955,18 +3955,18 @@ value_fetch_lazy_register (struct value *val)
|
||||
frame = frame_find_by_id (VALUE_FRAME_ID (val));
|
||||
regnum = VALUE_REGNUM (val);
|
||||
gdbarch = get_frame_arch (frame);
|
||||
string_file debug_file;
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ value_fetch_lazy "
|
||||
"(frame=%d,regnum=%d(%s),...) ",
|
||||
fprintf_unfiltered (&debug_file,
|
||||
"(frame=%d, regnum=%d(%s),...) ",
|
||||
frame_relative_level (frame), regnum,
|
||||
user_reg_map_regnum_to_name (gdbarch, regnum));
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog, "->");
|
||||
fprintf_unfiltered (&debug_file, "->");
|
||||
if (value_optimized_out (new_val))
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, " ");
|
||||
val_print_optimized_out (new_val, gdb_stdlog);
|
||||
fprintf_unfiltered (&debug_file, " ");
|
||||
val_print_optimized_out (new_val, &debug_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3974,23 +3974,23 @@ value_fetch_lazy_register (struct value *val)
|
||||
const gdb_byte *buf = value_contents (new_val);
|
||||
|
||||
if (VALUE_LVAL (new_val) == lval_register)
|
||||
fprintf_unfiltered (gdb_stdlog, " register=%d",
|
||||
fprintf_unfiltered (&debug_file, " register=%d",
|
||||
VALUE_REGNUM (new_val));
|
||||
else if (VALUE_LVAL (new_val) == lval_memory)
|
||||
fprintf_unfiltered (gdb_stdlog, " address=%s",
|
||||
fprintf_unfiltered (&debug_file, " address=%s",
|
||||
paddress (gdbarch,
|
||||
value_address (new_val)));
|
||||
else
|
||||
fprintf_unfiltered (gdb_stdlog, " computed");
|
||||
fprintf_unfiltered (&debug_file, " computed");
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog, " bytes=");
|
||||
fprintf_unfiltered (gdb_stdlog, "[");
|
||||
fprintf_unfiltered (&debug_file, " bytes=");
|
||||
fprintf_unfiltered (&debug_file, "[");
|
||||
for (i = 0; i < register_size (gdbarch, regnum); i++)
|
||||
fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
|
||||
fprintf_unfiltered (gdb_stdlog, "]");
|
||||
fprintf_unfiltered (&debug_file, "%02x", buf[i]);
|
||||
fprintf_unfiltered (&debug_file, "]");
|
||||
}
|
||||
|
||||
fprintf_unfiltered (gdb_stdlog, " }\n");
|
||||
frame_debug_printf ("%s", debug_file.c_str ());
|
||||
}
|
||||
|
||||
/* Dispose of the intermediate values. This prevents
|
||||
|
||||
@@ -390,6 +390,7 @@ vax_frame_prev_register (struct frame_info *this_frame,
|
||||
|
||||
static const struct frame_unwind vax_frame_unwind =
|
||||
{
|
||||
"vax prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
vax_frame_this_id,
|
||||
|
||||
@@ -736,6 +736,7 @@ xstormy16_frame_base_address (struct frame_info *this_frame, void **this_cache)
|
||||
}
|
||||
|
||||
static const struct frame_unwind xstormy16_frame_unwind = {
|
||||
"xstormy16 prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
xstormy16_frame_this_id,
|
||||
|
||||
@@ -1499,6 +1499,7 @@ xtensa_frame_prev_register (struct frame_info *this_frame,
|
||||
static const struct frame_unwind
|
||||
xtensa_unwind =
|
||||
{
|
||||
"xtensa prologue",
|
||||
NORMAL_FRAME,
|
||||
default_frame_unwind_stop_reason,
|
||||
xtensa_frame_this_id,
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef COMMON_COMMON_DEBUG_H
|
||||
#define COMMON_COMMON_DEBUG_H
|
||||
|
||||
#include "gdbsupport/preprocessor.h"
|
||||
|
||||
/* Set to true to enable debugging of hardware breakpoint/
|
||||
watchpoint support code. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user