Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!texsun!convex!mozart!csmith From: csmith@mozart.uucp (Chris Smith) Newsgroups: gnu.gdb.bug Subject: a bug, a feature Message-ID: <1650@convex.UUCP> Date: 1 Sep 89 13:57:01 GMT Sender: usenet@convex.UUCP Reply-To: csmith@convex.com Lines: 40 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 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.");