spack/var/spack/repos/builtin/packages/extrae/dyninst_instruction.patch
2024-11-11 18:09:03 -08:00

20 lines
933 B
Diff

diff --git a/src/launcher/dyninst/commonSnippets.C b/src/launcher/dyninst/commonSnippets.C
index 94904a23..2f918949 100644
--- a/src/launcher/dyninst/commonSnippets.C
+++ b/src/launcher/dyninst/commonSnippets.C
@@ -482,9 +482,10 @@ string decodeBasicBlocks(BPatch_function * function, string routine)
ParseAPI::Block* b = ParseAPI::convert(block);
void * buf = b->region()->getPtrToInstruction(b->start());
InstructionAPI::InstructionDecoder dec((unsigned char*)buf,b->size(),b->region()->getArch());
- InstructionAPI::Instruction::Ptr insn;
- while((insn = dec.decode())) {
- res <<loop_name<<"# "<<line++<<": "<< insn->format() << endl;
+ InstructionAPI::Instruction insn = dec.decode();
+ while(insn.isValid()) {
+ res <<loop_name<<"# "<<line++<<": "<< insn.format() << endl;
+ insn = dec.decode();
}
}
return res.str();