-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Load dynamic libraries on darwin #3669
base: master
Are you sure you want to change the base?
Conversation
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.
Did you test this in any way?
if p.BinInfo().GOOS == "darwin" { | ||
images, err := p.conn.getLoadedDynamicLibraries() | ||
if err != nil { | ||
return nil, stopReason, fmt.Errorf("could not load dynamic libraries %s", err) |
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.
I think it's better to just log this: logflags.GdbWireLogger().Errorf(...)
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.
5 lines above there is a return statement for ElfUpdateSharedObjects. I believe behaviour for linux and darwin should be the same.
I just get a bunch of errors like this:
|
I actually debugged our plugin with Krakend in VS Code. But I haven't tried listing library. It won't load any OSX specific library, but go modules work. Maybe I should filter OSX .dylib? |
I've dug a little bit. So those libraries won't load, cause they are universal binaries.
However GO builds only one architecture (here are my minimal cmd and plugin files)
In this PR I would like to give opportunity to debug GO plugin on OSX (I suppose the most common case). And then fix issue with loading libraries which are compiled as universal binaries. Here is a recording how it works https://asciinema.org/a/ePsIt72qx5C9aLsNe57dKdDEg Regarding universal binaries. I can either skip them loading or leave as it is now. |
In general this is good, however there is a problem. We have a bunch of tests for plugin debugging, these are currently disabled by a So I think we (@derekparker and I) need to decide what the behavior of delve is going to be in those cases:
|
Apologies on the late response here. I think we go with option 2, and we use that to selectively skip tests in CI. |
Hi. I'm pretty busy on my main job. However if you give me a hint on how to to detect broken debug_frame sections, I might be able to do this on weekends. |
I think it would be acceptable to do this by checking what |
Hello, do you have capacity to work on this issue? Otherwise I may close it and you can submit a new PR when you have cycles. |
I actually looked into this last month and, even after they were updated our builders still had the buggy version of dsymutil. Maybe the recently released version of macOS doesn't. |
No description provided.