[Lldb-commits] [PATCH] D92264: [lldb] [POSIX-DYLD] Update the cached exe path after attach
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 10 00:46:50 PST 2020
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
In D92264#2436839 <https://reviews.llvm.org/D92264#2436839>, @mgorny wrote:
> Rewritten the test wrt comments, that is:
>
> 1. Added a breakpoint-continue to ensure that the program is past all initial work before we test it.
I am not sure that will help -- I'm guessing the dynamic loader plugin will go through a substantially different codepath if the attach happens early on vs. if it happens after main is reached. It may be better to update this to do the `wait_for_file_on_target` dance, which would also prevent attach denied errors.
================
Comment at: lldb/test/API/commands/process/attach/TestProcessAttach.py:94
+
+ self.runCmd("process attach -p " + str(popen.pid))
+
----------------
mgorny wrote:
> labath wrote:
> > Do you need to attach at any particular moment during the process startup? The attach command could run pretty quickly, before the loader finished its work...
> I don't know ;-). Do you have any particular suggestion? That said, I suppose this means other tests suffer from the same problem, in particular they could attach before `lldb_enable_attach()`.
Good point. Some of our attach tests have the additional `lldbutil.wait_for_file_on_target` call as an additional synchronization. I guess this test is not one of them...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92264/new/
https://reviews.llvm.org/D92264
More information about the lldb-commits
mailing list