From: Yonghong Song Date: Tue, 6 Jun 2017 00:55:24 +0000 (-0700) Subject: fix incorrect code generation in usdt X-Git-Tag: submit/tizen_4.0/20171018.110122~85 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e09564df601d6225b1c367d8faf45d6dcf9656f8;p=platform%2Fupstream%2Fbcc.git fix incorrect code generation in usdt o This is caused by my ignorant error in previous usdt change. Obviously, I need to store into pointer address in order to propagate value back to caller. o Thanks Tetsuo Handa pointing this out. Signed-off-by: Yonghong Song --- diff --git a/src/cc/usdt.cc b/src/cc/usdt.cc index 8801b193..d390fb87 100644 --- a/src/cc/usdt.cc +++ b/src/cc/usdt.cc @@ -152,7 +152,7 @@ bool Probe::usdt_getarg(std::ostream &stream) { for (size_t arg_n = 0; arg_n < arg_count; ++arg_n) { std::string ctype = largest_arg_type(arg_n); - std::string cptr("dest"); + std::string cptr = tfm::format("*((%s *)dest)", ctype); tfm::format(stream, "static __always_inline int _bpf_readarg_%s_%d("