Skip to contentSkip to conversation

gdbstub: Fixed gdb_open() does not work issue while an extra 'x' is being added when converting '%s' to a pointer

PATCH New ~foxes 1 participant 1 message Jun 19, 2023

lore
Share & tools
lore

~foxes

author
#0 lore raw

PATCH 1/1 gdbstub: Fixed gdb_open() does not work issue while an extra 'x' is being added when converting '%s' to a pointer

From: Foxes Hung <[email protected]>

---
 gdbstub/syscalls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
gdbstub/syscalls.c +1 -1
index 02e3a8f74c..4c6b5f728b 100644
@@ -126,7 +126,7 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...)
             case 's':
                 i64 = va_arg(va, uint64_t);
                 i32 = va_arg(va, uint32_t);
-                p += snprintf(p, p_end - p, "%" PRIx64 "/%x" PRIx32, i64, i32);
+                p += snprintf(p, p_end - p, "%" PRIx64 "/%" PRIx32, i64, i32);
                 break;
             default:
             bad_format:
Signature · 1 line
2.38.5