Skip to content

Commit

Permalink
gdb/xtensa: implement xtensa_dump_tdep
Browse files Browse the repository at this point in the history
xtensa_dump_tdep is useful for debugging issues related to register
mapping.
  • Loading branch information
igrr committed Jul 19, 2021
1 parent 2e523bc commit f0ed11c
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion gdb/xtensa-tdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -3262,7 +3262,52 @@ xtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
static void
xtensa_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
{
error (_("xtensa_dump_tdep(): not implemented"));
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (tdep != NULL)
{
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->num_regs = %d\n",
tdep->num_regs);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->num_nopriv_regs = %d\n",
tdep->num_nopriv_regs);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->num_pseudo_regs = %d\n",
tdep->num_pseudo_regs);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->ar_base = %d\n",
tdep->ar_base);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->a0_base = %d\n",
tdep->a0_base);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->wb_regnum = %d\n",
tdep->wb_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->ws_regnum = %d\n",
tdep->ws_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->pc_regnum = %d\n",
tdep->pc_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->ps_regnum = %d\n",
tdep->ps_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->lbeg_regnum = %d\n",
tdep->lbeg_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->lend_regnum = %d\n",
tdep->lend_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->lcount_regnum = %d\n",
tdep->lcount_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->sar_regnum = %d\n",
tdep->sar_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->litbase_regnum = %d\n",
tdep->litbase_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->threadptr_regnum = %d\n",
tdep->threadptr_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->interrupt_regnum = %d\n",
tdep->interrupt_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->interrupt2_regnum = %d\n",
tdep->interrupt2_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->cpenable_regnum = %d\n",
tdep->cpenable_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->debugcause_regnum = %d\n",
tdep->debugcause_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->exccause_regnum = %d\n",
tdep->exccause_regnum);
fprintf_unfiltered (file, "xtensa_dump_tdep: tdep->excvaddr_regnum = %d\n",
tdep->excvaddr_regnum);
}
}

void
Expand Down

0 comments on commit f0ed11c

Please sign in to comment.