mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-12 19:31:47 +00:00
Support saving asm range.
This commit is contained in:
parent
9d5d116014
commit
0790e92cad
@ -3421,8 +3421,11 @@ void SourceView::CheckWrite( int line, RegsX86 reg, int limit )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourceView::Save( const Worker& worker )
|
void SourceView::Save( const Worker& worker, size_t start, size_t stop )
|
||||||
{
|
{
|
||||||
|
assert( start < m_asm.size() );
|
||||||
|
assert( start < stop );
|
||||||
|
|
||||||
nfdchar_t* fn;
|
nfdchar_t* fn;
|
||||||
auto res = NFD_SaveDialog( "asm", nullptr, &fn );
|
auto res = NFD_SaveDialog( "asm", nullptr, &fn );
|
||||||
if( res == NFD_OKAY )
|
if( res == NFD_OKAY )
|
||||||
@ -3465,8 +3468,10 @@ void SourceView::Save( const Worker& worker )
|
|||||||
fprintf( f, "; Tracy Profiler disassembly of symbol %s [%s]\n\n", symName, worker.GetCaptureProgram().c_str() );
|
fprintf( f, "; Tracy Profiler disassembly of symbol %s [%s]\n\n", symName, worker.GetCaptureProgram().c_str() );
|
||||||
if( !m_atnt ) fprintf( f, ".intel_syntax\n\n" );
|
if( !m_atnt ) fprintf( f, ".intel_syntax\n\n" );
|
||||||
|
|
||||||
for( auto& v : m_asm )
|
const auto end = m_asm.size() < stop ? m_asm.size() : stop;
|
||||||
|
for( size_t i=start; i<end; i++ )
|
||||||
{
|
{
|
||||||
|
const auto& v = m_asm[i];
|
||||||
auto it = m_locMap.find( v.addr );
|
auto it = m_locMap.find( v.addr );
|
||||||
if( it != m_locMap.end() )
|
if( it != m_locMap.end() )
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef __TRACYSOURCEVIEW_HPP__
|
#ifndef __TRACYSOURCEVIEW_HPP__
|
||||||
#define __TRACYSOURCEVIEW_HPP__
|
#define __TRACYSOURCEVIEW_HPP__
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -167,7 +168,7 @@ private:
|
|||||||
void CheckRead( int line, RegsX86 reg, int limit );
|
void CheckRead( int line, RegsX86 reg, int limit );
|
||||||
void CheckWrite( int line, RegsX86 reg, int limit );
|
void CheckWrite( int line, RegsX86 reg, int limit );
|
||||||
|
|
||||||
void Save( const Worker& worker );
|
void Save( const Worker& worker, size_t start = 0, size_t stop = std::numeric_limits<size_t>::max() );
|
||||||
|
|
||||||
struct TokenizerState
|
struct TokenizerState
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user