From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15680 invoked by alias); 21 Oct 2003 19:56:42 -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 15673 invoked from network); 21 Oct 2003 19:56:41 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 21 Oct 2003 19:56:41 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C84932B89; Tue, 21 Oct 2003 15:56:39 -0400 (EDT) Message-ID: <3F958F77.5020906@redhat.com> Date: Tue, 21 Oct 2003 19:56:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eli Zaretskii Cc: Andrew Cagney , mec@shout.net, gdb@sources.redhat.com Subject: Re: "No registers" or "No inferior to debug"? References: <200310202156.h9KLuRKV001659@duracef.shout.net> <3F94640A.4010807@redhat.com> <7494-Tue21Oct2003074534+0200-eliz@elta.co.il> <3F955028.1000706@redhat.com> <2914-Tue21Oct2003205035+0200-eliz@elta.co.il> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00245.txt.bz2 > Date: Tue, 21 Oct 2003 11:26:32 -0400 >> From: Andrew Cagney > >> > >> > (gdb) info registers >> > No program or core file to debug, so no registers. > >> >> The point at which the error is detected and thrown is a long way from >> "info registers" so customizing it to mention ", so no registers" will >> be painful. > > > Is it possible to add "No registers." on a separate line after the > thread of execution comes back to "info registers"? That would > produce > (gdb) info registers > No program or core file to debug. > No registers. The error throws gdb out of the info registers function, so no, not without other changes. Having seen michael's comments, I also suspect that "No registers" isn't that helpful. I'd expect a user to fix this problem by looking for a program or core file, and not by looking for registers :-) Anyway, for the immediate problem at hand ("return" and return_command), I tweaked toe code so that it directly checked that there was a target before doing anything and then issued the existing response. Andrew