Skip to content

Commit

Permalink
Prettyprint fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
mubes committed Nov 29, 2024
1 parent 83463c0 commit 0e34137
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Inc/traceDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct TRACECPUState
genericsReportCB report;

// Debugging
uint64_t overflows;
uint64_t overflows;
};

// ============================================================================
Expand Down
13 changes: 7 additions & 6 deletions Src/loadelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ static void _processFunctionDie( struct symbol *p, Dwarf_Debug dbg, Dwarf_Die di
attr_tag = DW_AT_abstract_origin;
dwarf_attr( die, attr_tag, &attr_data, 0 );
dwarf_global_formref( attr_data, &abstract_origin_offset, 0 );
if (DW_DLV_OK == dwarf_offdie_b( dbg, abstract_origin_offset, IS_INFO, &abstract_origin_die, 0 ))

if ( DW_DLV_OK == dwarf_offdie_b( dbg, abstract_origin_offset, IS_INFO, &abstract_origin_die, 0 ) )
{
isinline = true;
}
Expand Down Expand Up @@ -1045,13 +1046,13 @@ char *symbolDisassembleLine( struct symbol *p, enum instructionClass *ic, symbol
) ? LE_IC_JUMP : 0;

/* create a copy to check if load in pc */
char *copy = strdup(insn->op_str);
char *copy = strdup( insn->op_str );
*ic |= (
( ( ( insn->id == ARM_INS_LDR ) )
&& strstr(strtok(copy,","), "pc" ) )
&& strstr( strtok( copy, "," ), "pc" ) )
) ? LE_IC_JUMP : 0;
free(copy);
free( copy );

/* Was it an exception return? */
*ic |= ( ( insn->id == ARM_INS_ERET ) ) ? LE_IC_JUMP | LE_IC_IRET : 0;

Expand Down Expand Up @@ -1080,7 +1081,7 @@ char *symbolDisassembleLine( struct symbol *p, enum instructionClass *ic, symbol

if ( newaddr )
{
*newaddr = detail->arm.operands[n].imm;
*newaddr = detail->arm.operands[n].imm;
}

break;
Expand Down
3 changes: 2 additions & 1 deletion Src/traceDecoder_etm4.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,12 @@ static bool _pumpAction( struct TRACEDecoderEngine *e, struct TRACECPUState *cpu
}
else
{
if( c == 0x05 && j->asyncCount == 1)
if ( c == 0x05 && j->asyncCount == 1 )
{
cpu->overflows++;
DEBUG( "Overflow Detected. ReSync Trace Stream:" EOL );
}

j->asyncCount = c ? 0 : j->asyncCount + 1;

switch ( j->p )
Expand Down

0 comments on commit 0e34137

Please sign in to comment.