Page MenuHomePhabricator

[DynamicLoader] Make sure we always set the rendezvous breakpoint

Authored by aadsm on May 20 2019, 6:40 PM.



Once we've attached to the process we load all current modules and also set a breakpoint at the rendezvous break address.
However, we don't do this if we already have a load address for the image info address (e.g.: DT_DEBUG on ELF). This code was added 4 years ago when adding support for $qXfer:Libraries: packet ( but its intention is not 100% clear to me. It seems to me we're using that check to know if the modules have already been loaded (which they have if $qXfer:Libraries: is supported by the gdb server) and skip loading the modules again in the following if block. The problem is that we also skip setting the Rendezvous breakpoint so we stop knowing when the process loads new modules.
I fix this by moving the call to set the breakpoint to the end of the function so we always call it as long as we have a valid executable.

Diff Detail


Event Timeline

aadsm created this revision.May 20 2019, 6:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2019, 6:40 PM
eugene accepted this revision.May 21 2019, 10:45 AM
eugene added a reviewer: labath.

Makes sense to me.

This revision is now accepted and ready to land.May 21 2019, 10:45 AM
labath accepted this revision.May 22 2019, 1:35 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2019, 9:21 AM