This is an archive of the discontinued LLVM Phabricator instance.

Implement handling of `library:` keys in thread stop replies.
ClosedPublic

Authored by sas on Aug 20 2015, 3:39 PM.

Details

Summary

When a windows remote stops because of a DLL load/unload, the debug server
sends a stop reply packet that contains a library key with any value (usually
just library:1). This indicates to the debugger that a library has been
loaded or unloaded and that the list of libraries should be refreshed (usually
with qXfer:libraries:read).

This change just triggers a call to LoadModules() which in turns will send a
remote library read command when a stop reply that requests it is received.

Diff Detail

Event Timeline

sas updated this revision to Diff 32761.Aug 20 2015, 3:39 PM
sas retitled this revision from to Implement handling of `library:` keys in thread stop replies..
sas updated this object.
sas added reviewers: clayborg, zturner, tberghammer.
sas added a subscriber: lldb-commits.
sas updated this revision to Diff 32766.Aug 20 2015, 4:08 PM

Fix bug with bool comparison.

tberghammer resigned from this revision.Aug 21 2015, 2:20 AM
tberghammer removed a reviewer: tberghammer.

I leave this review to the others as I have no idea about how library loading works on Windows. (On Linux/Android we use a breakpoint on a special symbol exposed by the linker)

clayborg accepted this revision.Aug 21 2015, 9:13 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Aug 21 2015, 9:13 AM
This revision was automatically updated to reflect the committed changes.