From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6096 invoked by alias); 27 Feb 2011 19:44:55 -0000 Received: (qmail 6083 invoked by uid 22791); 27 Feb 2011 19:44:53 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,TW_EG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 27 Feb 2011 19:44:46 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PtmXp-00051l-BS for insight@sources.redhat.com; Sun, 27 Feb 2011 20:44:41 +0100 Received: from 24-158-184-117.dhcp.jcsn.tn.charter.com ([24.158.184.117]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Feb 2011 20:44:41 +0100 Received: from gds by 24-158-184-117.dhcp.jcsn.tn.charter.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Feb 2011 20:44:41 +0100 To: insight@sources.redhat.com From: Gene Smith Subject: Re: Insight (probably gdb) crashes on thumb-2 startup assembly code Date: Sun, 27 Feb 2011 19:44:00 -0000 Message-ID: References: <4D694D0B.40802@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 In-Reply-To: <4D694D0B.40802@redhat.com> X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2011-q1/txt/msg00015.txt.bz2 Keith Seitz wrote, On 02/26/2011 01:57 PM: > Hi, Gene, > > On 02/25/2011 11:39 PM, Gene Smith wrote: >> ../../insight_sources/gdb/regcache.c:182: internal-error: register_size: >> Assertion `regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) + >> gdbarch_num_pseudo_regs (gdbarch))' failed. >> A problem internal to GDB has been detected, >> further debugging may prove unreliable. >> Quit this debugging session? (y or n) > > When you are doing this, do you have ANY windows open (esp the register > window -- there is some bitrot in there that I have to address)? Does it with and without the reg window open. > > If you don't have any other windows open (just console & source), then I > recommend trying to reproduce with gdb. > > Run "[arm-*-]insight -nw" and try it again. If the internal error pops > up again, it is, as you suspected, a gdb problem. Grab the backtrace > from the coredump and either file a bug in gdb's bugzilla or ask on the > gdb@ list. I ran the arm-*-gdb program that is installed when I built insight and it also has the problem. Haven't tried the insight -nw since I assume it is basically the same. I was able to "fix" the problem in regcache.c function register_size() by commenting out the assert and always setting size to 4 (size of all non-fp arm registers). Strangely enough, when I do this the previously asserted condition (now signaled by printf) hasn't occurred. int register_size (struct gdbarch *gdbarch, int regnum) { struct regcache_descr *descr = regcache_descr (gdbarch); int size; #if 0 /* original code */ gdb_assert (regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch))); size = descr->sizeof_register[regnum]; #else /* my "fix" */ if ( !(regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch))) ) { printf("Was assert bad regnum = %d\n", regnum); } size = 4; /* definitely arm specific !! */ #endif return size; } Also, I just did "cvs update" to the latest insight snapshot. Now insight immediately crashes (I see console window appear and then disappear when I connect to my remote target, no core file produced). But when I run the latest insight snapshot's gdb there is no crash but the same assert occurs when I step through startup assembly code. -gene