From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31569 invoked by alias); 17 May 2005 01:07:29 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 31106 invoked from network); 17 May 2005 01:07:20 -0000 Received: from unknown (HELO steven) (202.80.36.173) by sourceware.org with SMTP; 17 May 2005 01:07:20 -0000 Received: from sakuraindustries.com (localhost [127.0.0.1]) by steven (Postfix) with ESMTP id 163991294DD; Tue, 17 May 2005 12:10:39 -1100 (GMT+11) Message-ID: <428A79EE.4080307@sakuraindustries.com> Date: Tue, 17 May 2005 01:07:00 -0000 From: Steven Johnson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040115 MIME-Version: 1.0 To: Keith Seitz Cc: "insight@sources.redhat.com" Subject: Re: Problem with "file" command from CVS_HEAD References: <42896CAD.60504@sakuraindustries.com> <4289CFD6.6040306@sakuraindustries.com> <1116286740.4493.9.camel@lindt.uglyboxes.com> In-Reply-To: <1116286740.4493.9.camel@lindt.uglyboxes.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-q2/txt/msg00071.txt.bz2 Keith Seitz wrote: >On Tue, 2005-05-17 at 00:04 -1100, Accounts wrote: > > > >>I Believe this is the correct thing to do. >> >> > >Hmm. I'm not so sure... So what happens if you're not running and you >type something like "tk gdb_loc main". Does it return something useful? > > > Yes, i was re-considering this problem this morning. >The problem is, of course, that there is no specific way to pass an >error like this to the UI (the error is really an ignorable one in this >case). We don't want invocations of gdb_loc to fail because we don't >have a running target. I guess we could always pass some sort of fixed >constant string (like "NOT_RUNNING" or something) instead of the PC >value to indicate no registers or not running... > > The thought occured, that in the case of a non-running target, maybe the best reply to gdb_loc for a $PC is the value of the entry point for the program in question. Its at least a sane default, and is not generating an error. the code would then do something like the case where objc=2, but for the fixed address of entry point. >I guess an easier way to see whether your patch works: Does the function >browser work before you are running? Or you could simply type in the >name of a file or function in the combo boxes in the tool bar. > > Well thats the killer, at the moment I am having problems with the function browser, and i dont know if its my patch or not. The reason is, I cant test the function browser before i do the "file" command, because i have no functions to browse. And when i do execute "file" i segfault, without my patch. So its not possible for me to test it. But i was thinking if i return the address of the entry_point as $pc in this case for gdb_loc that at least that might be a more sensible answer. Now all i need to do to test it is work out how to get the address of the entry_point :) another alternative is the address of "main" but an embedded program may not have a "main" as there is no real requirement in an embedded system to have a function with this name. Also, it occured that i should include in the patch a patch of the Changelog. Thats the correct protocol is it not. Steven Johnson