separate frontends from DR
From mxm...@gmail.com on August 07, 2014 14:33:50
We aspire to separate frontends from DR but there are several issues which make it not easy to implement. Firstly we should specify target architecture and OS since we don't use configure_DynamoRIO_* function. So we implemented the following code to do that:
function (configure_DynamoRIO_frontend target)
get_lang(${target} tgt_lang)
if (${tgt_lang} MATCHES CXX)
set(tgt_cxx ON)
else (${tgt_lang} MATCHES CXX)
set(tgt_cxx OFF)
endif (${tgt_lang} MATCHES CXX)
DynamoRIO_extra_cflags(tgt_cflags "${tgt_cflags}" ${tgt_cxx})
set_compile_flags(${target} "${tgt_cflags} -DDYNAMORIO_STANDALONE")
endfunction (configure_DynamoRIO_frontend)
We don't commit this function b/c currently no one uses it.
Secondly we can't simply use dr_* routines in frontends without DR. We duplicated create/remove functionality in drfrontend.h to resolve our current needs. It's a short-term solution for a long-term we should implement solution from issue #1409 (xref issue #1409)
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1503