[Lldb-commits] [PATCH] D79364: Move the Xcode SDK path caching to HostInfo

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Since the option of going to the "host platform" was discussed already and 
rejected, I think a new discussion is in order before going back to it. What 
are the exact circumstances where you did not get a PlatformDarwin object?

Note that I am not opposed (and I never was) having the list of xcode sdk be 
provided by the "host". However, I don't think it's a good idea to route all of 
this through the host *platform*, for a couple of reasons:

- it's completely redundant (if I "inline" `GetHostPlatform()->GetSDKPath(sdk)` 
I get exactly `HostInfo::GetXcodeSDK(sdk)`)
- it makes it appear like it does more things than it actually does (asking 
PlatformLinux for an sdk does nothing, and it's not even clear if it should 
have that api)
- it removes the only usage of "platform" in module code (using platforms in 
modules is very questionable because it can break caching. In fact, the only 
reason this usage is not questionable is because the function always returns 
the exact same value it gets from the host).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79364/new/

https://reviews.llvm.org/D79364



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] 58c7bf2 - Update LLDB filespec tests for remove_dots change

2020-05-05 Thread Pavel Labath via lldb-commits
On 05/05/2020 02:27, Reid Kleckner via lldb-commits wrote:
> I am not sure if "C:..\.." should become "C:" or "C:\", though. The new
> output doesn't precisely match the TODO message, but it seems
> appropriate given the specification of remove_dots and how .. traversals
> work at the root directory.

Yeah, I don't think "c:\" was right there, though I am not sure that
"c:" is fully right either. According to my understanding of windows
paths, "c:..\.." refers to a directory which is two levels up from the
current directory of drive "c". Since we don't know what that directory
is, we can't simplify this path any more that we can simplify the
"../.." path on posix.

This would be consistent with how python handles windows paths:
>>> import ntpath
>>> ntpath.normpath(r"c:\a\..")
'c:\\'
>>> ntpath.normpath(r"c:\..")
'c:\\'
>>> ntpath.normpath(r"c:..")
'c:..'


pl
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79404: Fix error handling after [] in 'frame variable'

2020-05-05 Thread Jaroslav Sevcik via Phabricator via lldb-commits
jarin created this revision.
jarin added reviewers: teemperor, labath.
Herald added subscribers: lldb-commits, arphaman.
Herald added a project: LLDB.
jarin retitled this revision from "Fix handling of [] in 'frame 
variable'" to "Fix error handling after [] in 'frame variable'".

This fixes a bug where

frame var a[0]+5

returns the value a[0] without any warning because the current logic simply 
ignores everything after ']' as long as there is no '.', '-' or '[' in the rest 
of the string.

The fix simplifies the termination condition of the expression path parsing 
loop to check if have a non-empty remaining string to parse. Previously, the 
condition checked if a separator was found. That condition coincided with the 
remaining string-to-parse condition except for the buggy indexed case where 
non-empty string was left ("+5" in the example above), but the separator index 
was 'npos'.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79404

Files:
  lldb/source/Target/StackFrame.cpp
  lldb/test/API/functionalities/var_path/TestVarPath.py


