From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25917 invoked by alias); 19 Dec 2010 08:36:28 -0000 Received: (qmail 25909 invoked by uid 22791); 19 Dec 2010 08:36:28 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Dec 2010 08:36:23 +0000 Received: by wwi17 with SMTP id 17so1902442wwi.12 for ; Sun, 19 Dec 2010 00:36:21 -0800 (PST) Received: by 10.216.205.213 with SMTP id j63mr5908747weo.60.1292747779387; Sun, 19 Dec 2010 00:36:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.182.206 with HTTP; Sun, 19 Dec 2010 00:35:59 -0800 (PST) From: Hui Zhu Date: Sun, 19 Dec 2010 08:36:00 -0000 Message-ID: Subject: [RFA/RFC] mips tracepoint: fix Bug 12013 To: gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-12/txt/msg00355.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12013 This bug make mips tracepoint cannot trace the backtrace. This patch to fix this issue with a directly way just remove the decline of access to the raw register names. If you think it's not OK. What about add a new interface to gdbarch to access to the raw register names. Thanks, Hui 2010-12-19 Hui Zhu * mips-tdep.c (mips_register_name): Remove the check. (mips_print_registers_info): Remove the gdb_assert. --- mips-tdep.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/mips-tdep.c +++ b/mips-tdep.c @@ -453,11 +453,8 @@ mips_register_name (struct gdbarch *gdba enum mips_abi abi = mips_abi (gdbarch); - /* Map [gdbarch_num_regs .. 2*gdbarch_num_regs) onto the raw registers, - but then don't make the raw register names visible. */ + /* Map [gdbarch_num_regs .. 2*gdbarch_num_regs) onto the raw registers. */ int rawnum = regno % gdbarch_num_regs (gdbarch); - if (regno < gdbarch_num_regs (gdbarch)) - return ""; /* The MIPS integer registers are always mapped from 0 to 31. The names of the registers (which reflects the conventions regarding @@ -4774,7 +4771,6 @@ mips_print_registers_info (struct gdbarc { if (regnum != -1) /* do one specified register */ { - gdb_assert (regnum >= gdbarch_num_regs (gdbarch)); if (*(gdbarch_register_name (gdbarch, regnum)) == '\0') error (_("Not a valid register for the current processor type"));