"No registers" or "No inferior to debug"?

Andrew Cagney ac131313@redhat.com
Tue Oct 21 19:56:00 GMT 2003


> Date: Tue, 21 Oct 2003 11:26:32 -0400
>> From: Andrew Cagney <ac131313@redhat.com>
> 
>> > 
>> >    (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




More information about the Gdb mailing list