Re: Header files with enums instead of defines?
From: John-Mark Gurney (gurney_j_at_resnet.uoregon.edu)
Date: 12/23/04
- Previous message: Bakul Shah: "Re: FreeBSD's Visual Identity: Outdated?"
- In reply to: Peter Jeremy: "Re: Header files with enums instead of defines?"
- Next in thread: Poul-Henning Kamp: "Re: Header files with enums instead of defines?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Dec 2004 11:39:38 -0800 To: Peter Jeremy <PeterJeremy@optushome.com.au>
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."
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Bakul Shah: "Re: FreeBSD's Visual Identity: Outdated?"
- In reply to: Peter Jeremy: "Re: Header files with enums instead of defines?"
- Next in thread: Poul-Henning Kamp: "Re: Header files with enums instead of defines?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|