mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 18:57:01 +08:00
libctf: error handling
CTF functions return zero on success or an extended errno value which can be translated into a string via the functions in this commit. The errno numbers start at -CTF_BASE. libctf/ * ctf-error.c: New file. include/ * ctf-api.h (ctf_errno): New declaration. (ctf_errmsg): Likewise.
This commit is contained in:
@ -122,6 +122,8 @@ enum
|
||||
#define CTF_ADD_NONROOT 0 /* Type only visible in nested scope. */
|
||||
#define CTF_ADD_ROOT 1 /* Type visible at top-level scope. */
|
||||
|
||||
extern int ctf_errno (ctf_file_t *);
|
||||
extern const char *ctf_errmsg (int);
|
||||
|
||||
extern void ctf_setdebug (int debug);
|
||||
extern int ctf_getdebug (void);
|
||||
|
Reference in New Issue
Block a user