mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 20:53:52 +00:00
Cygwin support for callstack tracing.
This commit is contained in:
parent
288744273b
commit
4be2543b2f
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#ifdef TRACY_HAS_CALLSTACK
|
#ifdef TRACY_HAS_CALLSTACK
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
# ifndef MAXLONG
|
# ifndef MAXLONG
|
||||||
enum { SYMOPT_LOAD_LINES = 0x00000010 };
|
enum { SYMOPT_LOAD_LINES = 0x00000010 };
|
||||||
typedef struct _SYMBOL_INFO
|
typedef struct _SYMBOL_INFO
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#ifndef __TRACYCALLSTACK_HPP__
|
#ifndef __TRACYCALLSTACK_HPP__
|
||||||
#define __TRACYCALLSTACK_HPP__
|
#define __TRACYCALLSTACK_HPP__
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
# define TRACY_HAS_CALLSTACK
|
# define TRACY_HAS_CALLSTACK
|
||||||
# ifndef MAXLONG
|
# ifndef MAXLONG
|
||||||
|
# ifdef __CYGWIN__
|
||||||
|
extern "C" __declspec(dllimport) unsigned short __stdcall RtlCaptureStackBackTrace( unsigned int, unsigned int, void**, unsigned int* );
|
||||||
|
# else
|
||||||
extern "C" __declspec(dllimport) unsigned short __stdcall RtlCaptureStackBackTrace( unsigned long, unsigned long, void**, unsigned long* );
|
extern "C" __declspec(dllimport) unsigned short __stdcall RtlCaptureStackBackTrace( unsigned long, unsigned long, void**, unsigned long* );
|
||||||
# endif
|
# endif
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TRACY_HAS_CALLSTACK
|
#ifdef TRACY_HAS_CALLSTACK
|
||||||
@ -27,7 +31,7 @@ struct CallstackEntry
|
|||||||
uint32_t line;
|
uint32_t line;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
|
|
||||||
void InitCallstack();
|
void InitCallstack();
|
||||||
CallstackEntry DecodeCallstackPtr( uint64_t ptr );
|
CallstackEntry DecodeCallstackPtr( uint64_t ptr );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user