mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Print register data in asm lines.
This commit is contained in:
parent
f4b06ed1fc
commit
4390aa1015
@ -2095,6 +2095,10 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip
|
||||
{
|
||||
TextColoredUnformatted( ImVec4( 1, 0.25f, 0.25f, 1 ), buf );
|
||||
}
|
||||
else if( line.regData[0] != 0 )
|
||||
{
|
||||
TextColoredUnformatted( ImVec4( 1, 0.5f, 1, 1 ), buf );
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextUnformatted( buf );
|
||||
@ -2263,6 +2267,34 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip
|
||||
}
|
||||
}
|
||||
|
||||
if( line.regData[0] != 0 )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
TextColoredUnformatted( ImVec4( 0.5f, 0.5, 1, 1 ), "{" );
|
||||
ImGui::SameLine( 0, 0 );
|
||||
int idx = 0;
|
||||
for(;;)
|
||||
{
|
||||
ImVec4 col;
|
||||
if( line.regData[idx] == 0 ) break;
|
||||
if( ( line.regData[idx] & ( WriteBit | ReadBit ) ) == ( WriteBit | ReadBit ) ) col = ImVec4( 1, 1, 0.5f, 1 );
|
||||
else if( line.regData[idx] & WriteBit ) col = ImVec4( 1, 0.5f, 0.5f, 1 );
|
||||
else if( line.regData[idx] & ReadBit ) col = ImVec4( 0.5f, 1, 0.5f, 1 );
|
||||
else col = ImVec4( 0.5f, 0.5f, 0.5f, 1 );
|
||||
if( idx > 0 )
|
||||
{
|
||||
ImGui::SameLine( 0, 0 );
|
||||
TextColoredUnformatted( ImVec4( 0.5f, 0.5, 1, 1 ), ", " );
|
||||
ImGui::SameLine( 0, 0 );
|
||||
}
|
||||
TextColoredUnformatted( col, s_regNameX86[line.regData[idx++] & RegMask] );
|
||||
}
|
||||
ImGui::SameLine( 0, 0 );
|
||||
TextColoredUnformatted( ImVec4( 0.5f, 0.5, 1, 1 ), "}" );
|
||||
}
|
||||
|
||||
if( line.jumpAddr != 0 )
|
||||
{
|
||||
uint32_t offset = 0;
|
||||
|
@ -81,6 +81,11 @@ private:
|
||||
rd
|
||||
};
|
||||
|
||||
enum { ReadBit = 0x100 };
|
||||
enum { WriteBit = 0x200 };
|
||||
enum { ReuseBit = 0x400 };
|
||||
enum { RegMask = 0x0FF };
|
||||
|
||||
struct AsmLine
|
||||
{
|
||||
uint64_t addr;
|
||||
|
Loading…
Reference in New Issue
Block a user