aboutsummaryrefslogtreecommitdiffstats
path: root/community/dmd/0002-Separate-backtrace-s-processCallback-into-its-own-fu.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/dmd/0002-Separate-backtrace-s-processCallback-into-its-own-fu.patch')
-rw-r--r--community/dmd/0002-Separate-backtrace-s-processCallback-into-its-own-fu.patch97
1 files changed, 0 insertions, 97 deletions
diff --git a/community/dmd/0002-Separate-backtrace-s-processCallback-into-its-own-fu.patch b/community/dmd/0002-Separate-backtrace-s-processCallback-into-its-own-fu.patch
deleted file mode 100644
index 2fd186b5ca..0000000000
--- a/community/dmd/0002-Separate-backtrace-s-processCallback-into-its-own-fu.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From f594fe5b5d32acdad92a8fd100ffaf7fac6a11aa Mon Sep 17 00:00:00 2001
-From: Geod24 <pro.mathias.lang@gmail.com>
-Date: Sat, 2 Jan 2021 14:29:12 +0900
-Subject: Separate backtrace's processCallback into its own function
-
-So that it can be called from another overload of `traceHandlerOpApplyImpl`.
----
- src/core/internal/backtrace/dwarf.d | 62 +++++++++++++++--------------
- 1 file changed, 32 insertions(+), 30 deletions(-)
-
-diff --git a/src/core/internal/backtrace/dwarf.d b/src/core/internal/backtrace/dwarf.d
-index ba059db30..d443319f5 100644
---- a/druntime/src/core/internal/backtrace/dwarf.d
-+++ b/druntime/src/core/internal/backtrace/dwarf.d
-@@ -169,40 +169,19 @@ int traceHandlerOpApplyImpl(const(void*)[] callstack, scope int delegate(ref siz
-
- auto image = Image.openSelf();
-
-- int processCallstack(const(ubyte)[] debugLineSectionData)
-+ // find address -> file, line mapping using dwarf debug_line
-+ Array!Location locations;
-+ locations.length = callstack.length;
-+ foreach (size_t i; 0 .. callstack.length)
- {
-- // find address -> file, line mapping using dwarf debug_line
-- Array!Location locations;
-- locations.length = callstack.length;
-- foreach (size_t i; 0 .. callstack.length)
-- {
-- locations[i].address = callstack[i];
-- locations[i].procedure = getMangledSymbolName(frameList[i][0 .. strlen(frameList[i])]);
-- }
--
-- if (debugLineSectionData)
-- resolveAddresses(debugLineSectionData, locations[], image.baseAddress);
--
-- TraceInfoBuffer buffer;
-- foreach (idx, const ref loc; locations)
-- {
-- buffer.reset();
-- loc.toString(&buffer.put);
--
-- auto lvalue = buffer[];
-- if (auto ret = dg(idx, lvalue))
-- return ret;
--
-- if (loc.procedure == "_Dmain")
-- break;
-- }
--
-- return 0;
-+ locations[i].address = callstack[i];
-+ locations[i].procedure = getMangledSymbolName(frameList[i][0 .. strlen(frameList[i])]);
- }
-
- return image.isValid
-- ? image.processDebugLineSectionData(&processCallstack)
-- : processCallstack(null);
-+ ? image.processDebugLineSectionData(
-+ (line) => locations[].processCallstack(line, image.baseAddress, dg))
-+ : locations[].processCallstack(null, image.baseAddress, dg);
- }
-
- struct TraceInfoBuffer
-@@ -251,6 +230,29 @@ struct TraceInfoBuffer
-
- private:
-
-+int processCallstack(Location[] locations, const(ubyte)[] debugLineSectionData,
-+ size_t baseAddress, scope int delegate(ref size_t, ref const(char[])) dg)
-+{
-+ if (debugLineSectionData)
-+ resolveAddresses(debugLineSectionData, locations, baseAddress);
-+
-+ TraceInfoBuffer buffer;
-+ foreach (idx, const ref loc; locations)
-+ {
-+ buffer.reset();
-+ loc.toString(&buffer.put);
-+
-+ auto lvalue = buffer[];
-+ if (auto ret = dg(idx, lvalue))
-+ return ret;
-+
-+ if (loc.procedure == "_Dmain")
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
- // the lifetime of the Location data is bound to the lifetime of debugLineSectionData
- void resolveAddresses(const(ubyte)[] debugLineSectionData, Location[] locations, size_t baseAddress) @nogc nothrow
- {
---
-2.24.3 (Apple Git-128)
-