Skip to content

Commit

Permalink
Make stackframesWithCallStackReturnAddresses: public (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdowell authored Jul 25, 2022
1 parent be2df10 commit 32c24fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Bugsnag/Payload/BugsnagStackframe+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ NS_ASSUME_NONNULL_BEGIN

+ (NSArray<BugsnagStackframe *> *)stackframesWithBacktrace:(uintptr_t *)backtrace length:(NSUInteger)length;

+ (NSArray<BugsnagStackframe *> *)stackframesWithCallStackReturnAddresses:(NSArray<NSNumber *> *)callStackReturnAddresses;

/// Constructs a stackframe object from a stackframe dictionary and list of images captured by KSCrash.
+ (nullable instancetype)frameFromDict:(NSDictionary<NSString *, id> *)dict withImages:(NSArray<NSDictionary<NSString *, id> *> *)binaryImages;

Expand Down
14 changes: 12 additions & 2 deletions Bugsnag/include/Bugsnag/BugsnagStackframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,19 @@ FOUNDATION_EXPORT BugsnagStackframeType const BugsnagStackframeTypeCocoa;
@property (copy, nullable, nonatomic) BugsnagStackframeType type;

/**
* Returns an array of stackframe objects representing the provided call stack strings.
* Creates an array of stackframe objects representing the provided call stack.
*
* The call stack strings should follow the format used by `[NSThread callStackSymbols]` and `backtrace_symbols()`.
* @param callStackReturnAddresses An array containing the call stack return addresses, as returned by
* `NSThread.callStackReturnAddresses` or `NSException.callStackReturnAddresses`.
*/
+ (NSArray<BugsnagStackframe *> *)stackframesWithCallStackReturnAddresses:(NSArray<NSNumber *> *)callStackReturnAddresses;

/**
* Creates an array of stackframe objects representing the provided call stack.
*
* @param callStackSymbols An array containing the call stack symbols, as returned by `NSThread.callStackSymbols`.
* Each element should be in a format determined by the `backtrace_symbols()` function.
*/
+ (nullable NSArray<BugsnagStackframe *> *)stackframesWithCallStackSymbols:(NSArray<NSString *> *)callStackSymbols;

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Changelog

## TBD

### Enhancements

* Add `+[BugsnagStackframe stackframesWithCallStackReturnAddresses:]` to public headers.
[#1446](https://github.com/bugsnag/bugsnag-cocoa/pull/1446)

### Bug fixes

* Attempt to send sessions stored on disk when connection regained.
Expand Down

0 comments on commit 32c24fb

Please sign in to comment.