Re: Header files with enums instead of defines?

From: John-Mark Gurney (gurney_j_at_resnet.uoregon.edu)
Date: 12/23/04

  • Next message: Julian Elischer: "Re: FreeBSD's Visual Identity: Outdated?"
    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"
    

  • Next message: Julian Elischer: "Re: FreeBSD's Visual Identity: Outdated?"

    Relevant Pages