From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19595 invoked by alias); 30 Mar 2003 01:12:01 -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 19588 invoked from network); 30 Mar 2003 01:12:01 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 30 Mar 2003 01:12:01 -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 TAA12021; Sat, 29 Mar 2003 19:56:56 -0500 Received: from dash ([192.168.20.26]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id UAA23682; Sat, 29 Mar 2003 20:11:59 -0500 Message-ID: <000901c2f65a$1c8430b0$2a00a8c0@dash> From: "Kris Warkentin" To: "Andrew Cagney" Cc: "Daniel Jacobowitz" , References: <003101c2f241$078b7050$0202040a@catdog> <20030324203652.GA27939@nevyn.them.org> <019c01c2f3e2$a0e02dc0$0202040a@catdog> <3E8228B6.2030007@redhat.com> Subject: Re: problem with exec-file when targetting remote machine Date: Sun, 30 Mar 2003 01:12: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: 2003-03/txt/msg00403.txt.bz2 > Assume the code was originally added because of a bug :-) I'm guessing > something like: > > (gdb) file executable > (gdb) disassemble main > > will break. It will select the wrong disassembler. Why isn't the > executable being recognized, and why do the defaults fail? (NickC > pointed me at an endian problem recently). In case anyone is curious as to what the problem was, here it is. I was suspicious about the $pc being incorrect even though it hit the breakpoint at main. I stepped into our register stuffing code and observed that everything was fine. As soon as I continued and checked the registers, they were changed but only from $r15 onward (this is an sh4 target). I set a watchpoint and it turns out that our floating point stuffing routine was calculating the offset incorrectly and clobbering some of the gp registers. The reason it was only happening with exec-file is that the default sh arch wasn't retrieving fpregs and when it got a slightly different arch based on the bfd, it would start asking for them and they'd get clobbered. Cheers, Kris