mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Implement build id retrieval by image name.
This commit is contained in:
parent
324cab3d34
commit
ae373b4050
@ -728,6 +728,20 @@ int GetDebugInfoDescriptor( const char* buildid_data, size_t buildid_size, const
|
|||||||
it->fd = fd >= 0 ? fd : -1;
|
it->fd = fd >= 0 ? fd : -1;
|
||||||
return it->fd;
|
return it->fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const uint8_t* GetBuildIdForImage( const char* image, size_t& size )
|
||||||
|
{
|
||||||
|
assert( image );
|
||||||
|
for( auto& v : s_di_known )
|
||||||
|
{
|
||||||
|
if( strcmp( image, v.filename ) == 0 )
|
||||||
|
{
|
||||||
|
size = v.buildid_size;
|
||||||
|
return v.buildid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void EndCallstack()
|
void EndCallstack()
|
||||||
|
@ -54,6 +54,10 @@ void InitCallstack();
|
|||||||
void EndCallstack();
|
void EndCallstack();
|
||||||
const char* GetKernelModulePath( uint64_t addr );
|
const char* GetKernelModulePath( uint64_t addr );
|
||||||
|
|
||||||
|
#ifdef TRACY_DEBUGINFOD
|
||||||
|
const uint8_t* GetBuildIdForImage( const char* image, size_t& size );
|
||||||
|
#endif
|
||||||
|
|
||||||
#if TRACY_HAS_CALLSTACK == 1
|
#if TRACY_HAS_CALLSTACK == 1
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user