debug_ref InfoSkip( dw_client cli, dw_size_t amt ) { debug_ref ret; ret = CLITell( DW_DEBUG_INFO ) - cli->section_base[ DW_DEBUG_INFO ]; CLISeek( DW_DEBUG_INFO, amt, DW_SEEK_CUR ); return( ret ); }
static void DoSectOffset( dw_sectnum section ){ /**********************************/ back_handle bck; long pos; segment_id id; pos = CLITell( section ); bck = DwarfSegs[section].bck; id = DwarfSegs[section].seg; BackBigOffset( bck, id, pos ); }
void FiniDebugInfo( dw_client cli ) { char buf[ sizeof( uint_32 ) ]; long size; /* patch in the length of the .debug_info section */ size = CLITell( DW_DEBUG_INFO ); size -= sizeof( uint_32 ); size -= cli->section_base[ DW_DEBUG_INFO ]; CLISeek( DW_DEBUG_INFO, cli->section_base[ DW_DEBUG_INFO ], DW_SEEK_SET ); WriteU32( buf, size ); CLIWrite( DW_DEBUG_INFO, buf, sizeof( uint_32 ) ); CLISeek( DW_DEBUG_INFO, 0, DW_SEEK_END ); }
void FiniDebugLine( dw_client cli ) { char buf[ sizeof( uint_32 ) ]; long size; buf[ 0 ] = 0; buf[ 1 ] = 1; buf[ 2 ] = DW_LNE_end_sequence; CLIWrite( DW_DEBUG_LINE, buf, 3 ); size = CLITell( DW_DEBUG_LINE ) - sizeof( uint_32 ) - cli->section_base[ DW_DEBUG_LINE ]; WriteU32( buf, size ); CLISeek( DW_DEBUG_LINE, cli->section_base[ DW_DEBUG_LINE ], DW_SEEK_SET ); CLIWrite( DW_DEBUG_LINE, buf, sizeof(uint_32) ); CLISeek( DW_DEBUG_LINE, 0, DW_SEEK_END ); FreeChain( cli, cli->debug_line.files ); }
void FiniDebugPubnames( dw_client cli ) { static char const zeros[ sizeof( uint_32 ) ]; char buf[ sizeof( debug_ref ) ]; debug_ref offset; /* write the set terminator */ CLIWrite( DW_DEBUG_PUBNAMES, zeros, sizeof( uint_32 ) ); /* backpatch the section length */ offset = CLITell( DW_DEBUG_PUBNAMES ) - cli->section_base[ DW_DEBUG_PUBNAMES ] - sizeof( debug_ref ); WriteRef( buf, offset ); CLISeek( DW_DEBUG_PUBNAMES, cli->section_base[ DW_DEBUG_PUBNAMES ], DW_SEEK_SET ); CLIWrite( DW_DEBUG_PUBNAMES, buf, sizeof( debug_ref ) ); CLISeek( DW_DEBUG_PUBNAMES, 0, DW_SEEK_END ); }