pstrace: initial commit

This commit is contained in:
2020-01-04 14:28:08 +04:00
parent 82c73720b1
commit 1f3a6237ac
13 changed files with 1391 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
/*
* sysutils.h
*
* Created on: Dec 28, 2019
* Author: nnosov
*/
#ifndef SC_SYSUTILS_H_
#define SC_SYSUTILS_H_
//system
#include <string>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <ucontext.h>
using std::string;
// stack trace string buffer
extern char __stack_trace[8192];
// libdw-based trace call stack implementation
const char* LibdwTraceCallStack(ucontext_t* uctx);
char* GetExecutableName(char* path, uint32_t size);
#endif /* SC_SYSUTILS_H_ */