Your problem statement is a bit confusing. You indicate that you're trying
to emulate firmware, which almost always runs on "bare metal"; firmware
doesn't assume the existence of any support software other than itself. But
then you indicate that it uses pthreads, which are a user-space concept
that assumes the existence of a kernel and/or scheduler. It seems like
you're missing a major piece in between.
Unicorn is a CPU emulator; its intended purpose is to emulate CPU
instructions, and its built-in capabilities don't go much further than
that. It seems like what you're looking for is actually QEMU, on which
Unicorn is built. Have a look at this comparison between Unicorn and QEMU
<http://www.unicorn-engine.org/docs/beyond_qemu.html>, where it is stated:
A notable difference between Unicorn and QEMU is that we [Unicorn] only
focus on emulating CPU operations, but do not handle other parts of
computer machine like QEMU. Internally, Unicorn reuses the CPU emulation
component of QEMU as its core.
Unicorn is much more lightweight than QEMU because we stripped all the
subsystems that do not involve in CPU emulation.
Greetings, Unicorn Team.
We are a research group from Department of Computer Science at Federal
University of Pernambuco (CIn-UFPE) and we are testing firmwares through
emulation. The firmware's binary file frequently uses the pthread library.
While using unicorn we found it hard to work with thread calls. Is there a
way in which unicorn can handle pthread calls?