about summary refs log tree commit diff stats
path: root/src/libtools
diff options
context:
space:
mode:
authorYang Liu <numbksco@gmail.com>2024-03-04 04:41:31 +0800
committerGitHub <noreply@github.com>2024-03-03 21:41:31 +0100
commitd0edf2e8ddd264067d6c635fcd042ac9eadc4c78 (patch)
tree5a7267dcab63f87f96ae3e1e1999d48cff2072d1 /src/libtools
parenta159cb5efeb8fe6b848692f86977fda27aa0703b (diff)
downloadbox64-d0edf2e8ddd264067d6c635fcd042ac9eadc4c78.tar.gz
box64-d0edf2e8ddd264067d6c635fcd042ac9eadc4c78.zip
[LA64_DYNAREC] Added more opcodes and more fixes, SuperHexagon is working (#1319)
* Made printer slightly better

* [SIGNAL] Fixed a typo

* Removed useless comma

* Another typo

* Keep'em in order

* Added more opcodes and more fixes

* A big fix of GOCOND macro

* [LA64_DYNAREC] Added E8 CALL opcode

* [LA64_DYNAREC] Added C6 MOV opcode

* [LA64_DYNAREC] Added 39 CMP opcode

* [LA64_DYNAREC] Added 0F 1F NOP opcode

* BEWARE: shift instructions are NOT sign-extended!

* More fixes

* Try to be safe

* Fixed printer

* Fixed emitter & printer for B, briing superhexagon back
Diffstat (limited to 'src/libtools')
-rw-r--r--src/libtools/signals.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c
index 1fe7a1de..f4c17edc 100644
--- a/src/libtools/signals.c
+++ b/src/libtools/signals.c
@@ -1571,8 +1571,8 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for
             int nptrs;
             void *buffer[BT_BUF_SIZE];
             char **strings;
-            
-            #ifndef ANDROID
+
+#ifndef ANDROID
             nptrs = backtrace(buffer, BT_BUF_SIZE);
             strings = backtrace_symbols(buffer, nptrs);
             if(strings) {
@@ -1581,7 +1581,7 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for
                 free(strings);
             } else
                 printf_log(log_minimum, "NativeBT: none (%d/%s)\n", errno, strerror(errno));
-            #endif
+#endif
             extern int my_backtrace_ip(x64emu_t* emu, void** buffer, int size);   // in wrappedlibc
             extern char** my_backtrace_symbols(x64emu_t* emu, uintptr_t* buffer, int size);
             // save and set real RIP/RSP
@@ -1689,7 +1689,7 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for
                 shown_regs = 1;
                 for (int i=0; i<16; ++i) {
                     if(!(i%4)) printf_log(log_minimum, "\n");
-                    printf_log(log_minimum, "%s:0x%016llx ", reg_name[i], p->uc_mcontext.__gregs[16+i]);
+                    printf_log(log_minimum, "%s:0x%016llx ", reg_name[i], p->uc_mcontext.__gregs[12+i]);
                 }
                 printf_log(log_minimum, "\n");
                 for (int i=0; i<6; ++i)