Skip to content
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 .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
steps:

- name: Checkout repository...
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Android NDK (r24)...
uses: nttld/setup-ndk@v1.2.0
uses: nttld/setup-ndk@v1
with:
ndk-version: r24
local-cache: true
Expand All @@ -29,7 +29,7 @@ jobs:
run: ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk NDK_APPLICATION_MK=./Application.mk NDK_DEBUG=0 -j12

- name: Upload the mod!
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: AML_Libraries
path: ./libs/**/libAML.so
15 changes: 8 additions & 7 deletions signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void Handler(int sig, siginfo_t *si, void *ptr)
DEVVAR_LOG(g_bNoModsInLog); DEVVAR_LOG(g_bDumpAllThreads); DEVVAR_LOG(g_bEHUnwind); DEVVAR_LOG(g_bMoreRegsInfo); g_pLogFile << std::endl;

g_pLogFile << "Exception Signal " << sig << " - " << SignalEnum(sig) << " (" << CodeEnum(sig, si->si_code) << ")" << std::endl;
g_pLogFile << "Fault address: 0x" << std::hex << std::uppercase << faultAddr << std::nouppercase << std::endl;
g_pLogFile << "Fault address: 0x" << std::hex << std::uppercase << faultAddr << " / " << PC << std::nouppercase << std::endl;
g_pLogFile << "A POSSIBLE (!) reason of the crash:\n- ";
switch(sig)
{
Expand All @@ -245,8 +245,8 @@ void Handler(int sig, siginfo_t *si, void *ptr)
break;
}

Dl_info dlInfo;
if(dladdr((void*)PC, &dlInfo) != 0)
static Dl_info dlInfo;
if(PC && dladdr((void*)PC, &dlInfo) != 0)
{
// Success
if(dlInfo.dli_fname)
Expand All @@ -265,7 +265,7 @@ void Handler(int sig, siginfo_t *si, void *ptr)
{
// Unsuccess
label_unsuccess:
g_pLogFile << "Program counter: Unknown Lib + 0x" << std::hex << std::uppercase << PC;
g_pLogFile << "Failed to get a library. Program counter: 0x" << std::hex << std::uppercase << PC;
}

if(dlInfo.dli_sname)
Expand Down Expand Up @@ -320,7 +320,7 @@ void Handler(int sig, siginfo_t *si, void *ptr)
#ifdef AML32
if(g_bMoreRegsInfo)
{
Dl_info dlRegInfo;
static Dl_info dlRegInfo;
SHOWREG(R0, mcontext->arm_r0);
SHOWREG(R1, mcontext->arm_r1);
SHOWREG(R2, mcontext->arm_r2);
Expand Down Expand Up @@ -362,7 +362,7 @@ void Handler(int sig, siginfo_t *si, void *ptr)
#else
if(g_bMoreRegsInfo)
{
Dl_info dlRegInfo;
static Dl_info dlRegInfo;
SHOWREG(X0, mcontext->regs[0]);
SHOWREG(X1, mcontext->regs[1]);
SHOWREG(X2, mcontext->regs[2]);
Expand Down Expand Up @@ -462,6 +462,7 @@ void Handler(int sig, siginfo_t *si, void *ptr)
{
g_pLogFile << "\n----------------------------------------------------\nPrinting " << std::dec << STACKDUMP_SIZE << " bytes of stack:" << std::endl;
g_pLogFile << std::hex << std::uppercase;
g_pLogFile.flush();
for(int i = 1; i <= STACKDUMP_SIZE; ++i)
{
g_pLogFile << " " << std::setfill('0') << std::setw(2) << (int)(stack[i - 1]);
Expand Down Expand Up @@ -555,4 +556,4 @@ void StartSignalHandler()
HANDLESIG(SIGILL);
HANDLESIG(SIGSTKFLT);
HANDLESIG(SIGTRAP);
}
}
Loading