mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 19:55:35 +00:00
Make ExceptionHandler::HandleSignal() public.
Patch by Alexander Potapenko <glider@chromium.org> Review URL: https://codereview.appspot.com/6461052/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1008 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
43c933d7f8
commit
066d09538f
|
@ -323,6 +323,16 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
|
||||||
return GenerateDump(&context);
|
return GenerateDump(&context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is a public interface to HandleSignal that allows the client to
|
||||||
|
// generate a crash dump. This function may run in a compromised context.
|
||||||
|
bool ExceptionHandler::SimulateSignalDelivery(int sig) {
|
||||||
|
siginfo_t siginfo;
|
||||||
|
my_memset(&siginfo, 0, sizeof(siginfo_t));
|
||||||
|
struct ucontext context;
|
||||||
|
getcontext(&context);
|
||||||
|
return HandleSignal(sig, &siginfo, &context);
|
||||||
|
}
|
||||||
|
|
||||||
// This function may run in a compromised context: see the top of the file.
|
// This function may run in a compromised context: see the top of the file.
|
||||||
bool ExceptionHandler::GenerateDump(CrashContext *context) {
|
bool ExceptionHandler::GenerateDump(CrashContext *context) {
|
||||||
if (IsOutOfProcess())
|
if (IsOutOfProcess())
|
||||||
|
|
|
@ -193,6 +193,8 @@ class ExceptionHandler {
|
||||||
size_t mapping_size,
|
size_t mapping_size,
|
||||||
size_t file_offset);
|
size_t file_offset);
|
||||||
|
|
||||||
|
// Force signal handling for the specified signal.
|
||||||
|
bool SimulateSignalDelivery(int sig);
|
||||||
private:
|
private:
|
||||||
bool InstallHandlers();
|
bool InstallHandlers();
|
||||||
void UninstallHandlers();
|
void UninstallHandlers();
|
||||||
|
|
Loading…
Reference in a new issue