0d9e3da8bb
While it doesn't matter on Windows, mingw on case-sensitive OSes uses all lower case filenames for platform include files. I found the problem in SkCondVar.h from Mozilla checkout of skia sources, but the patch contains a fix for the whole skia tree. R=bungeman@google.com Review URL: https://codereview.chromium.org/99173003 git-svn-id: http://skia.googlecode.com/svn/trunk@12461 2bbb7eff-a529-9590-31e7-b0007b416f81
51 lines
1.0 KiB
C++
51 lines
1.0 KiB
C++
#ifndef __LIGHT_SYMBOLS__
|
|
#define __LIGHT_SYMBOLS__
|
|
#define LS_TRACE(functionName,fileId,lineNumber) LightSymbol __lstr(functionName,fileId,lineNumber);
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
|
|
//#include <pthread.h>
|
|
#include <windows.h>
|
|
|
|
typedef char* SZ;
|
|
|
|
#define LIGHT_SYMBOLS_FILE "LIGHT_SYMBOLS_FILE"
|
|
|
|
class LightSymbol {
|
|
const char* sym;
|
|
int fileId;
|
|
int lineNumber;
|
|
|
|
LightSymbol* parentFrame;
|
|
|
|
typedef LightSymbol* PLightSymbol;
|
|
|
|
static PLightSymbol lsFrames[1000];
|
|
static HANDLE handleFrames[1000];
|
|
static SZ* fileNames;
|
|
static bool busted;
|
|
|
|
public:
|
|
LightSymbol(const char* sym, int fileId, int lineNumber);
|
|
|
|
~LightSymbol();
|
|
|
|
static bool GetCallStack(char* sz, int len, const char* separator);
|
|
|
|
private:
|
|
|
|
static LightSymbol** getThreadFrameContainer();
|
|
|
|
bool GetCallStackCore(char* sz, int len, const char* separator) const ;
|
|
|
|
static LightSymbol* GetCurrentFrame() ;
|
|
|
|
static void SetCurrentFrame(LightSymbol* ls) ;
|
|
|
|
static const char* trim(char* sz) ;
|
|
};
|
|
|
|
#endif
|