This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]