1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-09-19 13:33:24 +01:00

dmnt2: fix gdb register output

This commit is contained in:
Michael Scire 2021-11-02 16:56:13 -07:00
parent 545ade835d
commit 51d692dfba

View file

@ -433,7 +433,7 @@ namespace ams::dmnt {
return 0; return 0;
} }
void SetGdbRegister32(char *dst, char * const dst_end, u32 value) { void SetGdbRegister32(char * &dst, char * const dst_end, u32 value) {
if (value != 0) { if (value != 0) {
AppendReplyFormat(dst, dst_end, "%08x", util::ConvertToBigEndian(value)); AppendReplyFormat(dst, dst_end, "%08x", util::ConvertToBigEndian(value));
} else { } else {
@ -441,7 +441,7 @@ namespace ams::dmnt {
} }
} }
void SetGdbRegister64(char *dst, char * const dst_end, u64 value) { void SetGdbRegister64(char * &dst, char * const dst_end, u64 value) {
if (value != 0) { if (value != 0) {
AppendReplyFormat(dst, dst_end, "%016lx", util::ConvertToBigEndian(value)); AppendReplyFormat(dst, dst_end, "%016lx", util::ConvertToBigEndian(value));
} else { } else {
@ -449,7 +449,7 @@ namespace ams::dmnt {
} }
} }
void SetGdbRegister128(char *dst, char * const dst_end, u128 value) { void SetGdbRegister128(char * &dst, char * const dst_end, u128 value) {
if (value != 0) { if (value != 0) {
AppendReplyFormat(dst, dst_end, "%016lx%016lx", util::ConvertToBigEndian(static_cast<u64>(value >> 0)), util::ConvertToBigEndian(static_cast<u64>(value >> BITSIZEOF(u64)))); AppendReplyFormat(dst, dst_end, "%016lx%016lx", util::ConvertToBigEndian(static_cast<u64>(value >> 0)), util::ConvertToBigEndian(static_cast<u64>(value >> BITSIZEOF(u64))));
} else { } else {
@ -457,7 +457,7 @@ namespace ams::dmnt {
} }
} }
void SetGdbRegisterPacket(char *dst, char * const dst_end, const svc::ThreadContext &thread_context, bool is_64_bit) { void SetGdbRegisterPacket(char * &dst, char * const dst_end, const svc::ThreadContext &thread_context, bool is_64_bit) {
/* Clear packet. */ /* Clear packet. */
dst[0] = 0; dst[0] = 0;
@ -502,7 +502,7 @@ namespace ams::dmnt {
} }
} }
void SetGdbRegisterPacket(char *dst, char * const dst_end, const svc::ThreadContext &thread_context, u64 reg_num, bool is_64_bit) { void SetGdbRegisterPacket(char * &dst, char * const dst_end, const svc::ThreadContext &thread_context, u64 reg_num, bool is_64_bit) {
/* Clear packet. */ /* Clear packet. */
dst[0] = 0; dst[0] = 0;