Thread View: gnu.gdb.bug
1 messages
1 total messages
Started by Chris Smith
Fri, 01 Sep 1989 13:57
a bug, a feature
Author: Chris Smith
Date: Fri, 01 Sep 1989 13:57
Date: Fri, 01 Sep 1989 13:57
40 lines
1287 bytes
1287 bytes
A bug: the "set" command decides that it is looking at a subcommand
when it is actually looking at an expression in cases like this:
set args_print ()
set environment_doohickey()
----
A feature: it would be handy to have a command to look up the error
message for an errno value.
Here is code for the command
info errno
or info errno <expression>
static void
errno_info (arg, from_tty)
char *arg;
int from_tty;
{
int err;
extern int sys_nerr;
extern char *sys_errlist[];
if (arg)
err = parse_and_eval_address (arg);
else
err = parse_and_eval_address ("errno");
printf_filtered ("errno %d: %s\n", err,
err < sys_nerr ? sys_errlist[err] : "unknown error");
}
[...]
add_info ("errno", errno_info,
"Display the system error message for errno, the error code returned by\n\
the last failing system call. With an argument, display the message for\n\
that value of errno.");
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads