[Lldb-commits] [PATCH] Fix attach API on Linux

Kaylor, Andrew andrew.kaylor at intel.com
Thu Sep 6 15:25:07 PDT 2012

The attached patch fixes a problem with performing an attach from the SBTarget API on Linux (and other systems that use ProcessPOSIX).

When Process::Attach was called from SBTarget, it resulted in a call to a form of the DoAttachWithID function that wasn't implemented in ProcessPOSIX, and so it fell back to the default implementation (which just returns an error).  It didn't seem necessary to use the attach_info parameter for this case, so I just implemented it as a call to the simpler version of the function.

In debugging this problem, I also found that SBTarget wasn't checking the return value from the Attach call, causing it to hang when the attach fails.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20120906/b573f325/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-attach.patch
Type: application/octet-stream
Size: 2016 bytes
Desc: linux-attach.patch
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20120906/b573f325/attachment.obj>

More information about the lldb-commits mailing list