-
Notifications
You must be signed in to change notification settings - Fork 479
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
missing arguments with DWARF from dlopen-ed library #842
Comments
Is this issue related to #539 ? |
@DanielTimLee You're right. It's same issue, but I will keep this as well because it's easier to reproduce the problem. |
It turns out to be a non trivial change since it needs to modify the filter/trigger in libmcount at runtime. Currently it initializes them at load time and accesses them in a lock-less way assuming it's not changing. But with dlopen, we need to add or delete some. |
Now I think we can do this with #1678. |
I've finally got some time to work on it. Please try review/dlopen-args-v1.
|
Uploaded review/dlopen-args-v2.
|
Thanks very much for the work for this! It works great but I have some more requests. As you can see below, it doesn't show
|
I have verified that it works on Before
After
However, it does not output values on the |
Hi @gichoel, did you compile it with gcc? Or clang? |
@honggyukim
As per the intent of the question, I changed the
After building with
However, I found that the argument value is not output under the following conditions:
|
Compiling uftrace is not an issue here. The matter is which compiler is used for example code compilation among gcc or clang. It's because the first argument cannot be properly read for binaries compiled with gcc. This is a known issue as I reported in AArch64 at #778 and #781 but RISC-V has the same problem. This problem is related to the combination with AArch64 or RISC-V with |
Pushed review/dlopen-args-v3 for module and srcline support.
|
Thanks. It works great! But I'm wondering if we can support location filter for dlopen-ed functions as well.
|
Well.. filters with dlopen can be tricky. And I think it works already. When it finds no matching entries for the filter, it ignores the filter and shows the whole functions. So in the beginning, the filters won't work since it has no match. But after the first But after the second |
If that is complicated then can we apply it at least for analysis commands such as replay? It's not urgent requirement but I'm just asking. |
Let's handle filters separately. For now, I'd like to land the argument support first. |
OK. Let' do it later. Thanks for the work! |
It doesn't properly record arguments using DWARF info when the library is opened by
dlopen
. Please see the example insidetests
directory as follows:After building the binaries as above, it can be traced as follows:
But it doesn't record arguments and return values for
lib_a
,lib_b
, andlib_c
.The text was updated successfully, but these errors were encountered: