Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in compiling commonSnippets.C #38

Closed
aragagnin opened this issue Dec 17, 2019 · 1 comment
Closed

error in compiling commonSnippets.C #38

aragagnin opened this issue Dec 17, 2019 · 1 comment

Comments

@aragagnin
Copy link

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
Copy link
Contributor

Related to #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants