summarylogtreecommitdiffstats
path: root/build-fix-dyninst-api.patch
blob: 83128557a2905c9c57e9e00255bf4f82b0bb138a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/src/launcher/dyninst/commonSnippets.C	2019-02-28 23:01:35.667997539 +0100
+++ b/src/launcher/dyninst/commonSnippets.C	2019-02-28 23:00:25.653420000 +0100
@@ -482,9 +482,9 @@
         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;
+        while((insn = dec.decode()).isValid()) {
+            res <<loop_name<<"# "<<line++<<": "<< insn.format() << endl;
         }
     }
     return res.str();