~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/stacktrace.h

* Renames Ha_trx_info to drizzled::ResourceContext
* Renames Sesssion_TRANS to drizzled::TransactionContext
* Replaces homegrown linked-lists of Ha_trx_info pointers
  with vector<drizzled::ResourceContext> operations
* Renames Session::getEngineInfo() to Session::getResourceContext()

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include <string.h>
24
24
 
25
 
#ifdef TARGET_OS_LINUX
26
 
#if defined(HAVE_STACKTRACE) || (defined (__x86_64__) || defined (__i386__) )
27
 
extern char* __bss_start;
28
 
#endif
29
 
#endif
30
 
 
31
 
namespace drizzled
32
 
{
 
25
#ifdef __cplusplus
 
26
extern "C" {
 
27
#endif
33
28
 
34
29
#if defined(HAVE_BACKTRACE) && HAVE_BACKTRACE_SYMBOLS && HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE
35
30
#define BACKTRACE_DEMANGLE 1
36
31
#endif
37
32
 
38
33
#if defined(BACKTRACE_DEMANGLE)
39
 
extern "C" char *my_demangle(const char *mangled_name, int *status);
 
34
  char *my_demangle(const char *mangled_name, int *status);
40
35
#endif
41
36
 
42
37
#ifdef TARGET_OS_LINUX
44
39
#undef HAVE_STACKTRACE
45
40
#define HAVE_STACKTRACE
46
41
 
47
 
extern char* heap_start;
 
42
  extern char* __bss_start;
 
43
  extern char* heap_start;
48
44
 
49
45
#define init_stacktrace() do {                                 \
50
46
    heap_start = (char*) &__bss_start; \
51
47
  } while(0);
52
 
void check_thread_lib(void);
 
48
  void check_thread_lib(void);
53
49
#endif /* defined (__i386__) */
54
50
#endif /* defined HAVE_OS_LINUX */
55
51
 
56
52
#ifdef HAVE_STACKTRACE
57
 
void print_stacktrace(unsigned char* stack_bottom, size_t thread_stack);
58
 
void safe_print_str(const char* name, const char* val, int max_len);
 
53
  void print_stacktrace(unsigned char* stack_bottom, size_t thread_stack);
 
54
  void safe_print_str(const char* name, const char* val, int max_len);
59
55
#else
60
56
/* Define empty prototypes for functions that are not implemented */
61
57
#define init_stacktrace() {}
64
60
#endif /* HAVE_STACKTRACE */
65
61
 
66
62
 
67
 
void write_core(int sig);
 
63
  void write_core(int sig);
68
64
 
69
 
} /* namespace drizzled */
 
65
#ifdef  __cplusplus
 
66
}
 
67
#endif
70
68
 
71
69
#endif /* DRIZZLED_STACKTRACE_H */