From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10264 invoked by alias); 29 Aug 2002 05:51:08 -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 10254 invoked from network); 29 Aug 2002 05:51:07 -0000 Received: from unknown (HELO redhat.com) (66.30.22.225) by sources.redhat.com with SMTP; 29 Aug 2002 05:51:07 -0000 Received: by redhat.com (Postfix, from userid 201) id D75451B887; Thu, 29 Aug 2002 01:51:03 -0400 (EDT) Date: Wed, 28 Aug 2002 22:51:00 -0000 From: Christopher Faylor To: gdb@sources.redhat.com Subject: SEGV on display /i $pc with i386 target Message-ID: <20020829055103.GA26149@redhat.com> Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23.1i X-SW-Source: 2002-08/txt/msg00391.txt.bz2 I just noticed a SEGV whenever I do a 'display /i $pc' on cygwin. I tried building a gdb for linux to see what was going wrong on cygwin but it isn't much better: (top-gdb) display /i $pc 1: x/i $(null) 0x8072f42 : push $0x6 The problem comes from the fact that, while gdb understands that $pc == $eip, it doesn't seem to know how to rename $pc to $eip when it is outputting the register name. You can get the same behavior by doing something like 'display /i $ps', too (even if that doesn't make sense it shouldn't SEGV). The simplest way to fix this is to extend the i386_register_names array to include builtin register names, however, maybe the right way to fix this is to add something to builtin-reg.c. I noticed that i386_register_names seems to have 41 elements while the sum of NUM_REGS + NUM_PSEUDO_REGS == 40. Is that intentional? cgf