提交 373865a3 编写于 作者: wafwerar's avatar wafwerar

[TD-13758]<fix>: add memory option.

上级 6baa845d
...@@ -33,6 +33,7 @@ typedef struct TdMemoryInfo ...@@ -33,6 +33,7 @@ typedef struct TdMemoryInfo
#else #else
#include<execinfo.h> #include<execinfo.h>
#define STACKCALL __attribute__((regparm(1), noinline)) #define STACKCALL __attribute__((regparm(1), noinline))
void **STACKCALL taosGetEbp(void) { void **STACKCALL taosGetEbp(void) {
void **ebp = NULL; void **ebp = NULL;
...@@ -42,6 +43,7 @@ void **STACKCALL taosGetEbp(void) { ...@@ -42,6 +43,7 @@ void **STACKCALL taosGetEbp(void) {
: "memory"); /* not affect register */ : "memory"); /* not affect register */
return (void **)(*ebp); return (void **)(*ebp);
} }
int32_t taosBackTrace(void **buffer, int32_t size) { int32_t taosBackTrace(void **buffer, int32_t size) {
int32_t frame = 0; int32_t frame = 0;
void **ebp; void **ebp;
...@@ -60,6 +62,7 @@ int32_t taosBackTrace(void **buffer, int32_t size) { ...@@ -60,6 +62,7 @@ int32_t taosBackTrace(void **buffer, int32_t size) {
} }
return frame; return frame;
} }
#endif #endif
// char **taosBackTraceSymbols(int32_t *size) { // char **taosBackTraceSymbols(int32_t *size) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册