Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Commit

Permalink
Rename class GDCBackTrace to UnwindBacktrace
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Aug 22, 2015
1 parent 5b32a80 commit 8a704ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions libphobos/libdruntime/core/runtime.d
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ Throwable.TraceInfo defaultTraceHandler( void* ptr = null )
auto s = new StackTrace(FIRSTFRAME, cast(CONTEXT*)ptr);
return s;
}
else static if( __traits( compiles, new GDCBacktrace(0) ) )
else static if( __traits( compiles, new UnwindBacktrace(0) ) )
{
version(Posix)
{
Expand All @@ -726,7 +726,7 @@ Throwable.TraceInfo defaultTraceHandler( void* ptr = null )
{
static enum FIRSTFRAME = 0;
}
return new GDCBacktrace(FIRSTFRAME);
return new UnwindBacktrace(FIRSTFRAME);
}
else
{
Expand Down
18 changes: 9 additions & 9 deletions libphobos/libdruntime/gcc/backtrace.d
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,13 @@ else
* everywhere where this code works. We keep it anyway till libbacktrace
* is well-tested.
*/
public class GDCBacktrace : Throwable.TraceInfo
public class UnwindBacktrace : Throwable.TraceInfo
{
this(int firstFrame = FIRSTFRAME)
{
_firstFrame = firstFrame;
_callstack = gdcBacktrace();
_framelist = gdcBacktraceSymbols(_callstack);
_callstack = getBacktrace();
_framelist = getBacktraceSymbols(_callstack);
}

override int opApply( scope int delegate(ref const(char[])) dg ) const
Expand Down Expand Up @@ -384,7 +384,7 @@ else

private:
BTSymbolData _framelist;
GDCBacktraceData _callstack;
UnwindBacktraceData _callstack;
int _firstFrame = 0;
}

Expand All @@ -394,7 +394,7 @@ else

static enum MAXFRAMES = 128;

struct GDCBacktraceData
struct UnwindBacktraceData
{
void*[MAXFRAMES] callstack;
int numframes = 0;
Expand All @@ -408,7 +408,7 @@ else

static extern (C) _Unwind_Reason_Code unwindCB(_Unwind_Context *ctx, void *d)
{
GDCBacktraceData* bt = cast(GDCBacktraceData*)d;
UnwindBacktraceData* bt = cast(UnwindBacktraceData*)d;
if(bt.numframes >= MAXFRAMES)
return _URC_NO_REASON;

Expand All @@ -417,14 +417,14 @@ else
return _URC_NO_REASON;
}

GDCBacktraceData gdcBacktrace()
UnwindBacktraceData getBacktrace()
{
GDCBacktraceData stackframe;
UnwindBacktraceData stackframe;
_Unwind_Backtrace(&unwindCB, &stackframe);
return stackframe;
}

BTSymbolData gdcBacktraceSymbols(GDCBacktraceData data)
BTSymbolData getBacktraceSymbols(UnwindBacktraceData data)
{
BTSymbolData symData;

Expand Down

0 comments on commit 8a704ae

Please sign in to comment.