[lldb-dev] [PATCH] Cleanup Linux process on detach

Ed Maste emaste at freebsd.org
Tue Mar 25 05:53:00 PDT 2014


On 25 March 2014 06:36, Andrew MacPherson <andrew.macp at gmail.com> wrote:
> When detaching from a debugged process any breakpoint sites need to be
> cleared before detaching so that they don't generate uncaught SIGTRAPs.
> Target::CleanupProcess() seems to do the necessary cleanup so call this from
> the ProcessLinux::WillDetach() method.
>
> If this is the right fix and if it applies to other OSes as well maybe the
> cleanup call should be moved into an earlier Process class in the hierarchy.

I fixed a similar issue on FreeBSD in r201724 by calling
DisableAllBreakpointSites() in ProcessFreeBSD::DoDetach, based on
ProcessGDBRemote::DoDetach.  I think you're right that this should be
moved earlier, probably not in individual Process classes at all.

-Ed



More information about the lldb-dev mailing list