From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28338 invoked by alias); 22 May 2007 15:24:53 -0000 Received: (qmail 28325 invoked by uid 22791); 22 May 2007 15:24:52 -0000 X-Spam-Check-By: sourceware.org Received: from mms1.broadcom.com (HELO mms1.broadcom.com) (216.31.210.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 May 2007 15:24:48 +0000 Received: from [10.10.64.154] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.1)); Tue, 22 May 2007 08:24:37 -0700 X-Server-Uuid: 6B5CFB92-F616-4477-B110-55F967A57302 Received: by mail-irva-10.broadcom.com (Postfix, from userid 47) id 68EC62AF; Tue, 22 May 2007 08:24:37 -0700 (PDT) Received: from mail-irva-8.broadcom.com (mail-irva-8 [10.10.64.221]) by mail-irva-10.broadcom.com (Postfix) with ESMTP id 55D732AE for ; Tue, 22 May 2007 08:24:37 -0700 (PDT) Received: from mail-irva-12.broadcom.com (mail-irva-12.broadcom.com [10.10.64.146]) by mail-irva-8.broadcom.com (MOS 3.7.5a-GA) with ESMTP id FHV58572; Tue, 22 May 2007 08:24:37 -0700 (PDT) Received: from NT-IRVA-0752.brcm.ad.broadcom.com ( nt-irva-0752.brcm.ad.broadcom.com [10.8.194.67]) by mail-irva-12.broadcom.com (Postfix) with ESMTP id EBC9369CA3 for ; Tue, 22 May 2007 08:24:36 -0700 (PDT) Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: Info reg sp Date: Tue, 22 May 2007 15:24:00 -0000 Message-ID: From: "Robert Norton" To: gdb@sourceware.org X-WSS-ID: 6A4DD4BF37032658015-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00106.txt.bz2 Hi, =20 I'm porting GDB 6.6 to our target and one of my users reported a problem with the command 'info reg sp'. Having done some digging it seems the following code in infcmd.c is causing me problems: int regnum =3D frame_map_name_to_regnum (deprecated_selected_frame, start, end - start); if (regnum >=3D 0) { gdbarch_print_registers_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, regnum, fpregs); continue; } The problem is that frame_map_name_to_regnum returns a value greater than NUM_REGS+NUM_PSEUDO_REGS because there is a builtin user reg by that name which is returned by user_reg_map_name_to_regnum. The question is: should my print_registers_info be able to handle this (if so how? I suppose by calling value_of_user_reg) or is this code broken? Many thanks, Robert Norton