From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17090 invoked by alias); 26 Mar 2003 21:56:54 -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 17083 invoked from network); 26 Mar 2003 21:56:54 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 26 Mar 2003 21:56:54 -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 QAA30351; Wed, 26 Mar 2003 16:42:06 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id QAA21160; Wed, 26 Mar 2003 16:56:53 -0500 Message-ID: <019c01c2f3e2$a0e02dc0$0202040a@catdog> From: "Kris Warkentin" To: "Daniel Jacobowitz" Cc: References: <003101c2f241$078b7050$0202040a@catdog> <20030324203652.GA27939@nevyn.them.org> Subject: Re: problem with exec-file when targetting remote machine Date: Wed, 26 Mar 2003 21:56: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/msg00363.txt.bz2 > > Can anyone give me an idea as to what gdb might be doing differently when > > exec-file has been set? > > This means shared library handling is messed up, I bet. It only > triggers based on exec_bfd. > > Probably the app is being relocated in memory by the shared library > code, and ending up wrong. I think I maybe misled you in the beginning with this. I had been told that it affected all targets but it seems that it affects sh4 but not x86. I don't know about our other platforms. By brute force and stupidity I determined that in exec.c:exec_file_attach() there is a call to set_gdbarch_from_file(). This is what causes the screw up. It looks like something is getting buggered up in there, possibly because the architecture is not getting recognized properly from the file and the defaults aren't working. Can anyone tell me the possible ramifications of commenting out this line? I wouldn't normally contemplate this kind of fix but I have only a short while to get this in a patch. In my preliminary tests, everything seems to work but I'm worried that there might be other consequences. cheers, Kris