Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/Backtrace/Backtrace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ private let fullCallback: CBacktraceFullCallback? = {
}

private let errorCallback: CBacktraceErrorCallback? = {
_, msg, _ in
_, msg, errNo in
if let msg = msg {
_ = withVaList([msg]) { vaList in
vfprintf(stderr, "%s\n", vaList)
_ = withVaList([msg, errNo]) { vaList in
vfprintf(stderr, "SwiftBacktrace ERROR: %s (errno: %d)\n", vaList)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/CBacktrace/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ backtrace_alloc (struct backtrace_state *state,
if (page == MAP_FAILED)
{
if (error_callback)
error_callback (data, "mmap", errno);
error_callback (data, "mmap for alloc", errno);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Sources/CBacktrace/mmapio.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ backtrace_get_view (struct backtrace_state *state ATTRIBUTE_UNUSED,
map = mmap (NULL, size, PROT_READ, MAP_PRIVATE, descriptor, pageoff);
if (map == MAP_FAILED)
{
error_callback (data, "mmap", errno);
error_callback (data, "mmap file i/o", errno);
return 0;
}

Expand Down