From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24187 invoked by alias); 8 Nov 2002 16:55:23 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 24179 invoked from network); 8 Nov 2002 16:55:20 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 8 Nov 2002 16:55:20 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id LAA04488 for ; Fri, 8 Nov 2002 11:52:21 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id LAA14772 for ; Fri, 8 Nov 2002 11:45:00 -0500 Message-ID: <061701c28747$9ad7d8e0$0202040a@catdog> From: "Kris Warkentin" To: Subject: debugging sh4 in mi mode Date: Fri, 08 Nov 2002 08:55:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2002-11/txt/msg00084.txt.bz2 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__tdep() in -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"); }