assert( NULL != p_binfo );
if( NULL == p_binfo->p_addrinfo ) {
- return -0x01;
+ return 0x00;
}
free( p_binfo->p_addrinfo );
#define LIBGOBLIN_CalcAddrInfoAllocs(m) ((((m) / LIBGOBLIN_ADDRINFO_ALLOC_UNITS) + 2) * LIBGOBLIN_ADDRINFO_ALLOC_UNITS)
LIBGOBLIN_ADDRINFO_EXTERN
+ int LibGoblin_AddrInfo_SyncSymbolWorkTable(
+ LibGoblin_BinaryInfo *p_binfo, LibGoblin_SymbolWorkTable *p_symworktbl );
+LIBGOBLIN_ADDRINFO_EXTERN
int LibGoblin_AddrInfo_AllocAddrInfo( LibGoblin_BinaryInfo *p_binfo, DWord dw_initsymbols );
LIBGOBLIN_ADDRINFO_EXTERN
int LibGoblin_AddrInfo_FreeAddrInfo( LibGoblin_BinaryInfo *p_binfo );
LibGoblin_BinaryInfo *p_binfo )
{
int i_binfoid;
+ int i_result;
int i_cnt;
if( NULL == p_binfo ) { return 0x01; }
+ i_result = LibGoblin_AddrInfo_FreeAddrInfo( p_binfo );
+ if( 0x00 != i_result ) {
+ return -0x02;
+ }
+
for( i_cnt = 0; i_cnt < LIBGOBLIN_BINFO_MAXFILES; i_cnt++ ) {
if( NULL == p_binfo->t_binfile[i_cnt].p_elf ) {
free( p_binfo->t_binfile[i_cnt].p_elf );
return i_result;
}
+ i_result = LibGoblin_AddrInfo_AllocAddrInfo( p_binfo, t_symwork.dw_max_symwork );
+ if( 0x00 != i_result ) {
+ return i_result;
+ }
+
LibGoblin_Debug_SymWork_PrintWorkTable( &t_symwork, 0x02 );
- LibGoblin_SymWork_FreeSymbolWorkTable( &t_symwork );
+ i_result = LibGoblin_AddrInfo_SyncSymbolWorkTable( p_binfo, &t_symwork );
+ if( 0x00 != i_result ) {
+ return i_result;
+ }
+
/*
p_symwork = LibGoblin_SymWork_CreateWorkTable( p_binfo, &dw_symbols, i_analyzefid );
}
*/
+ LibGoblin_SymWork_FreeSymbolWorkTable( &t_symwork );
+
return 0x00;
}