const fix

This commit is contained in:
Glenn Maynard
2004-03-19 06:25:45 +00:00
parent 4d4493c449
commit 01acd9442c
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -193,7 +193,7 @@ void InitializeBacktrace()
}
/* backtrace() for x86 Linux, tested with kernel 2.4.18, glibc 2.3.1. */
static void do_backtrace( const void **buf, size_t size, BacktraceContext *ctx )
static void do_backtrace( const void **buf, size_t size, const BacktraceContext *ctx )
{
/* Read /proc/pid/maps to find the address range of the stack. */
const void *readable_begin[1024], *readable_end[1024];
@@ -244,7 +244,7 @@ static void do_backtrace( const void **buf, size_t size, BacktraceContext *ctx )
buf[i] = NULL;
}
void GetBacktrace( const void **buf, size_t size, BacktraceContext *ctx )
void GetBacktrace( const void **buf, size_t size, const BacktraceContext *ctx )
{
InitializeBacktrace();
@@ -263,7 +263,7 @@ void GetBacktrace( const void **buf, size_t size, BacktraceContext *ctx )
void InitializeBacktrace() { }
void GetBacktrace( const void **buf, size_t size, BacktraceContext *ctx )
void GetBacktrace( const void **buf, size_t size, const BacktraceContext *ctx )
{
InitializeBacktrace();
@@ -291,7 +291,7 @@ typedef struct Frame {
void InitializeBacktrace() { }
void GetBacktrace( const void **buf, size_t size, BacktraceContext *ctx )
void GetBacktrace( const void **buf, size_t size, const BacktraceContext *ctx )
{
FramePtr frame = FramePtr(GetCrashedFramePtr());
unsigned i;
@@ -306,7 +306,7 @@ void GetBacktrace( const void **buf, size_t size, BacktraceContext *ctx )
#warning Undefined BACKTRACE_METHOD_*
void InitializeBacktrace() { }
void GetBacktrace( const void **buf, size_t size, BacktraceContext *ctx )
void GetBacktrace( const void **buf, size_t size, const BacktraceContext *ctx )
{
buf[0] = BACKTRACE_METHOD_NOT_AVAILABLE;
buf[1] = NULL;
+1 -1
View File
@@ -21,7 +21,7 @@ void InitializeBacktrace();
* null-terminated. If ctx is NULL, retrieve the current backtrace; otherwise
* retrieve a backtrace for the given context. (Not all backtracers may
* support contexts.) */
void GetBacktrace( const void **buf, size_t size, BacktraceContext *ctx = NULL );
void GetBacktrace( const void **buf, size_t size, const BacktraceContext *ctx = NULL );
/* Set up a BacktraceContext to get a backtrace for a thread. ThreadID may
* be the current thread. */