-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
System: Add advanced 'Export Shared Memory' option
Memory map is exported as duckstation_<pid>. Previously, this only worked on Windows, now it is extended to Linux as well.
- Loading branch information
Showing
12 changed files
with
186 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <[email protected]> | ||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0) | ||
|
||
#include "types.h" | ||
#pragma once | ||
|
||
#include <string_view> | ||
|
||
#ifndef _WIN32 | ||
#include <signal.h> | ||
#endif | ||
|
||
namespace CrashHandler { | ||
bool Install(); | ||
|
||
/// Adds a callback to run just before the crash handler exits. | ||
/// It's not guaranteed that this handler will actually run, because the process state could be very messed up by this | ||
/// point. It's mainly a thing so that we can free up the shared memory object if there was one created. | ||
using CleanupHandler = void(*)(); | ||
|
||
bool Install(CleanupHandler cleanup_handler); | ||
void SetWriteDirectory(std::string_view dump_directory); | ||
void WriteDumpForCaller(); | ||
|
||
#ifndef _WIN32 | ||
|
||
// Allow crash handler to be invoked from a signal. | ||
void CrashSignalHandler(int signal, siginfo_t* siginfo, void* ctx); | ||
|
||
#endif | ||
|
||
} // namespace CrashHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.