Skip to content

Commit 2f0e379

Browse files
committed
[Backtracing] Needed to add some code to this header for the runtime.
In order for the runtime PR to work as a separate PR, it does need a little bit of code in the `_SwiftBacktracing.h` header in SwiftShims. rdar://105391747
1 parent 8a29657 commit 2f0e379

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//===--- _SwiftBacktracing.h - Swift Backtracing Support --------*- C++ -*-===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2023 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
//
13+
// Defines types and support functions for the Swift backtracing code.
14+
//
15+
//===----------------------------------------------------------------------===//
16+
17+
#ifndef SWIFT_BACKTRACING_H
18+
#define SWIFT_BACKTRACING_H
19+
20+
#include <inttypes.h>
21+
22+
#ifdef __cplusplus
23+
namespace swift {
24+
extern "C" {
25+
#endif
26+
27+
struct CrashInfo {
28+
uint64_t crashing_thread;
29+
uint64_t signal;
30+
uint64_t fault_address;
31+
uint64_t mctx;
32+
};
33+
34+
#ifdef __cplusplus
35+
} // extern "C"
36+
} // namespace swift
37+
#endif
38+
39+
#endif // SWIFT_BACKTRACING_H

0 commit comments

Comments
 (0)