diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index dd6109a8..c65264a3 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -1652,9 +1652,10 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map=0; i-- ) + { + const auto byte = bytes[i]; + *buf++ = HexPrint[byte >> 4]; + *buf++ = HexPrint[byte & 0xF]; + *buf++ = ' '; + } + *--buf = '\0'; + return buf - start; +} + +static int PrintHexBytes( char* buf, const uint8_t* bytes, size_t len, CpuArchitecture arch ) +{ + switch( arch ) + { + case CpuArchX86: + case CpuArchX64: + return PrintHexBytesRaw( buf, bytes, len ); + case CpuArchArm32: + case CpuArchArm64: + assert( len == 4 ); + return PrintHexBytesArm( buf, bytes ); + default: + assert( false ); + return 0; + } +} + uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map ipcount, uint32_t ipmax, const Worker& worker, View& view ) { if( m_disasmFail >= 0 ) @@ -1686,7 +1718,7 @@ uint64_t SourceView::RenderSymbolAsmView( uint32_t iptotal, unordered_flat_map