forked from gphilippot/purebasic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbug.h
38 lines (31 loc) · 904 Bytes
/
dbug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MBA_DBUG_H
#define MBA_DBUG_H
/* dbug - resolve symbols and print stack traces w/ x86 GNUC
*/
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef LIBMBA_API
#ifdef WIN32
# ifdef LIBMBA_EXPORTS
# define LIBMBA_API __declspec(dllexport)
# else /* LIBMBA_EXPORTS */
# define LIBMBA_API __declspec(dllimport)
# endif /* LIBMBA_EXPORTS */
#else /* WIN32 */
# define LIBMBA_API extern
#endif /* WIN32 */
#endif /* LIBMBA_API */
LIBMBA_API int dbug_stacktrace(void **buf, int off, int n);
LIBMBA_API unsigned char *dbug_resolve_symbol(void *sym, unsigned char *buf, unsigned char *blim);
LIBMBA_API int dbug_sprint_stacktrace(unsigned char *str,
unsigned char *slim,
void **syms,
int sn,
const unsigned char *msg);
LIBMBA_API int dbug_fprint_stacktrace(FILE *stream, int off, int n, const char *msg);
#ifdef __cplusplus
}
#endif
#endif /* MBA_DBUG_H */