-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
debugging tools for *nix platforms #4925
Conversation
Note that there's no windows stuff in here not out of malice, but simple ignorance and lack of familiarity. |
EDIT: I just noticed that there is already a |
Man, that |
blame says @vtjnash https://github.com/JuliaLang/julia/blame/231fd4f6dc654fde571bae3b0ec83df07c0b0822/base/sysinfo.jl |
Can you factor out a function I'm fine with merging this without windows support -- I'll add that in later (it should be easy, so it doesn't need to hold this up) (for reference, |
I assume you're referring to the call to |
Is this ready to be merged? Should we document |
Yes, we should probably document it. I'm waiting to see what Jameson has in mind for |
Sorry, somehow I missed staticfloat's reply last week. A filter around Can you open an issue against windows when you merge this that someone / I needs to add the code to do this on windows? |
#5045 essentially implements Sys.dlpath, if it was generalized |
I saw that, but I would need a symbol from the library, not the handle to On Dec 7, 2013 10:59 AM, "Jameson Nash" [email protected] wrote:
|
I could generalize the function I have wrote to jl_get_dll_path_from_symbol(void* symbol) Under windows one might be able to pass the handle of LoadLibrary to this, which would allow for implementing l_get_dll_path_from_dll_name(char* name) |
Currently implemented for OSX and Linux only
Alright! I've managed to (with the help of some wonderful people on SO) write a |
debugging tools for *nix platforms
end | ||
|
||
function dlpath( libname::String ) | ||
return dlpath( dlopen(libname) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a dlclose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. Thank you. Fixed in 47915f3
I would love to make the naming more consistent. How about all the dynamic library related things start with |
I agree. I'll open a PR since this will be a breaking change. |
This has been sitting in one of my topic branches for a while, they're a few debugging tools that it might be useful to have sitting around in
base
.Sys.shlib_list()
iterates through the shared libraries linked into our current process, returning a list of their paths. Useful when you're not sure whatdlopen()
is picking up.