bsc-performance-tools / extrae

Instrumentation framework to generate execution traces of the most used parallel runtimes.
https://tools.bsc.es/extrae
GNU Lesser General Public License v2.1
63 stars 40 forks source link

error in compiling commonSnippets.C #38

Closed aragagnin closed 4 years ago

aragagnin commented 4 years ago

When compiling Extrae-3.7.1 with Dyninst-1.10.0, I get the following error:

commonSnippets.C:486:34: error: no match for ‘operator=’ (operand types are ‘Dyninst::InstructionAPI::Instruction::Ptr’ {aka 
‘boost::shared_ptr<Dyninst::InstructionAPI::Instruction>’} and ‘Dyninst::InstructionAPI::Instruction’)
  486 |         while((insn = dec.decode())) {
      |                                  ^
In file included from /u/aragagnin/opt/tools/dyninst-10.1.0//include/boost/shared_ptr.hpp:17,
             from /opt/tools/dyninst-10.1.0//include/dyn_regs.h:36,
             from /opt/tools/dyninst-10.1.0//include/dyntypes.h:183,
             from /opt/tools/dyninst-10.1.0//include/util.h:223,
             from /opt/tools/dyninst-10.1.0//include/InstructionAST.h:41,
             from /opt/tools/dyninst-10.1.0//include/Expression.h:35,
             from /opt/tools/dyninst-10.1.0//include/Instruction.h:38,
             from /opt/tools/dyninst-10.1.0//include/BPatch_point.h:57,

Looks like decode() returns a object Instruction while Extrae expects a Instruction::Ptr. In fact, in the source code of Dyninst, we can see that the function signature returns a object:

$grep decode -A10 -B10  /opt/tools/dyninst-10.1.0//include/InstructionDecoder.h
[...]
class InstructionDecoderImpl;

class INSTRUCTION_EXPORT InstructionDecoder
{
  friend class Instruction;
    public:
    static const unsigned int maxInstructionLength = 16;
[...]
 /// Decode the current instruction in this %InstructionDecoder object's buffer, interpreting it as
  /// machine language of the type understood by this %InstructionDecoder.
  /// If the buffer does not contain a valid instruction stream, a null %Instruction pointer
  /// will be returned.  The %Instruction's \c size field will contain the size of the instruction decoded.
  Instruction decode();
[...]
emercadal commented 4 years ago

Related to #30