Skip to content

Commit 9c10398

Browse files
committed
[runtime] Expose reportToDebugger as swift_reportToDebugger.
...so that the overlays can use it. See next commit.
1 parent 85019e8 commit 9c10398

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

include/swift/Runtime/Debug.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,13 @@ enum: uintptr_t {
207207

208208
/// Debugger hook. Calling this stops the debugger with a message and details
209209
/// about the issues.
210-
void reportToDebugger(uintptr_t flags, const char *message,
211-
RuntimeErrorDetails *details = nullptr);
210+
///
211+
/// This is not considered a finalized runtime entry point at this time. Do not
212+
/// emit calls to it from arbitrary Swift code; it's only meant for libraries
213+
/// that ship with the runtime (i.e. the stdlib and overlays).
214+
SWIFT_RUNTIME_EXPORT
215+
void _swift_reportToDebugger(uintptr_t flags, const char *message,
216+
RuntimeErrorDetails *details = nullptr);
212217

213218
SWIFT_RUNTIME_EXPORT
214219
bool _swift_reportFatalErrorsToDebugger;

stdlib/public/runtime/Errors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ void _swift_runtime_on_report(uintptr_t flags, const char *message,
256256
);
257257
}
258258

259-
void swift::reportToDebugger(uintptr_t flags, const char *message,
260-
RuntimeErrorDetails *details) {
259+
void swift::_swift_reportToDebugger(uintptr_t flags, const char *message,
260+
RuntimeErrorDetails *details) {
261261
_swift_runtime_on_report(flags, message, details);
262262
}
263263

stdlib/public/runtime/Exclusivity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void reportExclusivityConflict(ExclusivityFlags oldAction, void *oldPC,
124124
uintptr_t flags = RuntimeErrorFlagNone;
125125
if (!keepGoing)
126126
flags = RuntimeErrorFlagFatal;
127-
reportToDebugger(flags, message, &details);
127+
_swift_reportToDebugger(flags, message, &details);
128128

129129
if (keepGoing) {
130130
return;

stdlib/public/runtime/SwiftObject.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ void swift_objc_swift3ImplicitObjCEntrypoint(id self, SEL selector,
14581458
uintptr_t runtime_error_flags = RuntimeErrorFlagNone;
14591459
if (reporter == swift::fatalError)
14601460
runtime_error_flags = RuntimeErrorFlagFatal;
1461-
reportToDebugger(runtime_error_flags, message, &details);
1461+
_swift_reportToDebugger(runtime_error_flags, message, &details);
14621462

14631463
reporter(flags,
14641464
"*** %s:%zu:%zu: %s; add explicit '@objc' to the declaration to "

stdlib/public/stubs/Assert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static void logPrefixAndMessageToDebugger(
6565
} else {
6666
swift_asprintf(&debuggerMessage, "%.*s", prefixLength, prefix);
6767
}
68-
reportToDebugger(RuntimeErrorFlagFatal, debuggerMessage);
68+
_swift_reportToDebugger(RuntimeErrorFlagFatal, debuggerMessage);
6969
free(debuggerMessage);
7070
}
7171

0 commit comments

Comments
 (0)