Index: lldb/test/API/functionalities/var_path/TestVarPath.py
===
--- lldb/test/API/functionalities/var_path/TestVarPath.py
+++ lldb/test/API/functionalities/var_path/TestVarPath.py
@@ -25,7 +25,7 @@
 def verify_point(self, frame, var_name, var_typename, x_value, y_value):
 v = frame.GetValueForVariablePath(var_name)
 self.assertTrue(v.GetError().Success(), "Make sure we find '%s'" % 
(var_name))
-self.assertEquals(v.GetType().GetName(), var_typename, 
+self.assertEquals(v.GetType().GetName(), var_typename,
 "Make sure '%s' has type '%s'" % (var_name, 
var_typename))
 
 if '*' in var_typename:
@@ -76,11 +76,14 @@
 self.verify_point(frame, 'pt_ptr[1]', 'Point', 5050, 6060)
 # Test arrays
 v = frame.GetValueForVariablePath('points')
-self.assertTrue(v.GetError().Success(), 
+self.assertTrue(v.GetError().Success(),
 "Make sure we find 'points'")
 self.verify_point(frame, 'points[0]', 'Point', 1010, 2020)
 self.verify_point(frame, 'points[1]', 'Point', 3030, 4040)
 self.verify_point(frame, 'points[2]', 'Point', 5050, 6060)
+v = frame.GetValueForVariablePath('points[0]+5')
+self.assertTrue(v.GetError().Fail(),
+"Make sure we do not ignore characters between ']' and 
the end")
 # Test a reference
 self.verify_point(frame, 'pt_ref', 'Point &', 1, 2)
 v = frame.GetValueForVariablePath('pt_sp')
@@ -88,7 +91,7 @@
 # Make sure we don't crash when looking for non existant child
 # in type with synthetic children. This used to cause a crash.
 v = frame.GetValueForVariablePath('pt_sp->not_valid_child')
-self.assertTrue(v.GetError().Fail(), 
+self.assertTrue(v.GetError().Fail(),
 "Make sure we don't find 'pt_sp->not_valid_child'")
 
 
Index: lldb/source/Target/StackFrame.cpp
===
--- lldb/source/Target/StackFrame.cpp
+++ lldb/source/Target/StackFrame.cpp
@@ -606,7 +606,7 @@
   }
 
   // We are dumping at least one child
-  while (separator_idx != std::string::npos) {
+  while (!var_expr.empty()) {
 // Calculate the next separator index ahead of time
 ValueObjectSP child_valobj_sp;
 const char separator_type = var_expr[0];
@@ -940,7 +940,6 @@
   return ValueObjectSP();
 }
 
-separator_idx = var_expr.find_first_of(".-[");
 if (use_dynamic != eNoDynamicValues) {
   ValueObjectSP dynamic_value_sp(
   child_valobj_sp->GetDynamicValue(use_dynamic));
@@ -1025,7 +1024,6 @@
 return ValueObjectSP();
   }
 
-  separator_idx = var_expr.find_first_of(".-[");
   if (use_dynamic != eNoDynamicValues) {
 ValueObjectSP dynamic_value_sp(
 child_valobj_sp->GetDynamicValue(use_dynamic));
@@ -1051,9 +1049,6 @@
 
 if (child_valobj_sp)
   valobj_sp = child_valobj_sp;
-
-if (var_expr.empty())
-  break;
   }
   if (valobj_sp) {
 if (deref) {


Index: lldb/test/API/functionalities/var_path/TestVarPath.py
===
--- lldb/test/API/functionalities/var_path/TestVarPath.py
+++ lldb/test/API/functionalities/var_path/TestVarPath.py
@@ -25,7 +25,7 @@
 def verify_point(self, frame, var_name, var_typename, x_value, y_value):
 v = frame.GetValueForVariablePath(var_name)
 self.assertTrue(v.GetError().Success(), "Make sure we find '%s'" % (var_name))
-self.assertEquals(v.GetType().GetName(), var_typename, 
+self.assertEquals(v.GetType().GetName(), var_typename,
 "Make sure '%s' has type '%s'" % (var_name, var_typename))
 
 if '*' in var_typename:
@@ -76,1

[Lldb-commits] [PATCH] D79384: RFC: Add an API that allows iterating over a debug map's OSO's Modules

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

My understanding is that these OSO modules are supposed to be a hidden 
implementation detail of SymbolFileDWARF(DebugMap) and that they should not 
leak out the main module. For example, we make sure to always rewrite any 
addresses that come out of the oso modules to be in terms of the main module, 
and ensure that parsed dwarf compile units are assigned to the CompileUnits 
belonging to the main module, etc.

In that world, the right thing to do would be to ensure that 
SymbolFileDWARF(DebugMap) accumulates the appropriate sdk information in the 
main module.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79384/new/

https://reviews.llvm.org/D79384



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D78825: [lldb/Driver] Exit with a non-zero exit code in batch mode when stopping because of an error.

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added a comment.

I note that the call to exit(1) bypasses some of the finalization code in (most 
notably, `reset_stdin_termios`). That does not seem ideal, but it looks like a 
pre-existing problem.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78825/new/

https://reviews.llvm.org/D78825



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79404: Fix error handling after [] in 'frame variable'

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

Makes sense to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79404/new/

https://reviews.llvm.org/D79404



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D78801: [LLDB] Add class WasmProcess for WebAssembly debugging

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

In D78801#2017413 , @paolosev wrote:

> Please, let me know if this is a step in the right direction, in your opinion.


I believe it is. I think that creating ThreadWasm objects would make it even 
better (and address a lot of Greg's issues). Unfortunately, I still don't know 
what to do about the whole Value business...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78801/new/

https://reviews.llvm.org/D78801



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D78801: [LLDB] Add class WasmProcess for WebAssembly debugging

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

In D78801#2019384 , @clayborg wrote:

> Interesting approach to DWARF expression evaluation, though it might be 
> simpler to leave the DWARFExpression as it is, and have the plug-in part only 
> handle unknown opcodes. Right now if you want to add just one opcode, you 
> must subclass and make a plug-in instance where 99% of opcodes get forwarded 
> to the original implementation and the one new opcode gets handled by the 
> plug-in. What if the DWARFExpression class was passed to a plug-in that only 
> handles unknown opcodes? Might be fewer code changes and be a bit cleaner. 
> The plug-in would handle only the DW_OP_WASM_location and would still be 
> found/detected if and only if one is encountered?


I think that the main reason this is awkward is that the evaluator is plugged 
in at the level of a single dwarf operation. That requires passing around of a 
lot of state. If it was plugged in at the level of evaluating the entire 
expression, then the amount of state to pass is much smaller. Obviously, the 
evaluation itself would then need to be factored into multiple functions so 
that one can override just the evaluation of a single expression, but that's 
pretty standard software engineering work, and something that we probably 
should do for code health anyway.

In fact, I believe that if we do this right then the result could be much 
cleaner that the current situation. Going off of the idea of caching the 
evaluator in the module, what if we don't "cache" the evaluator itself, but 
actually a factory (function) for it. The advantage of that (the factory 
function creating a evaluator instance for a specific expression) is that we 
could store a lot of the evaluation state in the evaluator object, instead of 
passing it all around through function arguments (I find the long function 
argument lists to be one of the main problems of the current DWARFExpression 
class).

> As for unwinding, I still don't think we need the UnwindWASM class. See my 
> inline comment in "Unwind &Thread::GetUnwinder()" for a bit of reasoning. It 
> is very common for runtimes for languages to support supplying the stack 
> frames for a thread, so this should be built into the 
> lldb_private::Process/lldb_private::Thread classes. For stack unwindind I 
> would suggest adding functions to lldb_private::Thread:
> 
>   class Thread {
> /// Check if the runtime supports unwinding call stacks and return true 
> if so.
> ///
> /// If the language runs in a runtime that knows how to unwind the call 
> stack
> /// for a thread, then this function should return true.
> ///
> /// If true is returned, unwinding will use a RuntimeUnwind class that 
> will call
> /// into this class' Thread::GetRuntimeFrame* functions to do the 
> unwinding.
> /// If false is returned, the standard UnwindLLDB will be used where 
> unwinding
> /// will be done using registers, unwind info and other debug info.
> virtual bool HasRuntimeUnwindSupport() {
>   return false; // Default to using UnwindLLDB()
> }
> virtual uint32_t GetRuntimeFrameCount() {
>   return 0;
>}
>virtual bool GetRuntimeFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t 
> &cfa, lldb::addr_t &pc, bool &behaves_like_zeroth_frame) {
> return false;
>}
>virtual lldb::RegisterContextSP GetRuntimeFrameRegisterContext(uint32_t 
> frame_idx) {
> return lldb::RegisterContextSP();
>} 
> 
> 
> Then either ThreadGDBRemote, or possibly a subclass like ThreadWasm will 
> implement these virtual functions.

If we have `ThreadWasm` then I believe we don't need any of this as 
`ThreadWasm` can just override the appropriate function which returns the 
unwinder object.

> For the GetWasmLocal, GetWasmGlobal, GetWasmStackValue, I still think 
> abstracting this into the lldb_private::Process/lldb_private::Thread is the 
> right way to do this. The way you have this right now, there is not way to 
> tell how big the buffer needs to be to fetch any of these local/global/stack 
> values. They all assume 16 bytes is enough.

For me, the main one of the advantages of having a wasm-specific class is that 
it can make wasm-specific assumptions. That said, the apis in question are 
definitely very c-like and could definitely be brought into the c++14 world.




Comment at: lldb/source/Interpreter/CommandInterpreter.cpp:738-755
+  std::unique_ptr connect_wasm_cmd_up(
+  new CommandObjectRegexCommand(
+  *this, "wasm",
+  "Connect to a WebAssembly process via remote GDB server.  "
+  "If no host is specifed, localhost is assumed.",
+  "wasm [:]", 2, 0, false));
+  if (connect_wasm_cmd_up) {

One way to improve this would be to have lldb detect the kind of plugin that it 
is talking to and create an appropriate instance based on that. However, that 
would require more refactorings, so this is goo

[Lldb-commits] [PATCH] D79308: [lldb-server] Reset stop reason of all threads when resuming

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

In D79308#2017377 , @jarin wrote:

> Yeah, I considered something like that, but then I thought it would be better 
> if the "other" thread only runs code that we completely control. In my patch, 
> the "other" thread is guaranteed to be in thread_func after we hit the 
> breakpoint. In your suggested inferior, it could be still in 
> pseudo_barrier_wait. If you feel stepping in external code is safe, I am 
> happy to rewrite the test to the simpler version.


The main reason that "pseudo_barrier_wait" even exists is so that we can drive 
multiple test threads to very precise points in the code, so I wouldn't really 
call it "external" code. If we were doing something more complicated to the 
thread (like playing with the line numbers for instance, then I might get 
worried, but given that all we need is to do an instruction step, I think this 
is perfectly safe, and a lot more understandable than the previous version.




Comment at: 
lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py:21
+class ThreadBreakStepOtherTestCase(TestBase):
+mydir = TestBase.compute_mydir(__file__)
+

You can add `NO_DEBUG_INFO_TESTCASE = True` here.



Comment at: lldb/test/API/functionalities/thread/break_step_other/main.cpp:23-25
+  while (true) {
+g_foo = ++i;
+  }

Just a small tweak to ensure the inferior exits if anything happens to the 
debugger (e.g., it crashes)
```
volatile int i = 0;
while (g_foo == 0)
  ++i;
t.join();
```
(and change `g_foo = 0` to `g_foo = 1` in thread_func above).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79308/new/

https://reviews.llvm.org/D79308



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79404: Fix error handling after [] in 'frame variable'

2020-05-05 Thread Jaroslav Sevcik via Phabricator via lldb-commits
jarin added a comment.

Do you think Raphael would want to review this as well? If you think it is not 
necessary, could you land the patch for me?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79404/new/

https://reviews.llvm.org/D79404



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79308: [lldb-server] Reset stop reason of all threads when resuming

2020-05-05 Thread Jaroslav Sevcik via Phabricator via lldb-commits
jarin updated this revision to Diff 262082.
jarin added a comment.

... and remove the extra braces.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79308/new/

https://reviews.llvm.org/D79308

Files:
  lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
  lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
  lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
  lldb/test/API/functionalities/thread/break_step_other/Makefile
  
lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
  lldb/test/API/functionalities/thread/break_step_other/main.cpp

Index: lldb/test/API/functionalities/thread/break_step_other/main.cpp
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/main.cpp
@@ -0,0 +1,28 @@
+#include 
+#include "pseudo_barrier.h"
+
+// Barrier for starting the thread and reaching the loop in main.
+pseudo_barrier_t g_barrier;
+volatile int g_foo = 0;
+
+void thread_func() {
+  // Wait until all the threads are running
+  pseudo_barrier_wait(g_barrier);
+  g_foo = 1; // thread break here
+}
+
+int main() {
+  g_foo = 0; // main break here
+
+  pseudo_barrier_init(g_barrier, 2);
+  std::thread t(thread_func);
+  pseudo_barrier_wait(g_barrier);
+
+  // A dummy loop to have something to step through.
+  unsigned int i = 0;
+  while (g_foo == 0)
+++i;
+
+  t.join();
+  return 0;
+}
Index: lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
@@ -0,0 +1,63 @@
+"""
+Test stop reasons after hitting and deleting a breakpoint and
+stepping another thread. Scenario:
+  - run a thread
+  - stop the thread at a breakpoint
+  - delete the breakpoint
+  - single step on the main thread
+The thread stopped at the deleted breakpoint should have stop reason
+'none'.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ThreadBreakStepOtherTestCase(TestBase):
+mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
+
+def test_hit_breakpoint_delete_step_other_thread(self):
+main_source_file = lldb.SBFileSpec("main.cpp")
+self.build()
+(target, process, main_thread, _) = lldbutil.run_to_source_breakpoint(
+self, "// main break here", main_source_file, only_one_thread = False)
+
+# Run until the breakpoint in the thread.
+thread_breakpoint = target.BreakpointCreateBySourceRegex(
+"// thread break here", main_source_file)
+self.assertGreater(
+thread_breakpoint.GetNumLocations(),
+0,
+"thread breakpoint has no locations associated with it.")
+process.Continue()
+stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(
+process, thread_breakpoint)
+self.assertEquals(
+1,
+len(stopped_threads),
+"only one thread expected stopped at the thread breakpoint")
+breakpoint_thread = stopped_threads[0]
+
+# Delete the breakpint in the thread and do a step in the main thread.
+target.BreakpointDelete(thread_breakpoint.GetID())
+main_thread.StepInstruction(False)
+
+# Check the stop reasons.
+reason = main_thread.GetStopReason()
+self.assertEqual(
+lldb.eStopReasonPlanComplete,
+reason,
+"Expected thread stop reason 'plancomplete', but got '%s'" %
+lldbutil.stop_reason_to_str(reason))
+
+reason = breakpoint_thread.GetStopReason()
+self.assertEqual(
+lldb.eStopReasonNone,
+reason,
+"Expected thread stop reason 'none', but got '%s'" %
+lldbutil.stop_reason_to_str(reason))
Index: lldb/test/API/functionalities/thread/break_step_other/Makefile
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/Makefile
@@ -0,0 +1,4 @@
+CXX_SOURCES := main.cpp
+ENABLE_THREADS := YES
+
+include Makefile.rules
Index: lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
===
--- lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
+++ lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
@@ -94,6 +94,8 @@
 
   void SetStopped();
 
+  void ResetStopReason();
+
   // Member Variables
   lldb::StateType m_state;
   ThreadStopInfo m_stop_info;
Index: lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
===
--- lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -396,7 +396,10 @@
 
 void Na

[Lldb-commits] [PATCH] D79308: [lldb-server] Reset stop reason of all threads when resuming

2020-05-05 Thread Jaroslav Sevcik via Phabricator via lldb-commits
jarin updated this revision to Diff 262081.
jarin marked an inline comment as done.
jarin added a comment.

Addressed reviewer comments.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79308/new/

https://reviews.llvm.org/D79308

Files:
  lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
  lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
  lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
  lldb/test/API/functionalities/thread/break_step_other/Makefile
  
lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
  lldb/test/API/functionalities/thread/break_step_other/main.cpp

Index: lldb/test/API/functionalities/thread/break_step_other/main.cpp
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/main.cpp
@@ -0,0 +1,29 @@
+#include 
+#include "pseudo_barrier.h"
+
+// Barrier for starting the thread and reaching the loop in main.
+pseudo_barrier_t g_barrier;
+volatile int g_foo = 0;
+
+void thread_func() {
+  // Wait until all the threads are running
+  pseudo_barrier_wait(g_barrier);
+  g_foo = 1; // thread break here
+}
+
+int main() {
+  g_foo = 0; // main break here
+
+  pseudo_barrier_init(g_barrier, 2);
+  std::thread t(thread_func);
+  pseudo_barrier_wait(g_barrier);
+
+  // A dummy loop to have something to step through.
+  unsigned int i = 0;
+  while (g_foo == 0) {
+++i;
+  }
+
+  t.join();
+  return 0;
+}
Index: lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
@@ -0,0 +1,63 @@
+"""
+Test stop reasons after hitting and deleting a breakpoint and
+stepping another thread. Scenario:
+  - run a thread
+  - stop the thread at a breakpoint
+  - delete the breakpoint
+  - single step on the main thread
+The thread stopped at the deleted breakpoint should have stop reason
+'none'.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ThreadBreakStepOtherTestCase(TestBase):
+mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
+
+def test_hit_breakpoint_delete_step_other_thread(self):
+main_source_file = lldb.SBFileSpec("main.cpp")
+self.build()
+(target, process, main_thread, _) = lldbutil.run_to_source_breakpoint(
+self, "// main break here", main_source_file, only_one_thread = False)
+
+# Run until the breakpoint in the thread.
+thread_breakpoint = target.BreakpointCreateBySourceRegex(
+"// thread break here", main_source_file)
+self.assertGreater(
+thread_breakpoint.GetNumLocations(),
+0,
+"thread breakpoint has no locations associated with it.")
+process.Continue()
+stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(
+process, thread_breakpoint)
+self.assertEquals(
+1,
+len(stopped_threads),
+"only one thread expected stopped at the thread breakpoint")
+breakpoint_thread = stopped_threads[0]
+
+# Delete the breakpint in the thread and do a step in the main thread.
+target.BreakpointDelete(thread_breakpoint.GetID())
+main_thread.StepInstruction(False)
+
+# Check the stop reasons.
+reason = main_thread.GetStopReason()
+self.assertEqual(
+lldb.eStopReasonPlanComplete,
+reason,
+"Expected thread stop reason 'plancomplete', but got '%s'" %
+lldbutil.stop_reason_to_str(reason))
+
+reason = breakpoint_thread.GetStopReason()
+self.assertEqual(
+lldb.eStopReasonNone,
+reason,
+"Expected thread stop reason 'none', but got '%s'" %
+lldbutil.stop_reason_to_str(reason))
Index: lldb/test/API/functionalities/thread/break_step_other/Makefile
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/Makefile
@@ -0,0 +1,4 @@
+CXX_SOURCES := main.cpp
+ENABLE_THREADS := YES
+
+include Makefile.rules
Index: lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
===
--- lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
+++ lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
@@ -94,6 +94,8 @@
 
   void SetStopped();
 
+  void ResetStopReason();
+
   // Member Variables
   lldb::StateType m_state;
   ThreadStopInfo m_stop_info;
Index: lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
===
--- lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ lldb/source/Plugins/Process/Linux/NativeThre

[Lldb-commits] [PATCH] D79308: [lldb-server] Reset stop reason of all threads when resuming

2020-05-05 Thread Jaroslav Sevcik via Phabricator via lldb-commits
jarin updated this revision to Diff 262087.
jarin marked 2 inline comments as done.
jarin added a comment.

... now also fixed the 'volatile'. It took only three patches to copy four 
lines of code by hand. Not bad, huh?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79308/new/

https://reviews.llvm.org/D79308

Files:
  lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
  lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
  lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
  lldb/test/API/functionalities/thread/break_step_other/Makefile
  
lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
  lldb/test/API/functionalities/thread/break_step_other/main.cpp

Index: lldb/test/API/functionalities/thread/break_step_other/main.cpp
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/main.cpp
@@ -0,0 +1,27 @@
+#include 
+#include "pseudo_barrier.h"
+
+// Barrier for starting the thread and reaching the loop in main.
+pseudo_barrier_t g_barrier;
+volatile int g_foo = 0;
+
+void thread_func() {
+  // Wait until all the threads are running
+  pseudo_barrier_wait(g_barrier);
+  g_foo = 1; // thread break here
+}
+
+int main() {
+  g_foo = 0; // main break here
+
+  pseudo_barrier_init(g_barrier, 2);
+  std::thread t(thread_func);
+  pseudo_barrier_wait(g_barrier);
+
+  // A dummy loop to have something to step through.
+  volatile int i = 0;
+  while (g_foo == 0)
+++i;
+  t.join();
+  return 0;
+}
Index: lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py
@@ -0,0 +1,63 @@
+"""
+Test stop reasons after hitting and deleting a breakpoint and
+stepping another thread. Scenario:
+  - run a thread
+  - stop the thread at a breakpoint
+  - delete the breakpoint
+  - single step on the main thread
+The thread stopped at the deleted breakpoint should have stop reason
+'none'.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ThreadBreakStepOtherTestCase(TestBase):
+mydir = TestBase.compute_mydir(__file__)
+NO_DEBUG_INFO_TESTCASE = True
+
+def test_hit_breakpoint_delete_step_other_thread(self):
+main_source_file = lldb.SBFileSpec("main.cpp")
+self.build()
+(target, process, main_thread, _) = lldbutil.run_to_source_breakpoint(
+self, "// main break here", main_source_file, only_one_thread = False)
+
+# Run until the breakpoint in the thread.
+thread_breakpoint = target.BreakpointCreateBySourceRegex(
+"// thread break here", main_source_file)
+self.assertGreater(
+thread_breakpoint.GetNumLocations(),
+0,
+"thread breakpoint has no locations associated with it.")
+process.Continue()
+stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(
+process, thread_breakpoint)
+self.assertEquals(
+1,
+len(stopped_threads),
+"only one thread expected stopped at the thread breakpoint")
+breakpoint_thread = stopped_threads[0]
+
+# Delete the breakpint in the thread and do a step in the main thread.
+target.BreakpointDelete(thread_breakpoint.GetID())
+main_thread.StepInstruction(False)
+
+# Check the stop reasons.
+reason = main_thread.GetStopReason()
+self.assertEqual(
+lldb.eStopReasonPlanComplete,
+reason,
+"Expected thread stop reason 'plancomplete', but got '%s'" %
+lldbutil.stop_reason_to_str(reason))
+
+reason = breakpoint_thread.GetStopReason()
+self.assertEqual(
+lldb.eStopReasonNone,
+reason,
+"Expected thread stop reason 'none', but got '%s'" %
+lldbutil.stop_reason_to_str(reason))
Index: lldb/test/API/functionalities/thread/break_step_other/Makefile
===
--- /dev/null
+++ lldb/test/API/functionalities/thread/break_step_other/Makefile
@@ -0,0 +1,4 @@
+CXX_SOURCES := main.cpp
+ENABLE_THREADS := YES
+
+include Makefile.rules
Index: lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
===
--- lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
+++ lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
@@ -94,6 +94,8 @@
 
   void SetStopped();
 
+  void ResetStopReason();
+
   // Member Variables
   lldb::StateType m_state;
   ThreadStopInfo m_stop_info;
Index: lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
===
--- lldb/source/Plugins/Process/L

[Lldb-commits] [PATCH] D79308: [lldb-server] Reset stop reason of all threads when resuming

2020-05-05 Thread Jaroslav Sevcik via Phabricator via lldb-commits
jarin added inline comments.



Comment at: 
lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py:21
+class ThreadBreakStepOtherTestCase(TestBase):
+mydir = TestBase.compute_mydir(__file__)
+

labath wrote:
> You can add `NO_DEBUG_INFO_TESTCASE = True` here.
Out of curiosity, what does that do?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79308/new/

https://reviews.llvm.org/D79308



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D74136: [LLDB] WIP: Follow DW_AT_decl_file when setting breakpoint

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

In D74136#1983467 , @kwk wrote:

> I'd be happy to hear about your comments @labath because I'm kind of stuck in 
> what I can think of. I will obviously rename `SearchFilterByModuleListAndCU` 
> but that can come in a child revision.


Sorry, I'm kinda busy these days, so and I did not see the embedded question 
while glossing over the WIP changes.

I think this looks pretty clean (surprisingly clean even) now. I don't have any 
major comments, but we should have Jim take a look at this again, as he's more 
familiar with this stuff.

Given that the name `SearchFilterByModuleListAndCU` is not very widespread (20 
hits in three files) and that this patch actually makes that name wrong, I 
think it'd be best to do the rename as a part of this patch.




Comment at: lldb/source/Breakpoint/BreakpointResolverName.cpp:315
+  if (filter_by_cu && filter_by_function) {
+// Keep this symbol context if it is a function call to a function
+// whose declaration is located in a file that passes. This is needed

This mention of a "function call" is confusing. Either a function is in a file 
or it isn't. Why do we care about who calls who?



Comment at: lldb/source/Breakpoint/BreakpointResolverName.cpp:321
+  FileSpec &source_file = decl.GetFile();
+  if (!filter.CompUnitPasses(source_file))
+remove_it = true;

This `CompUnitPasses` call smells, as `source_file` does not really correspond 
to any compilation unit (in the scenario that you care about). It seems like 
this is actually the first usage of this function, so let's just rename it (and 
make it take a `const FileSpec &` while we're at it).



Comment at: lldb/test/Shell/Breakpoint/Inputs/search-support-files.h:1
+int inlined_42() { return 42; }

Calling this `inlined` is misleading. The function won't get inlined anywhere 
at -O0, and in fact your test would not work if it got inlined. Maybe just call 
it `function_in_header` ?



Comment at: lldb/test/Shell/Breakpoint/search-support-files.test:8
+
+# RUN: %build %p/Inputs/search-support-files.cpp -o dummy.out
+# RUN: %lldb -b -s %s dummy.out | FileCheck --color --dump-input=fail %s 

All of the tests execute in the same directory, so it's a good practice to 
embed `%t` into the files you create. As you don't care about the actual file 
name in the CHECK lines, you can just replace dummy.out with `{{.*}}` 
everywhere.



Comment at: lldb/test/Shell/Breakpoint/search-support-files.test:9
+# RUN: %build %p/Inputs/search-support-files.cpp -o dummy.out
+# RUN: %lldb -b -s %s dummy.out | FileCheck --color --dump-input=fail %s 
+

It's not standard/polite to hard-code --color like this. Using --dump-input is 
also not very common though there are definitely precedents for that, and I can 
see how it can be useful (though one should be careful not to overwhelm the 
terminal if he's using it).



Comment at: lldb/test/Shell/Breakpoint/search-support-files.test:15
+# CHECK: (lldb) breakpoint set -n inlined_42
+# CHECK-NEXT: Breakpoint 1: where = dummy.out`inlined_42() + 4 at 
search-support-files.h:1:20, address = 0x0{{.*}}
+

These check lines hardcode too much stuff. The `+4` thingy can easily change 
due to unrelated codegen changes, and even the `:1:20` seems unnecessarily 
strict.
Maybe something like this would be enough:
```
CHECK-NEXT: Breakpoint 1: where = {{.8}}`inlined_42{{.*}} at 
search-support-files.h
```



Comment at: lldb/test/Shell/Breakpoint/search-support-files.test:32
+#   NOTE: This test is the really interesting one as it shows that we can
+# search by source files that are themselves no compulation units.
+

compilation


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74136/new/

https://reviews.llvm.org/D74136



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79308: [lldb-server] Reset stop reason of all threads when resuming

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments.



Comment at: 
lldb/test/API/functionalities/thread/break_step_other/TestThreadBreakStepOther.py:21
+class ThreadBreakStepOtherTestCase(TestBase):
+mydir = TestBase.compute_mydir(__file__)
+

jarin wrote:
> labath wrote:
> > You can add `NO_DEBUG_INFO_TESTCASE = True` here.
> Out of curiosity, what does that do?
It prevents the test suite from forking the test for different debug info 
"formats" ("regular dwarf", split dwarf, dsym, etc.).
That does not seem relevant/useful here as this test is mainly about the stop 
reason machinery and debug info is only used incidentally.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79308/new/

https://reviews.llvm.org/D79308



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D75607: [lldb] Use llvm::MC for register numbers in AArch64 ABIs

2020-05-05 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Thanks for trying this out. Do you by any chance have any ideas why would lldb 
assign a dwarf number to the pc register when neither llvm nor the arm64 abi do 
not specify a pc register number?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75607/new/

https://reviews.llvm.org/D75607



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] c05f354 - [lldb/unittest] Avoid relying on compiler character encoding in unicode test

2020-05-05 Thread Vedant Kumar via lldb-commits

Author: Vedant Kumar
Date: 2020-05-05T09:18:35-07:00
New Revision: c05f35443c3bc6dc69e060c766b23669a33e14ac

URL: 
https://github.com/llvm/llvm-project/commit/c05f35443c3bc6dc69e060c766b23669a33e14ac
DIFF: 
https://github.com/llvm/llvm-project/commit/c05f35443c3bc6dc69e060c766b23669a33e14ac.diff

LOG: [lldb/unittest] Avoid relying on compiler character encoding in unicode 
test

This is a speculative fix for a unit test failure on a Win/MSVC2017 bot
(http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/16106/steps/test/logs/stdio).

Added: 


Modified: 
lldb/unittests/DataFormatter/StringPrinterTests.cpp

Removed: 




diff  --git a/lldb/unittests/DataFormatter/StringPrinterTests.cpp 
b/lldb/unittests/DataFormatter/StringPrinterTests.cpp
index 4b01f5c1dbe2..180b13772af5 100644
--- a/lldb/unittests/DataFormatter/StringPrinterTests.cpp
+++ b/lldb/unittests/DataFormatter/StringPrinterTests.cpp
@@ -74,8 +74,8 @@ TEST(StringPrinterTests, CxxASCII) {
   EXPECT_EQ(fmt("🥑"), QUOTE("🥑"));
 
   // Octal (\nnn), hex (\xnn), extended octal (\u or \U).
-  EXPECT_EQ(fmt("\uD55C"), QUOTE("한"));
-  EXPECT_EQ(fmt("\U00010348"), QUOTE("𐍈"));
+  EXPECT_EQ(fmt("\uD55C"), QUOTE("\uD55C"));
+  EXPECT_EQ(fmt("\U00010348"), QUOTE("\U00010348"));
 
   // FIXME: These strings are all rejected, but shouldn't be AFAICT. LLDB finds
   // that these are not valid utf8 sequences, but that's OK, the raw values
@@ -111,8 +111,8 @@ TEST(StringPrinterTests, CxxUTF8) {
   EXPECT_EQ(fmt("🥑"), QUOTE("🥑"));
 
   // Octal (\nnn), hex (\xnn), extended octal (\u or \U).
-  EXPECT_EQ(fmt("\uD55C"), QUOTE("한"));
-  EXPECT_EQ(fmt("\U00010348"), QUOTE("𐍈"));
+  EXPECT_EQ(fmt("\uD55C"), QUOTE("\uD55C"));
+  EXPECT_EQ(fmt("\U00010348"), QUOTE("\U00010348"));
 
   // FIXME: These strings are all rejected, but shouldn't be AFAICT. LLDB finds
   // that these are not valid utf8 sequences, but that's OK, the raw values
@@ -148,8 +148,8 @@ TEST(StringPrinterTests, SwiftUTF8) {
   EXPECT_EQ(fmt("🥑"), QUOTE("🥑"));
 
   // Octal (\nnn), hex (\xnn), extended octal (\u or \U).
-  EXPECT_EQ(fmt("\uD55C"), QUOTE("한"));
-  EXPECT_EQ(fmt("\U00010348"), QUOTE("𐍈"));
+  EXPECT_EQ(fmt("\uD55C"), QUOTE("\uD55C"));
+  EXPECT_EQ(fmt("\U00010348"), QUOTE("\U00010348"));
 
   // FIXME: These strings are all rejected, but shouldn't be AFAICT. LLDB finds
   // that these are not valid utf8 sequences, but that's OK, the raw values



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79273: Add an explicit API to read the Xcode SDK DWARF attribute from compile units

2020-05-05 Thread Frederic Riss via Phabricator via lldb-commits
friss accepted this revision.
friss added a comment.
This revision is now accepted and ready to land.

This looks good to me. If a similar API made sense on Module, I guess it can 
live on SymboleFile.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79273/new/

https://reviews.llvm.org/D79273



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79273: Add an explicit API to read the Xcode SDK DWARF attribute from compile units

2020-05-05 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor added inline comments.



Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:786
+  module_sp->RegisterXcodeSDK(sdk, sysroot);
+  return {sdk};
+}

I think we can early-exit here?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79273/new/

https://reviews.llvm.org/D79273



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79364: Move the Xcode SDK path caching to HostInfo

2020-05-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl marked an inline comment as done.
aprantl added a comment.

In D79364#2019818 , @labath wrote:

> Since the option of going to the "host platform" was discussed already and 
> rejected, I think a new discussion is in order before going back to it. What 
> are the exact circumstances where you did not get a PlatformDarwin object?


You're right. The gist is that the old scheme did not work for debugging iOS 
processes from a macOS host. The fundamental issue was that 
GetPlatformForArchitecture chooses the first out of a list of possible 
platforms, and I the first hit would be a PlatformRemoteGDBServer, which does 
not inherit from PlatformDarwin. Basically, inside of Module, we don't have 
enough information (we'd need a Target) to select a meaningful platform.

> Note that I am not opposed (and I never was) having the list of xcode sdk be 
> provided by the "host". However, I don't think it's a good idea to route all 
> of this through the host *platform*, for a couple of reasons:
> 
> - it's completely redundant (if I "inline" 
> `GetHostPlatform()->GetSDKPath(sdk)` I get exactly 
> `HostInfo::GetXcodeSDK(sdk)`)
> - it makes it appear like it does more things than it actually does (asking 
> PlatformLinux for an sdk does nothing, and it's not even clear if it should 
> have that api)
> - it removes the only usage of "platform" in module code (using platforms in 
> modules is very questionable because it can break caching. In fact, the only 
> reason this usage is not questionable is because the function always returns 
> the exact same value it gets from the host).

Good point! The reason why I went with `Platform::GetHostPlatform()` over 
`HostInfo::GetXcodeSDK(sdk))` was because I hadn't realized that I already put 
a default implementation of GetXcodeSDK into HostInfoBase, and I wanted to 
avoid guarding this in an ugly `#if APPLE`. But I think that that is completely 
unnecessary.

I'll change it to calling HostInfo directly!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79364/new/

https://reviews.llvm.org/D79364



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 61d5b0e - [lldb/Driver] Exit with a non-zero exit code in case of error in batch mode.

2020-05-05 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2020-05-05T11:01:44-07:00
New Revision: 61d5b0e66394d61947d61861685b4223214f023e

URL: 
https://github.com/llvm/llvm-project/commit/61d5b0e66394d61947d61861685b4223214f023e
DIFF: 
https://github.com/llvm/llvm-project/commit/61d5b0e66394d61947d61861685b4223214f023e.diff

LOG: [lldb/Driver] Exit with a non-zero exit code in case of error in batch 
mode.

We have the option to stop running commands in batch mode when an error
occurs. When that happens we should exit the driver with a non-zero exit
code.

Differential revision: https://reviews.llvm.org/D78825

Added: 


Modified: 
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/test/Shell/Commands/command-source.test
lldb/test/Shell/Driver/TestProcessAttach.test
lldb/test/Shell/Host/TestCustomShell.test
lldb/test/Shell/Quit/TestQuitExitCodeNonInt.test
lldb/test/Shell/Quit/TestQuitExitCodeTooManyArgs.test
lldb/test/Shell/Reproducer/TestDiscard.test
lldb/test/Shell/Reproducer/TestDump.test
lldb/test/Shell/Settings/TestSettingsSet.test
lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
lldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test
lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
lldb/tools/driver/Driver.cpp

Removed: 




diff  --git a/lldb/source/Interpreter/CommandInterpreter.cpp 
b/lldb/source/Interpreter/CommandInterpreter.cpp
index 3f727e83f12b..2cc3d47406b7 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -2816,8 +2816,10 @@ void 
CommandInterpreter::IOHandlerInputComplete(IOHandler &io_handler,
 
   case eReturnStatusFailed:
 m_result.IncrementNumberOfErrors();
-if (io_handler.GetFlags().Test(eHandleCommandFlagStopOnError))
+if (io_handler.GetFlags().Test(eHandleCommandFlagStopOnError)) {
+  m_result.SetResult(lldb::eCommandInterpreterResultCommandError);
   io_handler.SetIsDone(true);
+}
 break;
 
   case eReturnStatusQuit:

diff  --git a/lldb/test/Shell/Commands/command-source.test 
b/lldb/test/Shell/Commands/command-source.test
index d8218850c32c..fa389f2a1288 100644
--- a/lldb/test/Shell/Commands/command-source.test
+++ b/lldb/test/Shell/Commands/command-source.test
@@ -1,8 +1,8 @@
 # Check that stop command source on error.
 
-# RUN: %lldb -x -b -o "command source -e 1 %s" 2>&1 | FileCheck %s 
--check-prefix STOP
+# RUN: not %lldb -x -b -o "command source -e 1 %s" 2>&1 | FileCheck %s 
--check-prefix STOP
 # RUN: %lldb -x -b -o "command source -e 0 %s" 2>&1 | FileCheck %s 
--check-prefix CONTINUE
-# RUN: %lldb -x -b -o 'settings set interpreter.stop-command-source-on-error 
true' -o "command source %s" 2>&1 | FileCheck %s --check-prefix STOP
+# RUN: not %lldb -x -b -o 'settings set 
interpreter.stop-command-source-on-error true' -o "command source %s" 2>&1 | 
FileCheck %s --check-prefix STOP
 # RUN: %lldb -x -b -o 'settings set interpreter.stop-command-source-on-error 
false' -o "command source %s" 2>&1 | FileCheck %s --check-prefix CONTINUE
 
 bogus

diff  --git a/lldb/test/Shell/Driver/TestProcessAttach.test 
b/lldb/test/Shell/Driver/TestProcessAttach.test
index 4e24ebb161b6..ab75814e21ce 100644
--- a/lldb/test/Shell/Driver/TestProcessAttach.test
+++ b/lldb/test/Shell/Driver/TestProcessAttach.test
@@ -1,2 +1,2 @@
-# RUN: %lldb -x -b -S %S/Inputs/process_attach_pid.in 2>&1 | FileCheck %s
+# RUN: not %lldb -x -b -S %S/Inputs/process_attach_pid.in 2>&1 | FileCheck %s
 # CHECK: last option requires an argument

diff  --git a/lldb/test/Shell/Host/TestCustomShell.test 
b/lldb/test/Shell/Host/TestCustomShell.test
index fd97b4c2b06e..75114c554493 100644
--- a/lldb/test/Shell/Host/TestCustomShell.test
+++ b/lldb/test/Shell/Host/TestCustomShell.test
@@ -8,7 +8,7 @@
 # XFAIL: system-openbsd
 
 # RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
-# RUN: SHELL=bogus %lldb %t.out -b -o 'run' 2>&1 | FileCheck %s --check-prefix 
ERROR
+# RUN: SHELL=bogus not %lldb %t.out -b -o 'run' 2>&1 | FileCheck %s 
--check-prefix ERROR
 # RUN: env -i %lldb %t.out -b -o 'run' 2>&1 | FileCheck %s
 
 # ERROR: error: shell expansion failed

diff  --git a/lldb/test/Shell/Quit/TestQuitExitCodeNonInt.test 
b/lldb/test/Shell/Quit/TestQuitExitCodeNonInt.test
index 87c0bd41bb05..1747ddd669b6 100644
--- a/lldb/test/Shell/Quit/TestQuitExitCodeNonInt.test
+++ b/lldb/test/Shell/Quit/TestQuitExitCodeNonInt.test
@@ -1,4 +1,4 @@
 # UNSUPPORTED: system-windows
-# RUN: %lldb -b -s %s 2>&1 | FileCheck %s
+# RUN: not %lldb -b -s %s 2>&1 | FileCheck %s
 q str
 // CHECK: Couldn't parse 'str'

diff  --git a/lldb/test/Shell/Quit/TestQuitExitCodeTooManyArgs.test 
b/lldb/test/Shell/Quit/TestQuitExitCodeTooManyArgs.test
index a67669451e99..315adf02af4d 100644
--- a/lldb/test/Shell/Quit/TestQuitExitCodeTooManyArgs.test
+++ b/lldb/test/Shell/Quit/TestQuitExitCodeTooManyArgs.test
@@ -1,4 +1,4 @@
 # UNSU

[Lldb-commits] [PATCH] D79273: Add an explicit API to read the Xcode SDK DWARF attribute from compile units

2020-05-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl updated this revision to Diff 262176.
aprantl added a comment.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79273/new/

https://reviews.llvm.org/D79273

Files:
  lldb/include/lldb/Core/Module.h
  lldb/include/lldb/Symbol/SymbolFile.h
  lldb/include/lldb/Target/Platform.h
  lldb/source/Core/Module.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
  lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp

Index: lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
===
--- lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
+++ lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
@@ -64,13 +64,13 @@
 
   auto triple = "x86_64-apple-macosx";
   YAMLModuleTester t(yamldata, triple);
-  auto module = t.GetModule();
   auto dwarf_unit_sp = t.GetDwarfUnit();
   auto *dwarf_cu = llvm::cast(dwarf_unit_sp.get());
   ASSERT_TRUE((bool)dwarf_cu);
-  ASSERT_TRUE((bool)dwarf_cu->GetSymbolFileDWARF().GetCompUnitForDWARFCompUnit(
-  *dwarf_cu));
-  XcodeSDK sdk = module->GetXcodeSDK();
+  SymbolFileDWARF &sym_file = dwarf_cu->GetSymbolFileDWARF();
+  CompUnitSP comp_unit = sym_file.GetCompileUnitAtIndex(0);
+  ASSERT_TRUE((bool)comp_unit.get());
+  XcodeSDK sdk = sym_file.ParseXcodeSDK(*comp_unit);
   ASSERT_EQ(sdk.GetType(), XcodeSDK::Type::MacOSX);
 }
 #endif
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -58,6 +58,9 @@
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
+  lldb_private::XcodeSDK
+  ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override;
+
   size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
 
   bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override;
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -628,6 +628,15 @@
   return eLanguageTypeUnknown;
 }
 
+XcodeSDK
+SymbolFileDWARFDebugMap::ParseXcodeSDK(CompileUnit &comp_unit) {
+  std::lock_guard guard(GetModuleMutex());
+  SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
+  if (oso_dwarf)
+return oso_dwarf->ParseXcodeSDK(comp_unit);
+  return {};
+}
+
 size_t SymbolFileDWARFDebugMap::ParseFunctions(CompileUnit &comp_unit) {
   std::lock_guard guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -106,6 +106,9 @@
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
+  lldb_private::XcodeSDK
+  ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override;
+
   size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
 
   bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override;
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -664,12 +664,6 @@
 const DWARFBaseDIE cu_die =
 dwarf_cu.GetNonSkeletonUnit().GetUnitDIEOnly();
 if (cu_die) {
-  if (const char *sdk =
-  cu_die.GetAttributeValueAsString(DW_AT_APPLE_sdk, nullptr)) {
-const char *sysroot =
-cu_die.GetAttributeValueAsString(DW_AT_LLVM_sysroot, "");
-module_sp->RegisterXcodeSDK(sdk, sysroot);
-  }
   FileSpec cu_file_spec(cu_die.GetName(), dwarf_cu.GetPathStyle());
   MakeAbsoluteAndRemap(cu_file_spec, dwarf_cu, module_sp);
 
@@ -778,6 +772,22 @@
 return eLanguageTypeUnknown;
 }
 
+XcodeSDK SymbolFileDWARF::ParseXcodeSDK(CompileUnit &comp_unit) {
+  std::lock_guard guard(GetModuleMutex());
+  if (DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit))
+if (ModuleSP module_sp = m_objfile_sp->GetModule())
+  if (const DWARFBaseDIE cu_die =
+  dwarf_cu->GetNonSkeletonUnit().GetUnitDIEOnly())
+if (const char *sdk =
+cu_die.GetAttributeValueAsString(DW_AT_APPLE_sdk, nullptr

[Lldb-commits] [PATCH] D79273: Add an explicit API to read the Xcode SDK DWARF attribute from compile units

2020-05-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl updated this revision to Diff 262178.
aprantl added a comment.

Updated the wrong review...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79273/new/

https://reviews.llvm.org/D79273

Files:
  lldb/include/lldb/Core/Module.h
  lldb/include/lldb/Symbol/SymbolFile.h
  lldb/source/Core/Module.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
  lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp

Index: lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
===
--- lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
+++ lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
@@ -64,13 +64,13 @@
 
   auto triple = "x86_64-apple-macosx";
   YAMLModuleTester t(yamldata, triple);
-  auto module = t.GetModule();
   auto dwarf_unit_sp = t.GetDwarfUnit();
   auto *dwarf_cu = llvm::cast(dwarf_unit_sp.get());
   ASSERT_TRUE((bool)dwarf_cu);
-  ASSERT_TRUE((bool)dwarf_cu->GetSymbolFileDWARF().GetCompUnitForDWARFCompUnit(
-  *dwarf_cu));
-  XcodeSDK sdk = module->GetXcodeSDK();
+  SymbolFileDWARF &sym_file = dwarf_cu->GetSymbolFileDWARF();
+  CompUnitSP comp_unit = sym_file.GetCompileUnitAtIndex(0);
+  ASSERT_TRUE((bool)comp_unit.get());
+  XcodeSDK sdk = sym_file.ParseXcodeSDK(*comp_unit);
   ASSERT_EQ(sdk.GetType(), XcodeSDK::Type::MacOSX);
 }
 #endif
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -628,6 +628,15 @@
   return eLanguageTypeUnknown;
 }
 
+XcodeSDK
+SymbolFileDWARFDebugMap::ParseXcodeSDK(CompileUnit &comp_unit) {
+  std::lock_guard guard(GetModuleMutex());
+  SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
+  if (oso_dwarf)
+return oso_dwarf->ParseXcodeSDK(comp_unit);
+  return {};
+}
+
 size_t SymbolFileDWARFDebugMap::ParseFunctions(CompileUnit &comp_unit) {
   std::lock_guard guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -58,6 +58,9 @@
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
+  lldb_private::XcodeSDK
+  ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override;
+
   size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
 
   bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override;
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -664,12 +664,6 @@
 const DWARFBaseDIE cu_die =
 dwarf_cu.GetNonSkeletonUnit().GetUnitDIEOnly();
 if (cu_die) {
-  if (const char *sdk =
-  cu_die.GetAttributeValueAsString(DW_AT_APPLE_sdk, nullptr)) {
-const char *sysroot =
-cu_die.GetAttributeValueAsString(DW_AT_LLVM_sysroot, "");
-module_sp->RegisterXcodeSDK(sdk, sysroot);
-  }
   FileSpec cu_file_spec(cu_die.GetName(), dwarf_cu.GetPathStyle());
   MakeAbsoluteAndRemap(cu_file_spec, dwarf_cu, module_sp);
 
@@ -778,6 +772,22 @@
 return eLanguageTypeUnknown;
 }
 
+XcodeSDK SymbolFileDWARF::ParseXcodeSDK(CompileUnit &comp_unit) {
+  std::lock_guard guard(GetModuleMutex());
+  if (DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit))
+if (ModuleSP module_sp = m_objfile_sp->GetModule())
+  if (const DWARFBaseDIE cu_die =
+  dwarf_cu->GetNonSkeletonUnit().GetUnitDIEOnly())
+if (const char *sdk =
+cu_die.GetAttributeValueAsString(DW_AT_APPLE_sdk, nullptr)) {
+  const char *sysroot =
+  cu_die.GetAttributeValueAsString(DW_AT_LLVM_sysroot, "");
+  module_sp->RegisterXcodeSDK(sdk, sysroot);
+  return {sdk};
+}
+  return {};
+}
+
 size_t SymbolFileDWARF::ParseFunctions(CompileUnit &comp_unit) {
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, "SymbolFileDWARF::ParseFunctions");
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -106,6 +106,9 @@
   lldb::LanguageType
   ParseLangua

[Lldb-commits] [PATCH] D78825: [lldb/Driver] Exit with a non-zero exit code in batch mode when stopping because of an error.

2020-05-05 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG61d5b0e66394: [lldb/Driver] Exit with a non-zero exit code 
in case of error in batch mode. (authored by JDevlieghere).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78825/new/

https://reviews.llvm.org/D78825

Files:
  lldb/source/Interpreter/CommandInterpreter.cpp
  lldb/test/Shell/Commands/command-source.test
  lldb/test/Shell/Driver/TestProcessAttach.test
  lldb/test/Shell/Host/TestCustomShell.test
  lldb/test/Shell/Quit/TestQuitExitCodeNonInt.test
  lldb/test/Shell/Quit/TestQuitExitCodeTooManyArgs.test
  lldb/test/Shell/Reproducer/TestDiscard.test
  lldb/test/Shell/Reproducer/TestDump.test
  lldb/test/Shell/Settings/TestSettingsSet.test
  lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
  lldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test
  lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
  lldb/tools/driver/Driver.cpp

Index: lldb/tools/driver/Driver.cpp
===
--- lldb/tools/driver/Driver.cpp
+++ lldb/tools/driver/Driver.cpp
@@ -619,6 +619,12 @@
 results.GetResult() != lldb::eCommandInterpreterResultInferiorCrash)
   go_interactive = false;
 
+// When running in batch mode and stopped because of an error, exit with a
+// non-zero exit status.
+if (m_option_data.m_batch &&
+results.GetResult() == lldb::eCommandInterpreterResultCommandError)
+  exit(1);
+
 if (m_option_data.m_batch &&
 results.GetResult() == lldb::eCommandInterpreterResultInferiorCrash &&
 !m_option_data.m_after_crash_commands.empty()) {
@@ -636,6 +642,13 @@
 if (local_results.GetResult() ==
 lldb::eCommandInterpreterResultQuitRequested)
   go_interactive = false;
+
+// When running in batch mode and an error occurred while sourcing
+// the crash commands, exit with a non-zero exit status.
+if (m_option_data.m_batch &&
+local_results.GetResult() ==
+lldb::eCommandInterpreterResultCommandError)
+  exit(1);
   }
 }
 m_debugger.SetAsync(old_async);
Index: lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
===
--- lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
+++ lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
@@ -5,7 +5,7 @@
 # UNSUPPORTED: system-windows
 
 # RUN: %clang_host %p/Inputs/call-asm.c -x assembler-with-cpp %p/Inputs/thread-step-out-ret-addr-check.s -o %t
-# RUN: %lldb %t -s %s -b 2>&1 | FileCheck %s
+# RUN: not %lldb %t -s %s -b 2>&1 | FileCheck %s
 
 breakpoint set -n nonstandard_stub
 # CHECK: Breakpoint 1: where = {{.*}}`nonstandard_stub
Index: lldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test
===
--- lldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test
+++ lldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test
@@ -14,10 +14,10 @@
 RUN: %lldb %t -b -o "type lookup EC" | FileCheck --check-prefix=LOOKUPEC %s
 LOOKUPEC: no type was found matching 'EC'
 
-RUN: %lldb %t -b -o "print (E) 1" 2>&1 | FileCheck --check-prefix=PRINTE %s
+RUN: not %lldb %t -b -o "print (E) 1" 2>&1 | FileCheck --check-prefix=PRINTE %s
 PRINTE: use of undeclared identifier 'E'
 
-RUN: %lldb %t -b -o "print (EC) 1" 2>&1 | FileCheck --check-prefix=PRINTEC %s
+RUN: not %lldb %t -b -o "print (EC) 1" 2>&1 | FileCheck --check-prefix=PRINTEC %s
 PRINTEC: use of undeclared identifier 'EC'
 
 RUN: %lldb %t -b -o "target variable a e ec" | FileCheck --check-prefix=VARS %s
Index: lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
===
--- lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
+++ lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
@@ -12,13 +12,13 @@
 # RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %S/Inputs/StopCommandSource.in | FileCheck %s --check-prefix CONTINUE
 
 # FIXME: Should continue
-# RUN: %lldb -b -s %S/Inputs/DontStopCommandSource.in -o 'bogus' -o 'print 0 + 1' | FileCheck %s --check-prefix STOP
+# RUN: not %lldb -b -s %S/Inputs/DontStopCommandSource.in -o 'bogus' -o 'print 0 + 1' | FileCheck %s --check-prefix STOP
 
 # FIXME: Should continue
-# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -o 'bogus' -o 'print 12340 + 56789'  | FileCheck %s --check-prefix STOP
+# RUN: not %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -o 'bogus' -o 'print 12340 + 56789'  | FileCheck %s --check-prefix STOP
 
 # FIXME: Should continue
-# RUN: %lldb -b -s %S/Inputs/DontStopCommandSource.in | FileCheck %s --check-prefix STOP
+

[Lldb-commits] [PATCH] D79364: Move the Xcode SDK path caching to HostInfo

2020-05-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl updated this revision to Diff 262184.
aprantl added a comment.

Removed the Platform detour.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79364/new/

https://reviews.llvm.org/D79364

Files:
  lldb/include/lldb/Target/Platform.h
  lldb/source/Core/Module.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h


Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
===
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
@@ -89,8 +89,6 @@
   llvm::Expected
   FetchExtendedCrashInformation(lldb_private::Process &process) override;
 
-  llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) override;
-
   static lldb_private::FileSpec GetXcodeContentsDirectory();
   static lldb_private::FileSpec GetXcodeDeveloperDirectory();
 
Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
===
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -1761,10 +1761,6 @@
   return {};
 }
 
-llvm::StringRef PlatformDarwin::GetSDKPath(XcodeSDK sdk) {
- return HostInfo::GetXcodeSDKPath(sdk);
-}
-
 FileSpec PlatformDarwin::GetXcodeContentsDirectory() {
   static FileSpec g_xcode_contents_path;
   static std::once_flag g_once_flag;
Index: lldb/source/Core/Module.cpp
===
--- lldb/source/Core/Module.cpp
+++ lldb/source/Core/Module.cpp
@@ -18,6 +18,7 @@
 #include "lldb/Core/Section.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Host.h"
+#include "lldb/Host/HostInfo.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/ScriptInterpreter.h"
 #include "lldb/Symbol/CompileUnit.h"
@@ -33,7 +34,6 @@
 #include "lldb/Symbol/TypeMap.h"
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Target/Language.h"
-#include "lldb/Target/Platform.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/DataBufferHeap.h"
@@ -1598,10 +1598,10 @@
 
 void Module::RegisterXcodeSDK(llvm::StringRef sdk_name, llvm::StringRef 
sysroot) {
   XcodeSDK sdk(sdk_name.str());
-  ConstString sdk_path(Platform::GetHostPlatform()->GetSDKPath(sdk));
+  ConstString sdk_path(HostInfo::GetXcodeSDKPath(sdk));
   if (!sdk_path)
 return;
-  // If merged SDK changed for a previously registered source path, update it.
+  // If the SDK changed for a previously registered source path, update it.
   // This could happend with -fdebug-prefix-map, otherwise it's unlikely.
   ConstString sysroot_cs(sysroot);
   if (!m_source_mappings.Replace(sysroot_cs, sdk_path, true))
Index: lldb/include/lldb/Target/Platform.h
===
--- lldb/include/lldb/Target/Platform.h
+++ lldb/include/lldb/Target/Platform.h
@@ -26,7 +26,6 @@
 #include "lldb/Utility/StructuredData.h"
 #include "lldb/Utility/Timeout.h"
 #include "lldb/Utility/UserIDResolver.h"
-#include "lldb/Utility/XcodeSDK.h"
 #include "lldb/lldb-private-forward.h"
 #include "lldb/lldb-public.h"
 #include "llvm/Support/VersionTuple.h"
@@ -435,8 +434,6 @@
 return lldb_private::ConstString();
   }
 
-  virtual llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) { return {}; }
-
   const std::string &GetRemoteURL() const { return m_remote_url; }
 
   bool IsHost() const {


Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
===
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
@@ -89,8 +89,6 @@
   llvm::Expected
   FetchExtendedCrashInformation(lldb_private::Process &process) override;
 
-  llvm::StringRef GetSDKPath(lldb_private::XcodeSDK sdk) override;
-
   static lldb_private::FileSpec GetXcodeContentsDirectory();
   static lldb_private::FileSpec GetXcodeDeveloperDirectory();
 
Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
===
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -1761,10 +1761,6 @@
   return {};
 }
 
-llvm::StringRef PlatformDarwin::GetSDKPath(XcodeSDK sdk) {
- return HostInfo::GetXcodeSDKPath(sdk);
-}
-
 FileSpec PlatformDarwin::GetXcodeContentsDirectory() {
   static FileSpec g_xcode_contents_path;
   static std::once_flag g_once_flag;
Index: lldb/source/Core/Module.cpp
===
--- lldb/source/Core/Module.cpp
+++ lldb/source/Core/Module.cpp
@@ -18,6 +18,7 @@
 #include "lldb/Core/Section.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Host.h"
+#include "lldb/Host/HostInfo.h"
 #include "lldb/Interpreter/CommandInterpreter.h"

[Lldb-commits] [PATCH] D73191: Only match mangled name in full-name function lookup (with accelerators)

2020-05-05 Thread Jaroslav Sevcik via Phabricator via lldb-commits
jarin reopened this revision.
jarin added a comment.
This revision is now accepted and ready to land.

Reopening for further investigation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73191/new/

https://reviews.llvm.org/D73191



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 48e5eed - [TestIndirectSymbols] This now runs and works on iOS (arm64).

2020-05-05 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-05-05T13:14:05-07:00
New Revision: 48e5eedab3aa170f880b333d5e38bbc6e72d4b8b

URL: 
https://github.com/llvm/llvm-project/commit/48e5eedab3aa170f880b333d5e38bbc6e72d4b8b
DIFF: 
https://github.com/llvm/llvm-project/commit/48e5eedab3aa170f880b333d5e38bbc6e72d4b8b.diff

LOG: [TestIndirectSymbols] This now runs and works on iOS (arm64).

Added: 


Modified: 
lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py

Removed: 




diff  --git a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py 
b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
index 2718bd746a08..e67611ef3692 100644
--- a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
+++ b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
@@ -19,7 +19,6 @@ def setUp(self):
 self.main_source = "main.c"
 
 @skipUnlessDarwin
-@expectedFailureAll(oslist=no_match(["macosx"]), 
bugnumber="rdar://55952764")
 @add_test_categories(['pyapi'])
 def test_with_python_api(self):
 """Test stepping and setting breakpoints in indirect and re-exported 
symbols."""



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] d606dcc - [TestIndirectSymbol] This tests an Apple-specific feature.

2020-05-05 Thread Davide Italiano via lldb-commits

Author: Davide Italiano
Date: 2020-05-05T13:14:05-07:00
New Revision: d606dcc65254b13e6238b69d8185d3667e850522

URL: 
https://github.com/llvm/llvm-project/commit/d606dcc65254b13e6238b69d8185d3667e850522
DIFF: 
https://github.com/llvm/llvm-project/commit/d606dcc65254b13e6238b69d8185d3667e850522.diff

LOG: [TestIndirectSymbol] This tests an Apple-specific feature.

Remove a redundant check.

Added: 


Modified: 
lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py

Removed: 




diff  --git a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py 
b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
index e67611ef3692..c80fb748e41f 100644
--- a/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
+++ b/lldb/test/API/macosx/indirect_symbol/TestIndirectSymbols.py
@@ -28,10 +28,9 @@ def test_with_python_api(self):
 target = self.dbg.CreateTarget(exe)
 self.assertTrue(target, VALID_TARGET)
 
-if self.platformIsDarwin():
-lib1 = self.getBuildArtifact('libindirect.dylib')
-lib2 = self.getBuildArtifact('libreexport.dylib')
-self.registerSharedLibrariesWithTarget(target, [lib1, lib2])
+lib1 = self.getBuildArtifact('libindirect.dylib')
+lib2 = self.getBuildArtifact('libreexport.dylib')
+self.registerSharedLibrariesWithTarget(target, [lib1, lib2])
 
 self.main_source_spec = lldb.SBFileSpec(self.main_source)
 



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79384: RFC: Add an API that allows iterating over a debug map's OSO's Modules

2020-05-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl updated this revision to Diff 262208.
aprantl added a comment.

Completely different implementation :-)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79384/new/

https://reviews.llvm.org/D79384

Files:
  lldb/include/lldb/Symbol/SymbolFile.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
  lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp

Index: lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
===
--- lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
+++ lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
@@ -70,7 +70,10 @@
   SymbolFileDWARF &sym_file = dwarf_cu->GetSymbolFileDWARF();
   CompUnitSP comp_unit = sym_file.GetCompileUnitAtIndex(0);
   ASSERT_TRUE((bool)comp_unit.get());
-  XcodeSDK sdk = sym_file.ParseXcodeSDK(*comp_unit);
+  ModuleSP module = t.GetModule();
+  ASSERT_EQ(module->GetSourceMappingList().GetSize(), 0u);
+  XcodeSDK sdk = sym_file.ParseXcodeSDK(*comp_unit, module.get());
   ASSERT_EQ(sdk.GetType(), XcodeSDK::Type::MacOSX);
+  ASSERT_EQ(module->GetSourceMappingList().GetSize(), 1u);
 }
 #endif
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -58,8 +58,8 @@
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
-  lldb_private::XcodeSDK
-  ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override;
+  lldb_private::XcodeSDK ParseXcodeSDK(lldb_private::CompileUnit &comp_unit,
+   lldb_private::Module *module) override;
 
   size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
 
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -628,12 +628,12 @@
   return eLanguageTypeUnknown;
 }
 
-XcodeSDK
-SymbolFileDWARFDebugMap::ParseXcodeSDK(CompileUnit &comp_unit) {
+XcodeSDK SymbolFileDWARFDebugMap::ParseXcodeSDK(CompileUnit &comp_unit,
+Module *module) {
   std::lock_guard guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
   if (oso_dwarf)
-return oso_dwarf->ParseXcodeSDK(comp_unit);
+return oso_dwarf->ParseXcodeSDK(comp_unit, module);
   return {};
 }
 
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -106,8 +106,8 @@
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
-  lldb_private::XcodeSDK
-  ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override;
+  lldb_private::XcodeSDK ParseXcodeSDK(lldb_private::CompileUnit &comp_unit,
+   lldb_private::Module *module) override;
 
   size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
 
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -772,19 +772,27 @@
 return eLanguageTypeUnknown;
 }
 
-XcodeSDK SymbolFileDWARF::ParseXcodeSDK(CompileUnit &comp_unit) {
+XcodeSDK SymbolFileDWARF::ParseXcodeSDK(CompileUnit &comp_unit, Module *module) {
   std::lock_guard guard(GetModuleMutex());
   if (DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit))
-if (ModuleSP module_sp = m_objfile_sp->GetModule())
-  if (const DWARFBaseDIE cu_die =
-  dwarf_cu->GetNonSkeletonUnit().GetUnitDIEOnly())
-if (const char *sdk =
-cu_die.GetAttributeValueAsString(DW_AT_APPLE_sdk, nullptr)) {
-  const char *sysroot =
-  cu_die.GetAttributeValueAsString(DW_AT_LLVM_sysroot, "");
-  module_sp->RegisterXcodeSDK(sdk, sysroot);
-  return {sdk};
-}
+if (const DWARFBaseDIE cu_die =
+dwarf_cu->GetNonSkeletonUnit().GetUnitDIEOnly())
+  if (const char *sdk =
+  cu_die.GetAttributeValueAsString(DW_AT_APPLE_sdk, nullptr)) {
+const char *sysroot =
+cu_die.GetAttributeValueAsString(DW_AT_LLVM_sysroot, "");
+// Register the sysroot path remapping with this symbol file's module.
+if (ModuleSP module_sp = m_objfile_sp-

[Lldb-commits] [PATCH] D79404: Fix error handling after [] in 'frame variable'

2020-05-05 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor accepted this revision.
teemperor added a comment.

I don't think I know this code better than Pavel, but this also LGTM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79404/new/

https://reviews.llvm.org/D79404



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 11af2bf - [lldb/Test] Update expressions.test for non-zero exit code

2020-05-05 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2020-05-05T14:06:47-07:00
New Revision: 11af2bf0e0bc4d0946bef90e1d8c3df847a94843

URL: 
https://github.com/llvm/llvm-project/commit/11af2bf0e0bc4d0946bef90e1d8c3df847a94843
DIFF: 
https://github.com/llvm/llvm-project/commit/11af2bf0e0bc4d0946bef90e1d8c3df847a94843.diff

LOG: [lldb/Test] Update expressions.test for non-zero exit code

Updates Windows test for 61d5b0e66394.

Added: 


Modified: 
lldb/test/Shell/SymbolFile/PDB/expressions.test

Removed: 




diff  --git a/lldb/test/Shell/SymbolFile/PDB/expressions.test 
b/lldb/test/Shell/SymbolFile/PDB/expressions.test
index 49016196117e..819e2e180945 100644
--- a/lldb/test/Shell/SymbolFile/PDB/expressions.test
+++ b/lldb/test/Shell/SymbolFile/PDB/expressions.test
@@ -1,6 +1,6 @@
 REQUIRES: system-windows, msvc
 RUN: %build --compiler=msvc --nodefaultlib --output=%t.exe 
%S/Inputs/ExpressionsTest.cpp
-RUN: %lldb -b -s %S/Inputs/ExpressionsTest0.script -s 
%S/Inputs/ExpressionsTest1.script -s %S/Inputs/ExpressionsTest2.script -- 
%t.exe 2>&1 | FileCheck %s
+RUN: not %lldb -b -s %S/Inputs/ExpressionsTest0.script -s 
%S/Inputs/ExpressionsTest1.script -s %S/Inputs/ExpressionsTest2.script -- 
%t.exe 2>&1 | FileCheck %s
 
 // Check the variable value through `print`
 CHECK: (lldb) print result



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 5034102 - Log the NSError str and object description on app launch fail

2020-05-05 Thread Jason Molenda via lldb-commits

Author: Jason Molenda
Date: 2020-05-05T15:51:50-07:00
New Revision: 5034102b249f850109ccd7b2c8a02a246edcd95a

URL: 
https://github.com/llvm/llvm-project/commit/5034102b249f850109ccd7b2c8a02a246edcd95a
DIFF: 
https://github.com/llvm/llvm-project/commit/5034102b249f850109ccd7b2c8a02a246edcd95a.diff

LOG: Log the NSError str and object description on app launch fail

Update CallBoardSystemServiceOpenApplication to unconditionally log
the NSError's localizedDescription to Console on app launch failure
(as it was already doing), and also to log the NSError object's
full description to the console, which may contain additional nested
error messages.  I'm experimenting to find cases where we will get
more detailed information from app launch failures and will start
by logging both to the console.



Added: 


Modified: 
lldb/tools/debugserver/source/MacOSX/MachProcess.mm

Removed: 




diff  --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm 
b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
index c862de973829..032f2a877903 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -164,16 +164,18 @@ static bool 
CallBoardSystemServiceOpenApplication(NSString *bundleIDNSStr,
[(NSString *)[bks_error localizedDescription] UTF8String];
if (error_str) {
  open_app_error_string = error_str;
+ DNBLogError("In app launch attempt, got error "
+ "localizedDescription '%s'.", error_str);
+ const char *obj_desc = 
+  [NSString stringWithFormat:@"%@", bks_error].UTF8String;
+ DNBLogError("In app launch attempt, got error "
+ "NSError object description: '%s'.",
+ obj_desc);
}
DNBLogThreadedIf(LOG_PROCESS, "In completion handler for send "
  "event, got error \"%s\"(%ld).",
 error_str ? error_str : "",
 open_app_error);
-   // REMOVE ME
-   DNBLogError("In completion handler for send event, got error "
-   "\"%s\"(%ld).",
-   error_str ? error_str : "",
-   open_app_error);
  }
 
  [system_service release];



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 0274c79 - [lldb/Utils] Serialize exit code in lldb-repro.py

2020-05-05 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2020-05-05T16:05:49-07:00
New Revision: 0274c797c65a720010aee7f40cff621cd993ba15

URL: 
https://github.com/llvm/llvm-project/commit/0274c797c65a720010aee7f40cff621cd993ba15
DIFF: 
https://github.com/llvm/llvm-project/commit/0274c797c65a720010aee7f40cff621cd993ba15.diff

LOG: [lldb/Utils] Serialize exit code in lldb-repro.py

After 61d5b0e66394 more shell test are expected to exit with a non-zero
status code. Because the exit status is computed in the driver and not
behind the SB API layer, reproducers don't know about it and always
return 0 unless replay failed.

This discrepancy means that these tests don't work with lldb-repro.py
and skipping them for this reason would be a pity. To solve this
problem, the script now serializes the exit code during capture and
returns that during replay.

These is an assert that ensures that replay exits with a zero exit
status to prevent replay failures from being silently ignored.

Added: 


Modified: 
lldb/utils/lldb-repro/lldb-repro.py

Removed: 




diff  --git a/lldb/utils/lldb-repro/lldb-repro.py 
b/lldb/utils/lldb-repro/lldb-repro.py
index fddd65ee093c..2244e97a0ff1 100755
--- a/lldb/utils/lldb-repro/lldb-repro.py
+++ b/lldb/utils/lldb-repro/lldb-repro.py
@@ -44,10 +44,8 @@ def main():
 # Create a new lldb invocation with capture or replay enabled.
 lldb = os.path.join(os.path.dirname(sys.argv[0]), 'lldb')
 new_args = [lldb]
-cleanup = False
 if sys.argv[1] == "replay":
 new_args.extend(['--replay', reproducer_path])
-cleanup = True
 elif sys.argv[1] == "capture":
 new_args.extend([
 '--capture', '--capture-path', reproducer_path,
@@ -59,8 +57,19 @@ def main():
 return 1
 
 exit_code = subprocess.call(new_args)
-if cleanup:
+
+# The driver always exists with a zero exit code during replay. Store the
+# exit code and return that for tests that expect a non-zero exit code.
+exit_code_path = os.path.join(reproducer_path, 'exit_code.txt')
+if sys.argv[1] == "replay":
+with open(exit_code_path, 'r') as f:
+assert exit_code == 0
+exit_code = int(f.read())
 shutil.rmtree(reproducer_path, True)
+elif sys.argv[1] == "capture":
+with open(exit_code_path, 'w') as f:
+f.write('%d' % exit_code)
+
 return exit_code
 
 



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D76906: [lldb] Fixing the bug that the "log timer" has no tab completion

2020-05-05 Thread Shu Anzai via Phabricator via lldb-commits
gedatsu217 added a comment.

I performed a factory reset for OS upgrade and rebuild LLDB, and solved this 
problem. Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76906/new/

https://reviews.llvm.org/D76906



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits