From: "Kris Warkentin" <kewarken@qnx.com>
To: <gdb@sources.redhat.com>
Subject: debugging sh4 in mi mode
Date: Fri, 08 Nov 2002 08:55:00 -0000 [thread overview]
Message-ID: <061701c28747$9ad7d8e0$0202040a@catdog> (raw)
We were having a problem when debugging sh4 in mi mode with the
"-data-disassemble" command. It seems that mi_cmd_disassemble() uses the
function pointer tm_print_insn which, for sh, was NULL. I looked at some
other arches and they seem to set tm_print_insn in their
_initialize_<arch>_tdep() in <arch>-tdep.c so that is what I did to solve
our problem. Is this the proper way to do it?
cheers,
Kris
Index: sh-tdep.c
===================================================================
RCS file: /product/tools/gdb/gdb/sh-tdep.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -c -r1.8 -r1.9
*** sh-tdep.c 17 Sep 2002 18:31:22 -0000 1.8
--- sh-tdep.c 8 Nov 2002 16:33:39 -0000 1.9
***************
*** 2207,2211 ****
--- 2207,2214 ----
register_gdbarch_init (bfd_arch_sh, sh_gdbarch_init);
+ if(!tm_print_insn)
+ tm_print_insn = gdb_print_insn_sh;
+
add_com ("regs", class_vars, sh_show_regs_command, "Print all
registers");
}
next reply other threads:[~2002-11-08 16:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-08 8:55 Kris Warkentin [this message]
2002-11-08 9:20 ` Elena Zannoni
2002-11-08 9:31 ` Kris Warkentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='061701c28747$9ad7d8e0$0202040a@catdog' \
--to=kewarken@qnx.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox