1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2024-12-04 19:07:54 +01:00

feat(inject): Use new exception handler with stacktraces

Adjust inject to utilize the new feature. This also
requires including the dwarfstack.dll in all distribution
packages.
This commit is contained in:
icex2 2024-02-25 09:36:53 +01:00
parent eeff90b355
commit 31fa84e0ef
4 changed files with 17 additions and 2 deletions

View File

@ -259,6 +259,7 @@ $(zipdir)/iidx-09-to-12.zip: \
build/bin/indep-32/iidxio.dll \
build/bin/indep-32/vefxio.dll \
build/bin/indep-32/inject.exe \
dist/dwarfstack/32/dwarfstack.dll \
dist/iidx/config.bat \
dist/iidx/gamestart-09.bat \
dist/iidx/gamestart-10.bat \
@ -284,6 +285,7 @@ $(zipdir)/iidx-13.zip: \
build/bin/indep-32/iidxio.dll \
build/bin/indep-32/vefxio.dll \
build/bin/indep-32/inject.exe \
dist/dwarfstack/32/dwarfstack.dll \
dist/iidx/config.bat \
dist/iidx/gamestart-13.bat \
dist/iidx/iidxhook-13.conf \
@ -300,6 +302,7 @@ $(zipdir)/iidx-14-to-17.zip: \
build/bin/indep-32/iidxio.dll \
build/bin/indep-32/vefxio.dll \
build/bin/indep-32/inject.exe \
dist/dwarfstack/32/dwarfstack.dll \
dist/iidx/config.bat \
dist/iidx/gamestart-14.bat \
dist/iidx/gamestart-15.bat \
@ -518,6 +521,7 @@ $(zipdir)/jb-01.zip: \
build/bin/indep-32/eamio.dll \
build/bin/indep-32/geninput.dll \
build/bin/indep-32/jbio.dll \
dist/dwarfstack/32/dwarfstack.dll \
dist/jb/config.bat \
dist/jb/gamestart-01.bat \
dist/jb/jbhook-01.conf \
@ -532,6 +536,7 @@ $(zipdir)/jb-02.zip: \
build/bin/indep-32/eamio.dll \
build/bin/indep-32/geninput.dll \
build/bin/indep-32/jbio.dll \
dist/dwarfstack/32/dwarfstack.dll \
dist/jb/config.bat \
dist/jb/gamestart-02.bat \
dist/jb/jbhook-02.conf \
@ -720,6 +725,7 @@ $(zipdir)/ddr-12-us.zip: \
build/bin/indep-32/ddrio-smx.dll \
build/bin/indep-32/eamio.dll \
build/bin/indep-32/geninput.dll \
dist/dwarfstack/32/dwarfstack.dll \
dist/ddr/config.bat \
dist/ddr/gamestart-12-us.bat \
dist/ddr/gamestart-12-eu.bat \
@ -872,6 +878,7 @@ $(zipdir)/popn-15-to-18.zip: \
build/bin/indep-32/eamio.dll \
build/bin/indep-32/popnio.dll \
build/bin/indep-32/ezusb2-popn-shim.dll \
dist/dwarfstack/32/dwarfstack.dll \
dist/popn/config.bat \
dist/popn/gamestart-15.bat \
dist/popn/gamestart-16.bat \
@ -903,6 +910,7 @@ $(BUILDDIR)/tests.zip: \
build/bin/indep-32/iidxhook-util-config-gfx-test.exe \
build/bin/indep-32/iidxhook-util-config-misc-test.exe \
build/bin/indep-32/iidxhook-util-config-sec-test.exe \
dist/dwarfstack/32/dwarfstack.dll \
build/bin/indep-32/inject.exe \
build/bin/indep-32/security-id-test.exe \
build/bin/indep-32/security-mcode-test.exe \

View File

@ -1,12 +1,15 @@
exes += inject
imps += dwarfstack
ldflags_inject := \
-mconsole \
-lpsapi \
-ldbghelp \
libs_inject := \
core \
util \
dwarfstack \
src_inject := \
main.c \

View File

@ -13,9 +13,10 @@
#include "inject/debugger.h"
#include "util/debug.h"
#include "util/log.h"
#include "util/mem.h"
#include "util/proc.h"
#include "util/signal.h"
#include "util/str.h"
#define MM_ALLOCATION_GRANULARITY 0x10000
@ -275,7 +276,7 @@ static uint32_t debugger_loop()
"EXCEPTION_DEBUG_EVENT(pid %ld, tid %ld): x%s 0x%p",
de.dwProcessId,
de.dwThreadId,
signal_exception_code_to_str(
debug_exception_code_to_str(
de.u.Exception.ExceptionRecord.ExceptionCode),
de.u.Exception.ExceptionRecord.ExceptionAddress);

View File

@ -28,6 +28,8 @@
#include "inject/version.h"
#include "util/cmdline.h"
#include "util/debug.h"
#include "util/log.h"
#include "util/mem.h"
#include "util/os.h"
#include "util/signal.h"
@ -222,6 +224,7 @@ int main(int argc, char **argv)
os_version_log();
debug_init();
signal_exception_handler_init();
// Cleanup remote process on CTRL+C
signal_register_shutdown_handler(signal_shutdown_handler);