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
ctypes cdll list exported functions #113388
Comments
|
This request is understandable, but neither of the call you provided is appropriate, to my understanding.
I vote for adding a new method for cdll objects, like |
|
Implementing this might be hard regardless of the API, on Unix-y platforms |
|
I'm not quite familiar with GNU low-level platform libraries so I have to google or search for stackoverflow for information...
As far as I learnt, The only two problems are, firstly, I don't know if other platforms have similar functions; secondly, |
|
Well.. "nm -D LIBRARY.so" works. |
|
@1MLightyears the api is not the issue... that is up to the maintainers to chose. |
|
The relevant code can be found in ptrace source for ELF files. |
|
@Zibri The problem is the same mechanism could be HUGE. Here you can find an implementation of My point is do we really need them, while |
|
@1MLightyears I am just saying it would be handy. You can find the source here for example: https://github.com/hello2mao/XHook/blob/master/ref/jni/hijack_ref/hijack.c function: |
|
Okay...I have to commit this
makes sense... |
|
considering how many people are asking that (on stackoverflow for example) I'd say it's worth it. |
Sure, but that could be a lot of work and complicated code given the number of platforms we support. The code not only has to be written, but also needs to be maintained over the years. That makes it unlikely that we'll do this in CPython if the dlopen APIs don't support this (as well as the corresponding APIs used on Windows).
Functions in a shared library can be accessed as attributes on a CDLL instance. That makes |


Feature or enhancement
Proposal:
after loading a library with cdll.LoadLibrary
it would be great (and much requested) to have the exported function list available.. for example:
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
The text was updated successfully, but these errors were encountered: