Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-10-07 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. In http://reviews.llvm.org/D12968#259931, @clayborg wrote: > This can't be the real fix for this. We must be able to trust the empty() > function call. We must have someone playing with the collection without > locking the mutex. Please find the real bug. Hello @clay

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-10-07 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. In http://reviews.llvm.org/D12968#261762, @labath wrote: > I have committed http://reviews.llvm.org/D13056 with the event hijacking > portion from your patch. I think your use case should be working now. I am > planning to return to this later, as I believe there are s

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-10-01 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. @labath, Regarding how to reproduce - this problem looks remote target specific only - in my case gdb-remote modules involved. Repository: rL LLVM http://reviews.llvm.org/D12968 ___ lldb-commits mailing list lldb-commi

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-30 Thread Kirill Lapshin via lldb-commits
KLapshin added inline comments. Comment at: test/tools/lldb-mi/control/TestMiExec.py:16 @@ +15,3 @@ +@skipIfFreeBSD # Failure presumably due to StopAtEntry most likely not implemented +@expectedFailureAll("llvm.org/pr25000", oslist=["linux"]) +def test_lldbmi_exec_run

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-30 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. In http://reviews.llvm.org/D12968#256563, @labath wrote: > This is definitely not a proper fix for this problem, it merely sweeps the > problem under the carpet. If something like this makes a difference then it > means something has gone horribly wrong a long time ago

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-30 Thread Kirill Lapshin via lldb-commits
KLapshin marked an inline comment as done. KLapshin added a comment. Repository: rL LLVM http://reviews.llvm.org/D12977 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-30 Thread Kirill Lapshin via lldb-commits
KLapshin updated this revision to Diff 36128. KLapshin added a comment. Test has been marked as XFAILed for Linux (x86_64) case. Repository: rL LLVM http://reviews.llvm.org/D12977 Files: test/tools/lldb-mi/control/TestMiExec.py tools/lldb-mi/MICmdCmdExec.cpp tools/lldb-mi/MICmdCmdExec.

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-30 Thread Kirill Lapshin via lldb-commits
KLapshin added inline comments. Comment at: test/tools/lldb-mi/control/TestMiExec.py:16 @@ +15,3 @@ +@skipIfFreeBSD # Failure presumably due to StopAtEntry most likely not implemented +def test_lldbmi_exec_run(self): +"""Test that 'lldb-mi --interpreter' can stop

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-29 Thread Kirill Lapshin via lldb-commits
KLapshin added inline comments. Comment at: test/tools/lldb-mi/control/TestMiExec.py:16 @@ +15,3 @@ +@skipIfFreeBSD # Failure presumably due to StopAtEntry most likely not implemented +def test_lldbmi_exec_run(self): +"""Test that 'lldb-mi --interpreter' can stop

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-29 Thread Kirill Lapshin via lldb-commits
KLapshin updated this revision to Diff 36005. KLapshin added a comment. I realized what m_events.empty check in Listener::FindNextEventInternal() method returned event collection is NOT empty - probably because list.empty() just compare begin != end pointers, but pointers may be absolutely inval

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-29 Thread Kirill Lapshin via lldb-commits
KLapshin marked an inline comment as done. KLapshin added a comment. m_lldbResult usage has beed removed in ExecRun::Acknowledge() method, corresponding member removed from cmd class. Repository: rL LLVM http://reviews.llvm.org/D12977 ___ lldb-c

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-29 Thread Kirill Lapshin via lldb-commits
KLapshin marked an inline comment as done. KLapshin added a comment. In http://reviews.llvm.org/D12977#255390, @ki.stfu wrote: > lgtm apart a lack of description about the changes in > tools/lldb-mi/MICmdCmdSupportList.cpp I added description about changes in list-features cmd handler in revie

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-29 Thread Kirill Lapshin via lldb-commits
KLapshin updated the summary for this revision. KLapshin updated this revision to Diff 35969. Repository: rL LLVM http://reviews.llvm.org/D12977 Files: test/tools/lldb-mi/control/TestMiExec.py tools/lldb-mi/MICmdCmdExec.cpp tools/lldb-mi/MICmdCmdExec.h tools/lldb-mi/MICmdCmdSupportList

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-28 Thread Kirill Lapshin via lldb-commits
KLapshin marked an inline comment as done. KLapshin added a comment. Requested changes applied, updated patch uploaded. Comment at: tools/lldb-mi/MICmdCmdExec.h:58 @@ -57,2 +57,3 @@ bool Acknowledge() override; +bool ParseArgs() override; // From CMICmnBase ---

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-28 Thread Kirill Lapshin via lldb-commits
KLapshin updated the summary for this revision. KLapshin updated this revision to Diff 35865. Repository: rL LLVM http://reviews.llvm.org/D12977 Files: test/tools/lldb-mi/control/TestMiExec.py tools/lldb-mi/MICmdCmdExec.cpp tools/lldb-mi/MICmdCmdExec.h tools/lldb-mi/MICmdCmdSupportList

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-26 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. @brucem, @enlight Is this patch is fine for you now ? Repository: rL LLVM http://reviews.llvm.org/D12977 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-comm

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-25 Thread Kirill Lapshin via lldb-commits
KLapshin marked an inline comment as done. KLapshin added a comment. "CLI" intepreter not used in ExecRun handler in reworked patch. Repository: rL LLVM http://reviews.llvm.org/D12977 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-25 Thread Kirill Lapshin via lldb-commits
KLapshin updated the summary for this revision. KLapshin updated this revision to Diff 35740. KLapshin added a comment. Patch reworked for suggested "-exec-run --start" manner, no "CLI" interpreter use and check if --start option supported via -list-features. Repository: rL LLVM http://revie

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-24 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. @clayborg, @labath, After more deep investigation I think setting listener for hijacking also looks like workaround. Setting additional listener just change code flow path and buggy path not executed, thus no crash. At top level - crash appeared in Process::m_listener

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. As little summary what should be added to existing lldb-mi in context of this review: - list-features MI command (for getting supported features in future, currently only one "exec-run-start-option" feature will be reported) - add --start option to -exec-run, set StopA

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. In http://reviews.llvm.org/D12968#251719, @labath wrote: > In http://reviews.llvm.org/D12968#251696, @KLapshin wrote: > > > Regarding matter of this patch - I just tried to make process stop > > synchronous, see Process::ResumeSynchronous() - same technique was applied

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin marked an inline comment as done. KLapshin added a comment. Done. Repository: rL LLVM http://reviews.llvm.org/D12968 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. @labath, I updated patch against actual source in SVN - i.e. with taking into account your change (Halt*->Stop*). Regarding matter of this patch - I just tried to make process stop synchronous, see Process::ResumeSynchronous() - same technique was applied month ago.

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-23 Thread Kirill Lapshin via lldb-commits
KLapshin removed rL LLVM as the repository for this revision. KLapshin updated this revision to Diff 35491. http://reviews.llvm.org/D12968 Files: source/Target/Process.cpp Index: source/Target/Process.cpp === --- source/Target/Pro

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin added a subscriber: labath. KLapshin added a comment. Due to @labath reworked and replaced HaltForDestroyOrDetach to StopHaltForDestroyOrDetach method (see http://reviews.llvm.org/D13056) and his patch already approved by @clayborg and crash still reproducible with just race condition

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. Greg, I reworked initial workaround solution, now this is exact fix. Repository: rL LLVM http://reviews.llvm.org/D12968 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin updated this revision to Diff 35392. Repository: rL LLVM http://reviews.llvm.org/D12968 Files: source/Target/Process.cpp Index: source/Target/Process.cpp === --- source/Target/Process.cpp +++ source/Target/Process.cpp

Re: [Lldb-commits] [PATCH] D13056: Fix race condition during process detach

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. See http://reviews.llvm.org/D12968 also - fix for missed hijacked listener set in Process::HaltForDestroyOrDetach() http://reviews.llvm.org/D13056 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm

Re: [Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-22 Thread Kirill Lapshin via lldb-commits
KLapshin updated the summary for this revision. KLapshin updated this revision to Diff 35390. Repository: rL LLVM http://reviews.llvm.org/D12968 Files: source/Target/Process.cpp Index: source/Target/Process.cpp === --- source/T

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-21 Thread Kirill Lapshin via lldb-commits
KLapshin added inline comments. Comment at: tools/lldb-mi/MICmdCmdExec.cpp:92 @@ +91,3 @@ +const char *pCmd = bProcessMustStopAtEntry ? "process launch -s" : "process launch"; +const lldb::ReturnStatus rtn = rSessionInfo.GetDebugger().GetCommandInterpreter().Hand

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-21 Thread Kirill Lapshin via lldb-commits
KLapshin added a comment. In http://reviews.llvm.org/D12977#249437, @enlight wrote: > According to the GDB-MI spec the exec-run > > command already has a **start** option. Support for the

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-21 Thread Kirill Lapshin via lldb-commits
KLapshin added inline comments. Comment at: tools/lldb-mi/MICmdCmdExec.cpp:92 @@ +91,3 @@ +const char *pCmd = bProcessMustStopAtEntry ? "process launch -s" : "process launch"; +const lldb::ReturnStatus rtn = rSessionInfo.GetDebugger().GetCommandInterpreter().Hand

Re: [Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-18 Thread Kirill Lapshin via lldb-commits
KLapshin updated the summary for this revision. KLapshin removed rL LLVM as the repository for this revision. KLapshin updated this revision to Diff 35109. KLapshin added a comment. Minor initial diff cleanup. http://reviews.llvm.org/D12977 Files: test/tools/lldb-mi/TestMiGdbSetShow.py tool

[Lldb-commits] [PATCH] D12977: LLDB MI addition for getting process stopped at first instruction right after launch via -exec-run

2015-09-18 Thread Kirill Lapshin via lldb-commits
KLapshin created this revision. KLapshin added reviewers: dawn, ki.stfu, abidh. KLapshin added a subscriber: lldb-commits. KLapshin set the repository for this revision to rL LLVM. In some cases debugger user may want to get debugged process stopped at very early point - at first instruction. Wi

[Lldb-commits] [PATCH] D12968: Fix for lldb-mi crash in Listener code if -exec-abort MI command was invoked without getting process stopped

2015-09-18 Thread Kirill Lapshin via lldb-commits
KLapshin created this revision. KLapshin added reviewers: dawn, ki.stfu, abidh. KLapshin added a subscriber: lldb-commits. KLapshin set the repository for this revision to rL LLVM. This patch fixes lldb core crash in Listener waiting for process ended and operates with already invalid data if lld