diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2023-01-29 21:14:48 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2023-02-21 15:12:19 +0100 |
commit | dfd39ed30dd69a3613d47a83d3739923051734aa (patch) | |
tree | d5247c67bea787eee8a662b8287f9ed848b68351 /libphobos | |
parent | 1dd033b8bcb0c50ad80084a3a13a391808b2deb6 (diff) | |
download | gcc-dfd39ed30dd69a3613d47a83d3739923051734aa.zip gcc-dfd39ed30dd69a3613d47a83d3739923051734aa.tar.gz gcc-dfd39ed30dd69a3613d47a83d3739923051734aa.tar.bz2 |
libphobos: Add @nogc to gcc.backtrace and gcc.libbacktrace modules.
libphobos/ChangeLog:
* libdruntime/gcc/backtrace.d (simpleErrorCallback): Add @nogc.
(LibBacktrace.initLibBacktrace): Likewise.
(LibBacktrace.this): Likewise.
(UnwindBacktrace.this): Likewise.
(getBacktrace): Likewise.
(getBacktraceSymbols): Likewise.
* libdruntime/gcc/libbacktrace.d.in (backtrace_create_state):
Likewise.
(backtrace_full): Likewise.
(backtrace_simple): Likewise.
(backtrace_print): Likewise.
(backtrace_pcinfo): Likewise.
(backtrace_syminfo): Likewise.
Diffstat (limited to 'libphobos')
-rw-r--r-- | libphobos/libdruntime/gcc/backtrace.d | 12 | ||||
-rw-r--r-- | libphobos/libdruntime/gcc/libbacktrace.d.in | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/libphobos/libdruntime/gcc/backtrace.d b/libphobos/libdruntime/gcc/backtrace.d index eeaf078..2b4a339 100644 --- a/libphobos/libdruntime/gcc/backtrace.d +++ b/libphobos/libdruntime/gcc/backtrace.d @@ -46,7 +46,7 @@ static if (BACKTRACE_SUPPORTED && !BACKTRACE_USES_MALLOC) /* * Used for backtrace_create_state and backtrace_simple */ - extern(C) void simpleErrorCallback(void* data, const(char)* msg, int errnum) + extern(C) void simpleErrorCallback(void* data, const(char)* msg, int errnum) @nogc { if (data) // context is not available in backtrace_create_state { @@ -187,7 +187,7 @@ static if (BACKTRACE_SUPPORTED && !BACKTRACE_USES_MALLOC) // FIXME: state is never freed as libbacktrace doesn't provide a free function... public class LibBacktrace : Throwable.TraceInfo { - static void initLibBacktrace() + static void initLibBacktrace() @nogc { if (!initialized) { @@ -196,7 +196,7 @@ static if (BACKTRACE_SUPPORTED && !BACKTRACE_USES_MALLOC) } } - this(int firstFrame) + this(int firstFrame) @nogc { _firstFrame = firstFrame; @@ -345,7 +345,7 @@ else */ public class UnwindBacktrace : Throwable.TraceInfo { - this(int firstFrame) + this(int firstFrame) @nogc { _firstFrame = firstFrame; _callstack = getBacktrace(); @@ -436,14 +436,14 @@ private: return _URC_NO_REASON; } - UnwindBacktraceData getBacktrace() + UnwindBacktraceData getBacktrace() @nogc { UnwindBacktraceData stackframe; _Unwind_Backtrace(&unwindCB, &stackframe); return stackframe; } - BTSymbolData getBacktraceSymbols(UnwindBacktraceData data) + BTSymbolData getBacktraceSymbols(UnwindBacktraceData data) @nogc { BTSymbolData symData; diff --git a/libphobos/libdruntime/gcc/libbacktrace.d.in b/libphobos/libdruntime/gcc/libbacktrace.d.in index 96382e1..def017d 100644 --- a/libphobos/libdruntime/gcc/libbacktrace.d.in +++ b/libphobos/libdruntime/gcc/libbacktrace.d.in @@ -46,28 +46,28 @@ extern(C): backtrace_error_callback; backtrace_state* backtrace_create_state(const(char)* filename, int threaded, - backtrace_error_callback error_callback, void* data) nothrow; + backtrace_error_callback error_callback, void* data) @nogc nothrow; alias extern(C) int function(void* data, uintptr_t pc, const(char)* filename, int lineno, const(char)* func) backtrace_full_callback; int backtrace_full(backtrace_state* state, int skip, backtrace_full_callback callback, - backtrace_error_callback error_callback, void* data) nothrow; + backtrace_error_callback error_callback, void* data) @nogc nothrow; alias extern(C) int function(void* data, uintptr_t pc) backtrace_simple_callback; int backtrace_simple(backtrace_state* state, int skip, backtrace_simple_callback callback, - backtrace_error_callback error_callback, void* data) nothrow; + backtrace_error_callback error_callback, void* data) @nogc nothrow; - void backtrace_print(backtrace_state* state, int skip, FILE* file) nothrow; + void backtrace_print(backtrace_state* state, int skip, FILE* file) @nogc nothrow; int backtrace_pcinfo(backtrace_state* state, uintptr_t pc, backtrace_full_callback callback, - backtrace_error_callback error_callback, void* data) nothrow; + backtrace_error_callback error_callback, void* data) @nogc nothrow; alias extern(C) void function(void* data, uintptr_t pc, const(char)* symname, uintptr_t symval) backtrace_syminfo_callback; int backtrace_syminfo(backtrace_state *state, uintptr_t pc, backtrace_syminfo_callback callback, - backtrace_error_callback error_callback, void* data) nothrow; + backtrace_error_callback error_callback, void* data) @nogc nothrow; } |