This is an archive of the discontinued LLVM Phabricator instance.

Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD.
ClosedPublic

Authored by sas on Aug 21 2015, 10:12 AM.

Details

Summary

This commit implements basic DidAttach and DidLaunch for the windows
DynamicLoader plugin which allow us to load shared libraries from the
inferior.

At the moment, I'm unsure how we're going to gather the load address of
the main module over gdb protocol so I always use an offset of 0, which
works well for processes we create ourselves (no randomization). I will
address this point later on.

Diff Detail

Repository
rL LLVM

Event Timeline

sas updated this revision to Diff 32840.Aug 21 2015, 10:12 AM
sas retitled this revision from to Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD..
sas updated this object.
sas added reviewers: clayborg, zturner.
sas added a subscriber: lldb-commits.
clayborg accepted this revision.Aug 21 2015, 10:17 AM
clayborg edited edge metadata.

Fine for now.

This revision is now accepted and ready to land.Aug 21 2015, 10:17 AM
zturner edited edge metadata.Aug 21 2015, 10:18 AM

Can you verify that this does not break local debugging on Windows?

sas updated this revision to Diff 32842.Aug 21 2015, 10:32 AM
sas edited edge metadata.

Style.

sas added a comment.Aug 21 2015, 10:33 AM

@zturner, will do before submitting.

Tested on Windows, I don't see any problems, so lgtm.

If you're going to be doing a non-trivial amount of work on ProcessWindows
or DynamicLoaderWindows, would it be possible for you to set up a Windows
box you can test from? I'm happy to help you get this set up if you need.

sas added a comment.Aug 21 2015, 12:28 PM

Thanks for the testing. I'll definitely setup a windows box.

This revision was automatically updated to reflect the committed changes.

Hi Stephane, I'm sorry but I had to revert this change. When I tested it
locally, I did it without running the full test suite, but when I did run
the full test suite it showed about 15-20 new test failures. I should have
caught this earlier by running the full test suite, so sorry about that.

I'm not 100% sure what the cause of the failure is, but I suspect it could
be related to DynamicLoaderWindows adding modules to the list *and*
ProcessWindows adding modules to the list as well.

If you need help setting up a Windows machine to test this on let me know.
Unfortunately it's not that trivial, but luckily once you get it set up and
correctly configured it becomes pretty easy to keep it going smoothly.

Let me know if you need more information.

By the way, I'm actively working on getting the test suite completely
running on a buildbot, but I need to get down to a green baseline first.
Still a few weeks out, but hopefully this type of thing will be caught
automatically in the future.

sas added a comment.Aug 21 2015, 5:12 PM

Not a problem at all. Sorry for breaking the tests.

I'm setting up a Windows VM now to be able to run these tests. I'll let you know if I'm stuck.

zturner edited edge metadata.Oct 2 2017, 9:43 AM

Hi Stephane, what's the status of this? Do you still need this functionality?