Header files with enums instead of defines?
John-Mark Gurney
gurney_j at resnet.uoregon.edu
Thu Dec 23 11:39:49 PST 2004
Peter Jeremy wrote this message on Wed, Dec 22, 2004 at 20:08 +1100:
> An alternative suggestion for you: Write a gdb macro which takes an
> int and prints it as an errno. Something like a shorthand version of:
> print (enum { EPERM=1, ENOENT=2, ..., EILSEQ=86})xerrno
> should work.
>
> You would probably write a [insert scripting language of choice] script
> to convert <errno.h> into the appropriate gdb macro.
If you have a running program context (in userland), just do:
print (char *)strerror(errnovalue)
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-arch
mailing list