Hi everyone,

I am using DyninstAPI for a project involving disassembling files, and it
worked perfectly until I had to use it on archive files (static libraries
.a).

When I try to get the assembly code for librt.a, a segfault is raised
inside the "ia32_decode_prefixes" method. The strange thing is that it
fails for a "call" instruction (hex code e8 00 00 00 00), which was already
parsed successfully before in another function.

Currently, my way of getting assembly code for a function is to instantiate
a decoder:
decoder(currentFunction->isrc()->getPtrToInstruction(crtaddr),
InstructionDecoder::maxInstructionLength,
currentFunction->isrc()->getArch());
Where crtaddr is (last instruction address) + (last instruction size)
Then, the segfault is thrown for the "call" instruction when I call the
decode() method on this InstructionDecoder instance.

Any hints on this? Is there any other way of getting assembly code for an
archive file?

Thanks,
Alin
_______________________________________________
Dyninst-api mailing list
Dyninst-api@cs.wisc.edu
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api

Reply via email to