Re: [Lldb-commits] [lldb] r259611 - The compiler may use "line number 0" to indicate compiler generated goo that it can't

2016-02-04 Thread Pavel Labath via lldb-commits
+1 for using IR for hand-crafting tricky functions.


On 3 February 2016 at 22:01, Adrian Prantl via lldb-commits
 wrote:
>
> On Feb 3, 2016, at 1:58 PM, Zachary Turner  wrote:
>
> I was thinking of a really trivial function that just returned an int or
> something.  But then again, I don't really know how to write LLVM IR myself
> so I was just going off of what other people told me would be possible.  I
> could be wrong :)
>
>
> I’m not saying that it is impossible to find such a function, but keep in
> mind that even the size of int is baked into the IR.
>
> -- adrian
>
>
> Maybe not worth worrying about if clang never generates this type of code
> anyway, just an idea.
>
> On Wed, Feb 3, 2016 at 1:35 PM Adrian Prantl  wrote:
>>
>> For context, here are the relevant LLVM discussions:
>> http://reviews.llvm.org/D16569 (D16569: Emit line 0 line information for
>> interesting 'orphan’ instructions)
>> http://reviews.llvm.org/D9887 [DebugInfo][FastISel] Prevent using debug
>> location from previous block for local values
>>
>> On Feb 3, 2016, at 12:56 PM, Zachary Turner  wrote:
>>
>> (Also, if clang is not generating code like this currently, maybe it's not
>> a priority, but seems worth mentioning the technique anyway, since it could
>> have a lot of use for these types of scenarios)
>>
>> On Wed, Feb 3, 2016 at 12:54 PM Zachary Turner  wrote:
>>>
>>> I asked around a little bit, and it seems like you do this by
>>> hand-writing some LLVM IR (limiting yourself to a subset that is
>>> sufficiently platform independent) and having clang link that in alongside a
>>> regular executable.  Then call your LLVM IR function from C++ and step over
>>> it.  Would that work?
>>
>>
>> LLVM IR is nowhere near platform independent enough for this to be
>> portable. Of course having a test for a single target is probably still
>> better than having no test. I’m not sure if the effort of maintaining
>> textual IR (which tends to change a lot) in the LLDB testsuite is worth it.
>> Another option (not any less messy) would be to compile the test to
>> assembler with -S insert a .loc 0 before assembling the file.
>>
>> -- adrian
>>
>>>
>>> You'd probably need to talk to one of the LLVM guys to figure out how to
>>> do that, but it seems like it should work.
>>>
>>> Assuming it does, this technique would also open the door to writing a
>>> lot of test cases that have historically been very difficult to write (such
>>> as unwinder tests that need frames to be constructed a specific way, etc).
>>>
>>>
>>>
>>> On Tue, Feb 2, 2016 at 5:31 PM Jim Ingham  wrote:

 I don't think Clang does this right now, but Adrian says they are
 considering doing it to solve some problems they have with keeping track of
 nested inlines.

 Swift does it, but the compiler makes no guarantees as to when this will
 happen.  It isn't controlled by some pragma, builtin or whatever.  So I 
 know
 some places where it will happen today, but there's no guarantee it will
 continue to happen in the future.  So I'll have to write a test that works
 with the current compiler, and fails if the compiler changes so the 
 relevant
 function no longer has line number 0 code right after the prologue.  Yuck!

 I don't think it will be any different with clang when/if it starts
 doing this.

 Jim


 > On Feb 2, 2016, at 4:14 PM, Zachary Turner  wrote:
 >
 > Shouldn't it be possible to force clang to generate code like this?
 > If so couldn't you write a test for this by stepping over a function call
 > which has this kind of code in it?
 >
 > On Tue, Feb 2, 2016 at 4:11 PM Jim Ingham via lldb-commits
 >  wrote:
 > Author: jingham
 > Date: Tue Feb  2 18:07:23 2016
 > New Revision: 259611
 >
 > URL: http://llvm.org/viewvc/llvm-project?rev=259611&view=rev
 > Log:
 > The compiler may use "line number 0" to indicate compiler generated
 > goo that it can't
 > track a source for.  When we are pushing breakpoints and stepping past
 > function prologues,
 > also push past code from line 0 immediately following the prologue
 > end.
 >
 > 
 >
 > Modified:
 > lldb/trunk/include/lldb/Symbol/Function.h
 > lldb/trunk/source/Symbol/Function.cpp
 >
 > Modified: lldb/trunk/include/lldb/Symbol/Function.h
 > URL:
 > http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Function.h?rev=259611&r1=259610&r2=259611&view=diff
 >
 > ==
 > --- lldb/trunk/include/lldb/Symbol/Function.h (original)
 > +++ lldb/trunk/include/lldb/Symbol/Function.h Tue Feb  2 18:07:23 2016
 > @@ -574,6 +574,14 @@ public:
 >  CompilerType
 >  GetCompilerType ();
 >
 > +
 > //--
 > +/// Get the size of the prol

Re: [Lldb-commits] [PATCH] D16872: Move some of the common decorators to decorators.py

2016-02-04 Thread Pavel Labath via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

I think it's a good idea. I haven't given it a spin, but I think we can fix up 
any breakages from this on the fly.


http://reviews.llvm.org/D16872



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


[Lldb-commits] [lldb] r259773 - [RenderScript] Add command for recalculating allocation details

2016-02-04 Thread Ewan Crawford via lldb-commits
Author: ewancrawford
Date: Thu Feb  4 03:44:23 2016
New Revision: 259773

URL: http://llvm.org/viewvc/llvm-project?rev=259773&view=rev
Log:
[RenderScript] Add command for recalculating allocation details

Patch replaces the --refresh flag removed in r258800 with it's own command, 
'language renderscript allocation refresh'.
Since there is no reason this functionality should be tied to another command 
as an option. 
The command itself simply re-JITs all our cached information about allocations.

Modified:

lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=259773&r1=259772&r2=259773&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
 Thu Feb  4 03:44:23 2016
@@ -2861,6 +2861,30 @@ RenderScriptRuntime::DumpAllocation(Stre
 return true;
 }
 
+// Function recalculates all our cached information about allocations by 
jitting the
+// RS runtime regarding each allocation we know about.
+// Returns true if all allocations could be recomputed, false otherwise.
+bool
+RenderScriptRuntime::RecomputeAllAllocations(Stream &strm, StackFrame 
*frame_ptr)
+{
+bool success = true;
+for (auto &alloc : m_allocations)
+{
+// JIT current allocation information
+if (!RefreshAllocation(alloc.get(), frame_ptr))
+{
+strm.Printf("Error: Couldn't evaluate details for allocation %" 
PRIu32 "\n", alloc->id);
+success = false;
+}
+}
+
+if (success)
+strm.Printf("All allocations successfully recomputed");
+strm.EOL();
+
+return success;
+}
+
 // Prints information regarding currently loaded allocations.
 // These details are gathered by jitting the runtime, which has as latency.
 // Index parameter specifies a single allocation ID to print, or a zero value 
to print them all
@@ -4036,6 +4060,39 @@ public:
 }
 };
 
+class CommandObjectRenderScriptRuntimeAllocationRefresh : public 
CommandObjectParsed
+{
+public:
+CommandObjectRenderScriptRuntimeAllocationRefresh(CommandInterpreter 
&interpreter)
+: CommandObjectParsed(interpreter, "renderscript allocation refresh",
+  "Recomputes the details of all allocations.", 
"renderscript allocation refresh",
+  eCommandRequiresProcess | 
eCommandProcessMustBeLaunched)
+{
+}
+
+~CommandObjectRenderScriptRuntimeAllocationRefresh() override = default;
+
+bool
+DoExecute(Args &command, CommandReturnObject &result) override
+{
+RenderScriptRuntime *runtime = static_cast(
+
m_exe_ctx.GetProcessPtr()->GetLanguageRuntime(eLanguageTypeExtRenderScript));
+
+bool success = 
runtime->RecomputeAllAllocations(result.GetOutputStream(), 
m_exe_ctx.GetFramePtr());
+
+if (success)
+{
+result.SetStatus(eReturnStatusSuccessFinishResult);
+return true;
+}
+else
+{
+result.SetStatus(eReturnStatusFailed);
+return false;
+}
+}
+};
+
 class CommandObjectRenderScriptRuntimeAllocation : public 
CommandObjectMultiword
 {
 public:
@@ -4047,6 +4104,7 @@ public:
 LoadSubCommand("dump", CommandObjectSP(new 
CommandObjectRenderScriptRuntimeAllocationDump(interpreter)));
 LoadSubCommand("save", CommandObjectSP(new 
CommandObjectRenderScriptRuntimeAllocationSave(interpreter)));
 LoadSubCommand("load", CommandObjectSP(new 
CommandObjectRenderScriptRuntimeAllocationLoad(interpreter)));
+LoadSubCommand("refresh", CommandObjectSP(new 
CommandObjectRenderScriptRuntimeAllocationRefresh(interpreter)));
 }
 
 ~CommandObjectRenderScriptRuntimeAllocation() override = default;

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h?rev=259773&r1=259772&r2=259773&view=diff
==
--- 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
 Thu Feb  4 03:44:23 2016
@@ -209,6 +209,9 @@ public:
 void
 ListAllocations(

[Lldb-commits] [lldb] r259774 - Add verbose logging support to gdb-remote tests

2016-02-04 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Feb  4 03:53:33 2016
New Revision: 259774

URL: http://llvm.org/viewvc/llvm-project?rev=259774&view=rev
Log:
Add verbose logging support to gdb-remote tests

Summary:
gdb-remote tests are not able to use the same logging mechanisms as the rest of 
our tests, and
currently we get no host logs from them, even though the tests themselves have 
logging
capability. This commit changes that. When user specifies that he would like to 
log the
gdb-remote channel (--channel gdb-remote argument to dotest.py), we write 
detailed logs to the
-host.log file, just like we would in the case of regular tests. If 
this argument is not
specified, we only log the serious messages to stderr, which matches the 
existing behaviour.

Reviewers: tfiala, tberghammer

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16858

Modified:

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py?rev=259774&r1=259773&r2=259774&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
 Thu Feb  4 03:53:33 2016
@@ -30,9 +30,6 @@ class GdbRemoteTestCaseBase(TestBase):
 
 _GDBREMOTE_KILL_PACKET = "$k#6b"
 
-_LOGGING_LEVEL = logging.WARNING
-# _LOGGING_LEVEL = logging.DEBUG
-
 # Start the inferior separately, attach to the inferior on the stub 
command line.
 _STARTUP_ATTACH = "attach"
 # Start the inferior separately, start the stub without attaching, allow 
the test to attach to the inferior however it wants (e.g. $vAttach;pid).
@@ -48,12 +45,42 @@ class GdbRemoteTestCaseBase(TestBase):
 TARGET_EXC_SOFTWARE= 0x95
 TARGET_EXC_BREAKPOINT  = 0x96
 
+_verbose_log_handler = None
+_log_formatter = logging.Formatter(fmt='%(asctime)-15s %(levelname)-8s 
%(message)s')
+
+def setUpBaseLogging(self):
+self.logger = logging.getLogger(__name__)
+
+if len(self.logger.handlers) > 0:
+return # We have set up this handler already
+
+self.logger.propagate = False
+self.logger.setLevel(logging.DEBUG)
+
+# log all warnings to stderr
+handler = logging.StreamHandler()
+handler.setLevel(logging.WARNING)
+handler.setFormatter(self._log_formatter)
+self.logger.addHandler(handler)
+
+
+def isVerboseLoggingRequested(self):
+# We will report our detailed logs if the user requested that the 
"gdb-remote" channel is
+# logged.
+return any(("gdb-remote" in channel) for channel in 
lldbtest_config.channels)
+
 def setUp(self):
 TestBase.setUp(self)
-FORMAT = '%(asctime)-15s %(levelname)-8s %(message)s'
-logging.basicConfig(format=FORMAT)
-self.logger = logging.getLogger(__name__)
-self.logger.setLevel(self._LOGGING_LEVEL)
+
+self.setUpBaseLogging()
+
+if self.isVerboseLoggingRequested():
+# If requested, full logs go to a log file
+self._verbose_log_handler = logging.FileHandler(self.log_basename 
+ "-host.log")
+self._verbose_log_handler.setFormatter(self._log_formatter)
+self._verbose_log_handler.setLevel(logging.DEBUG)
+self.logger.addHandler(self._verbose_log_handler)
+
 self.test_sequence = GdbRemoteTestSequence(self.logger)
 self.set_inferior_startup_launch()
 self.port = self.get_next_port()
@@ -76,6 +103,11 @@ class GdbRemoteTestCaseBase(TestBase):
 else:
 self.stub_hostname = "localhost"
 
+def tearDown(self):
+self.logger.removeHandler(self._verbose_log_handler)
+self._verbose_log_handler = None
+TestBase.tearDown(self)
+
 def get_next_port(self):
 return 12000 + random.randint(0,3999)
 


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


[Lldb-commits] [lldb] r259775 - Mark TestProcessIO as flaky on android

2016-02-04 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Feb  4 03:53:37 2016
New Revision: 259775

URL: http://llvm.org/viewvc/llvm-project?rev=259775&view=rev
Log:
Mark TestProcessIO as flaky on android

previously, I have marked only one test as flaky, but now I noticed another 
test failing with the
same error. I am going to assume all of them are flaky.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py?rev=259775&r1=259774&r2=259775&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
 Thu Feb  4 03:53:37 2016
@@ -29,6 +29,7 @@ class ProcessIOTestCase(TestBase):
 
 @skipIfWindows # stdio manipulation unsupported on Windows
 @add_test_categories(['pyapi'])
+@expectedFlakeyAndroid(bugnumber="llvm.org/pr26437", api_levels=[21,22])
 def test_stdin_by_api(self):
 """Exercise SBProcess.PutSTDIN()."""
 self.build()
@@ -39,7 +40,7 @@ class ProcessIOTestCase(TestBase):
 
 @skipIfWindows # stdio manipulation unsupported on Windows
 @add_test_categories(['pyapi'])
-@expectedFlakeyAndroid(bugnumber="llvm.org/pr26437", archs=["aarch64"], 
api_levels=[21])
+@expectedFlakeyAndroid(bugnumber="llvm.org/pr26437", api_levels=[21,22])
 def test_stdin_redirection(self):
 """Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without 
specifying STDOUT or STDERR."""
 self.build()
@@ -51,6 +52,7 @@ class ProcessIOTestCase(TestBase):
 
 @skipIfWindows # stdio manipulation unsupported on Windows
 @add_test_categories(['pyapi'])
+@expectedFlakeyAndroid(bugnumber="llvm.org/pr26437", api_levels=[21,22])
 def test_stdout_redirection(self):
 """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without 
specifying STDIN or STDERR."""
 self.build()
@@ -63,6 +65,7 @@ class ProcessIOTestCase(TestBase):
 
 @skipIfWindows # stdio manipulation unsupported on Windows
 @add_test_categories(['pyapi'])
+@expectedFlakeyAndroid(bugnumber="llvm.org/pr26437", api_levels=[21,22])
 def test_stderr_redirection(self):
 """Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without 
specifying STDIN or STDOUT."""
 self.build()
@@ -75,6 +78,7 @@ class ProcessIOTestCase(TestBase):
 
 @skipIfWindows # stdio manipulation unsupported on Windows
 @add_test_categories(['pyapi'])
+@expectedFlakeyAndroid(bugnumber="llvm.org/pr26437", api_levels=[21,22])
 def test_stdout_stderr_redirection(self):
 """Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR 
without redirecting STDIN."""
 self.build()


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


Re: [Lldb-commits] [PATCH] D16858: Add verbose logging support to gdb-remote tests

2016-02-04 Thread Pavel Labath via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL259774: Add verbose logging support to gdb-remote tests 
(authored by labath).

Changed prior to commit:
  http://reviews.llvm.org/D16858?vs=46795&id=46884#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16858

Files:
  
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Index: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -30,9 +30,6 @@
 
 _GDBREMOTE_KILL_PACKET = "$k#6b"
 
-_LOGGING_LEVEL = logging.WARNING
-# _LOGGING_LEVEL = logging.DEBUG
-
 # Start the inferior separately, attach to the inferior on the stub 
command line.
 _STARTUP_ATTACH = "attach"
 # Start the inferior separately, start the stub without attaching, allow 
the test to attach to the inferior however it wants (e.g. $vAttach;pid).
@@ -48,12 +45,42 @@
 TARGET_EXC_SOFTWARE= 0x95
 TARGET_EXC_BREAKPOINT  = 0x96
 
+_verbose_log_handler = None
+_log_formatter = logging.Formatter(fmt='%(asctime)-15s %(levelname)-8s 
%(message)s')
+
+def setUpBaseLogging(self):
+self.logger = logging.getLogger(__name__)
+
+if len(self.logger.handlers) > 0:
+return # We have set up this handler already
+
+self.logger.propagate = False
+self.logger.setLevel(logging.DEBUG)
+
+# log all warnings to stderr
+handler = logging.StreamHandler()
+handler.setLevel(logging.WARNING)
+handler.setFormatter(self._log_formatter)
+self.logger.addHandler(handler)
+
+
+def isVerboseLoggingRequested(self):
+# We will report our detailed logs if the user requested that the 
"gdb-remote" channel is
+# logged.
+return any(("gdb-remote" in channel) for channel in 
lldbtest_config.channels)
+
 def setUp(self):
 TestBase.setUp(self)
-FORMAT = '%(asctime)-15s %(levelname)-8s %(message)s'
-logging.basicConfig(format=FORMAT)
-self.logger = logging.getLogger(__name__)
-self.logger.setLevel(self._LOGGING_LEVEL)
+
+self.setUpBaseLogging()
+
+if self.isVerboseLoggingRequested():
+# If requested, full logs go to a log file
+self._verbose_log_handler = logging.FileHandler(self.log_basename 
+ "-host.log")
+self._verbose_log_handler.setFormatter(self._log_formatter)
+self._verbose_log_handler.setLevel(logging.DEBUG)
+self.logger.addHandler(self._verbose_log_handler)
+
 self.test_sequence = GdbRemoteTestSequence(self.logger)
 self.set_inferior_startup_launch()
 self.port = self.get_next_port()
@@ -76,6 +103,11 @@
 else:
 self.stub_hostname = "localhost"
 
+def tearDown(self):
+self.logger.removeHandler(self._verbose_log_handler)
+self._verbose_log_handler = None
+TestBase.tearDown(self)
+
 def get_next_port(self):
 return 12000 + random.randint(0,3999)
 


Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -30,9 +30,6 @@
 
 _GDBREMOTE_KILL_PACKET = "$k#6b"
 
-_LOGGING_LEVEL = logging.WARNING
-# _LOGGING_LEVEL = logging.DEBUG
-
 # Start the inferior separately, attach to the inferior on the stub command line.
 _STARTUP_ATTACH = "attach"
 # Start the inferior separately, start the stub without attaching, allow the test to attach to the inferior however it wants (e.g. $vAttach;pid).
@@ -48,12 +45,42 @@
 TARGET_EXC_SOFTWARE= 0x95
 TARGET_EXC_BREAKPOINT  = 0x96
 
+_verbose_log_handler = None
+_log_formatter = logging.Formatter(fmt='%(asctime)-15s %(levelname)-8s %(message)s')
+
+def setUpBaseLogging(self):
+self.logger = logging.getLogger(__name__)
+
+if len(self.logger.handlers) > 0:
+return # We have set up this handler already
+
+self.logger.propagate = False
+self.logger.setLevel(logging.DEBUG)
+
+# log all warnings to stderr
+handler = logging.StreamHandler()
+handler.setLevel(logging.WARNING)
+handler.setFormatter(self._log_formatter)
+self.logger.addHandler(handler)
+
+
+def isVerboseLoggingRequested(self):
+# We will report our detailed logs if the user requested that the "gdb-remote" channel is
+# logged.
+return any(("gdb-remote" in channel) for channel in lldbtest_config.channels)
+
  

Re: [Lldb-commits] [PATCH] D16858: Add verbose logging support to gdb-remote tests

2016-02-04 Thread Pavel Labath via lldb-commits
labath added a comment.

In http://reviews.llvm.org/D16858#343140, @tfiala wrote:

> BTW I was planning on re-organizing the lldb-server/debugserver tests 
> sometime in the near future to break them into many different directories and 
> pull off the dsym/dwarf/dwo changes for the many tests where that doesn't 
> matter.


I think that basically none of these tests rely on debug info, and we can 
remove the debug info duplication entirely. Unfortunately, the only way right 
now is to annotate each function with `@no_debug_info_test`, so I have been 
waiting until I get a chance to make that decorator work on classes.

That should cut the running time in half, so then you may not even need to 
split stuff out more...


Repository:
  rL LLVM

http://reviews.llvm.org/D16858



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


Re: [Lldb-commits] [PATCH] D16814: Fix handling of the arm IT instruction in the unwinder

2016-02-04 Thread Tamas Berghammer via lldb-commits
tberghammer added inline comments.


Comment at: include/lldb/Core/EmulateInstruction.h:390
@@ +389,3 @@
+typedef uint32_t InstructionCondition;
+static const InstructionCondition UnconditionalCondition = UINT32_MAX;
+

clayborg wrote:
> It is nice to tell when something is a constant (prefixed with "k"), a 
> member variable (prefixed with "m_"), typenames are camel case, variables 
> should be lower cased with underscores. That is our current coding convention.
> 
> I would like to see this be
> 
> ```
> static const InstructionCondition k_unconditional_condition = UINT32_MAX;
> ```
> 
It is a public, static member variable so I think we should use CamelCase and 
not snake_case and I don't see where I can add a k prefix into it 
(KInstructionCondition?) Also as (almost) all static member is cons inside LLDB 
I don't think it will be confusing


http://reviews.llvm.org/D16814



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


[Lldb-commits] [lldb] r259777 - Enable test_lldbmi_settings_set_target_run_args_before on linux

2016-02-04 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Feb  4 05:51:07 2016
New Revision: 259777

URL: http://llvm.org/viewvc/llvm-project?rev=259777&view=rev
Log:
Enable test_lldbmi_settings_set_target_run_args_before on linux

Test has passed last 200 runs of the build bot.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py?rev=259777&r1=259776&r2=259777&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
 Thu Feb  4 05:51:07 2016
@@ -55,7 +55,6 @@ class MiInterpreterExecTestCase(lldbmi_t
 
 @skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread 
races
-@expectedFailureLinux  # Failing in ~9/600 dosep runs (build 3120-3122)
 def test_lldbmi_settings_set_target_run_args_before(self):
 """Test that 'lldb-mi --interpreter' can set target arguments by 
'setting set target.run-args' command before than target was created."""
 


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


Re: [Lldb-commits] [PATCH] D16853: Use BKPT instead of UDF for arm/thumb breakpoints

2016-02-04 Thread Tamas Berghammer via lldb-commits
tberghammer updated this revision to Diff 46899.
tberghammer added a comment.

Update breakpoint opcodes based on review


http://reviews.llvm.org/D16853

Files:
  source/Plugins/Platform/Linux/PlatformLinux.cpp
  source/Plugins/Process/Linux/NativeProcessLinux.cpp

Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp
===
--- source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1294,8 +1294,10 @@
 break;
 }
 
-// Otherwise, report step over
-MonitorTrace(thread);
+if (m_arch.GetMachine() == llvm::Triple::arm)
+MonitorBreakpoint(thread); // Arm linux reports trace for 
breakpoint hits
+else
+MonitorTrace(thread); // Report the trace
 break;
 }
 
@@ -2289,13 +2291,11 @@
 // FIXME put this behind a breakpoint protocol class that can be set per
 // architecture.  Need MIPS support here.
 static const uint8_t g_aarch64_opcode[] = { 0x00, 0x00, 0x20, 0xd4 };
-// The ARM reference recommends the use of 0xe7fddefe and 0xdefe but the
-// linux kernel does otherwise.
-static const uint8_t g_arm_breakpoint_opcode[] = { 0xf0, 0x01, 0xf0, 0xe7 
};
+static const uint8_t g_arm_breakpoint_opcode[] = { 0x70, 0xbe, 0x20, 0xe1 
};
 static const uint8_t g_i386_opcode [] = { 0xCC };
 static const uint8_t g_mips64_opcode[] = { 0x00, 0x00, 0x00, 0x0d };
 static const uint8_t g_mips64el_opcode[] = { 0x0d, 0x00, 0x00, 0x00 };
-static const uint8_t g_thumb_breakpoint_opcode[] = { 0x01, 0xde };
+static const uint8_t g_thumb_breakpoint_opcode[] = { 0x70, 0xbe };
 
 switch (m_arch.GetMachine ())
 {
Index: source/Plugins/Platform/Linux/PlatformLinux.cpp
===
--- source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -560,10 +560,8 @@
 break;
 case llvm::Triple::arm:
 {
-// The ARM reference recommends the use of 0xe7fddefe and 0xdefe
-// but the linux kernel does otherwise.
-static const uint8_t g_arm_breakpoint_opcode[] = { 0xf0, 0x01, 
0xf0, 0xe7 };
-static const uint8_t g_thumb_breakpoint_opcode[] = { 0x01, 0xde };
+static const uint8_t g_arm_breakpoint_opcode[] = { 0x70, 0xbe, 
0x20, 0xe1 };
+static const uint8_t g_thumb_breakpoint_opcode[] = { 0x70, 0xbe };
 
 lldb::BreakpointLocationSP bp_loc_sp (bp_site->GetOwnerAtIndex 
(0));
 AddressClass addr_class = eAddressClassUnknown;


Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp
===
--- source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1294,8 +1294,10 @@
 break;
 }
 
-// Otherwise, report step over
-MonitorTrace(thread);
+if (m_arch.GetMachine() == llvm::Triple::arm)
+MonitorBreakpoint(thread); // Arm linux reports trace for breakpoint hits
+else
+MonitorTrace(thread); // Report the trace
 break;
 }
 
@@ -2289,13 +2291,11 @@
 // FIXME put this behind a breakpoint protocol class that can be set per
 // architecture.  Need MIPS support here.
 static const uint8_t g_aarch64_opcode[] = { 0x00, 0x00, 0x20, 0xd4 };
-// The ARM reference recommends the use of 0xe7fddefe and 0xdefe but the
-// linux kernel does otherwise.
-static const uint8_t g_arm_breakpoint_opcode[] = { 0xf0, 0x01, 0xf0, 0xe7 };
+static const uint8_t g_arm_breakpoint_opcode[] = { 0x70, 0xbe, 0x20, 0xe1 };
 static const uint8_t g_i386_opcode [] = { 0xCC };
 static const uint8_t g_mips64_opcode[] = { 0x00, 0x00, 0x00, 0x0d };
 static const uint8_t g_mips64el_opcode[] = { 0x0d, 0x00, 0x00, 0x00 };
-static const uint8_t g_thumb_breakpoint_opcode[] = { 0x01, 0xde };
+static const uint8_t g_thumb_breakpoint_opcode[] = { 0x70, 0xbe };
 
 switch (m_arch.GetMachine ())
 {
Index: source/Plugins/Platform/Linux/PlatformLinux.cpp
===
--- source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -560,10 +560,8 @@
 break;
 case llvm::Triple::arm:
 {
-// The ARM reference recommends the use of 0xe7fddefe and 0xdefe
-// but the linux kernel does otherwise.
-static const uint8_t g_arm_breakpoint_opcode[] = { 0xf0, 0x01, 0xf0, 0xe7 };
-static const uint8_t g_thumb_breakpoint_opcode[] = { 0x01, 0xde };
+static const uint8_t g_arm_breakpoint_opcode[] = { 0x70, 0xbe, 0x20, 0xe1 };
+static const uint8_t g_thumb_breakpoint_opcode[] = { 0x70, 0xbe };
 
 lldb::BreakpointLo

Re: [Lldb-commits] [PATCH] D16872: Move some of the common decorators to decorators.py

2016-02-04 Thread Tamas Berghammer via lldb-commits
tberghammer accepted this revision.
tberghammer added a comment.

Looks reasonable



Comment at: packages/Python/lldbsuite/test/lldbtest.py:672-682
@@ -768,1 +671,13 @@
+
+def skipUnlessListedRemote(remote_list=None):
+def is_remote_unlisted(self):
+if remote_list and lldb.remote_platform:
+triple = self.dbg.GetSelectedPlatform().GetTriple()
+for r in remote_list:
+if r in triple:
+return None
+return "skipping because remote is not listed"
+else:
+return None
+return decorators.skipTestIfFn(is_remote_unlisted)
 

I think Pavel intentionally removed this function in a recent CL. Please don't 
add it back


http://reviews.llvm.org/D16872



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


Re: [Lldb-commits] [PATCH] D16840: [LLDB][MIPS] Generalise MIPS arch names

2016-02-04 Thread Nitesh Jain via lldb-commits
nitesh.jain marked an inline comment as done.


Comment at: 
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py:24
@@ -23,3 +23,3 @@
 @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64'])
-@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el'])# 
IO error due to breakpoint at invalid address
+@expectedFailureAll(triple = 'mips')# IO error due to breakpoint at 
invalid address
 def test_step_inst_with(self):

Retain the triple checking logic . since expectedFailureAll doesn't yet support 
regular expressions for archs parameter.


Comment at: 
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py:34
@@ -33,3 +33,3 @@
 @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - 
Watchpoints not supported on Windows
-@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # Most 
of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are 
not supported yet
+@expectedFailureAll(triple = 'mips') # Most of the MIPS boards provide 
only one H/W watchpoints, and S/W watchpoints are not supported yet
 def test_hello_watchlocation(self):

Retain the triple checking logic . since expectedFailureAll doesn't yet support 
regular expressions for archs parameter.


Repository:
  rL LLVM

http://reviews.llvm.org/D16840



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


Re: [Lldb-commits] [PATCH] D16840: [LLDB][MIPS] Generalise MIPS arch names

2016-02-04 Thread Nitesh Jain via lldb-commits
nitesh.jain updated the summary for this revision.
nitesh.jain updated this revision to Diff 46913.
nitesh.jain added a comment.

Updated as per the suggestion.


Repository:
  rL LLVM

http://reviews.llvm.org/D16840

Files:
  
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
  
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
  
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py

Index: 
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
===
--- 
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
+++ 
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
@@ -73,7 +73,7 @@
 
 # Most of the MIPS boards provide only one H/W watchpoints, and S/W 
watchpoints are not supported yet
 arch = self.getArchitecture()
-if arch in ['mips', 'mipsel', 'mips64', 'mips64el']:
+if re.match("^mips",arch):
 self.runCmd("watchpoint delete 1")
 
 # resolve_location=True, read=False, write=True
Index: 
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
===
--- 
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
+++ 
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
@@ -31,7 +31,7 @@
 
 @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not 
supported
 @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - 
Watchpoints not supported on Windows
-@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # Most 
of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are 
not supported yet
+@expectedFailureAll(triple = 'mips') # Most of the MIPS boards provide 
only one H/W watchpoints, and S/W watchpoints are not supported yet
 def test_hello_watchlocation(self):
 """Test watching a location with '-s size' option."""
 self.build(dictionary=self.d)
Index: 
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
===
--- 
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
+++ 
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
@@ -21,7 +21,7 @@
 
 @expectedFailureWindows("llvm.org/pr24778")
 @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64'])
-@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el'])# 
IO error due to breakpoint at invalid address
+@expectedFailureAll(triple = 'mips')# IO error due to breakpoint at 
invalid address
 def test_step_inst_with(self):
 """Test thread creation during step-inst handling."""
 self.build(dictionary=self.getBuildFlags())


Index: packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
===
--- packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
+++ packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
@@ -73,7 +73,7 @@
 
 # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet
 arch = self.getArchitecture()
-if arch in ['mips', 'mipsel', 'mips64', 'mips64el']:
+if re.match("^mips",arch):
 self.runCmd("watchpoint delete 1")
 
 # resolve_location=True, read=False, write=True
Index: packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
===
--- packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
+++ packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
@@ -31,7 +31,7 @@
 
 @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
 @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
-@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet
+@expectedFailureAll(triple = 'mips') # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet
 def test_hello_watchlocation(self):
 

[Lldb-commits] [lldb] r259793 - Provide arguments for all the format string placeholders!

2016-02-04 Thread Adrian McCarthy via lldb-commits
Author: amccarth
Date: Thu Feb  4 09:35:55 2016
New Revision: 259793

URL: http://llvm.org/viewvc/llvm-project?rev=259793&view=rev
Log:
Provide arguments for all the format string placeholders!

Log message was wrong because an argument was missing.

Modified:
lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp

Modified: lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp?rev=259793&r1=259792&r2=259793&view=diff
==
--- lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp 
(original)
+++ lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp Thu 
Feb  4 09:35:55 2016
@@ -189,7 +189,7 @@ ProcessWindowsLive::DisableBreakpointSit
 {
 WINLOG_IFALL(WINDOWS_LOG_BREAKPOINTS, "DisableBreakpointSite called with 
bp_site 0x%p "
   "(id=%d, addr=0x%x)",
- bp_site->GetID(), bp_site->GetLoadAddress());
+ bp_site, bp_site->GetID(), bp_site->GetLoadAddress());
 
 Error error = DisableSoftwareBreakpoint(bp_site);
 


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


Re: [Lldb-commits] [PATCH] D16840: [LLDB][MIPS] Generalise MIPS arch names

2016-02-04 Thread Nitesh Jain via lldb-commits
nitesh.jain updated this revision to Diff 46919.
nitesh.jain added a comment.

updates diff with triple =re.compile('^mips') to check if architecture string 
starts with mips.


Repository:
  rL LLVM

http://reviews.llvm.org/D16840

Files:
  
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
  
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
  
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py

Index: 
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
===
--- 
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
+++ 
packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
@@ -73,7 +73,7 @@
 
 # Most of the MIPS boards provide only one H/W watchpoints, and S/W 
watchpoints are not supported yet
 arch = self.getArchitecture()
-if arch in ['mips', 'mipsel', 'mips64', 'mips64el']:
+if re.match("^mips",arch):
 self.runCmd("watchpoint delete 1")
 
 # resolve_location=True, read=False, write=True
Index: 
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
===
--- 
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
+++ 
packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
@@ -31,7 +31,7 @@
 
 @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not 
supported
 @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - 
Watchpoints not supported on Windows
-@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # Most 
of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are 
not supported yet
+@expectedFailureAll(triple = re.compile('^mips')) # Most of the MIPS 
boards provide only one H/W watchpoints, and S/W watchpoints are not supported 
yet
 def test_hello_watchlocation(self):
 """Test watching a location with '-s size' option."""
 self.build(dictionary=self.d)
Index: 
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
===
--- 
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
+++ 
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
@@ -21,7 +21,7 @@
 
 @expectedFailureWindows("llvm.org/pr24778")
 @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64'])
-@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el'])# 
IO error due to breakpoint at invalid address
+@expectedFailureAll(triple = re.compile('^mips'))# IO error due to 
breakpoint at invalid address
 def test_step_inst_with(self):
 """Test thread creation during step-inst handling."""
 self.build(dictionary=self.getBuildFlags())


Index: packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
===
--- packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
+++ packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
@@ -73,7 +73,7 @@
 
 # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet
 arch = self.getArchitecture()
-if arch in ['mips', 'mipsel', 'mips64', 'mips64el']:
+if re.match("^mips",arch):
 self.runCmd("watchpoint delete 1")
 
 # resolve_location=True, read=False, write=True
Index: packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
===
--- packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
+++ packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
@@ -31,7 +31,7 @@
 
 @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
 @expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
-@expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet
+@expectedFailureAll(triple = re.compile('^mips')) # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported

[Lldb-commits] [lldb] r259807 - Move some of the common decorators to decorators.py.

2016-02-04 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Thu Feb  4 12:03:01 2016
New Revision: 259807

URL: http://llvm.org/viewvc/llvm-project?rev=259807&view=rev
Log:
Move some of the common decorators to decorators.py.

This doesn't attempt to move every decorator.  The reason for
this is that it requires touching every single test file to import
decorators.py.  I would like to do this in a followup patch, but
in the interest of keeping the patches as bite-sized as possible,
I've only attempted to move the underlying common decorators first.
A few tests call these directly, so those tests are updated as part
of this patch.

Added:
lldb/trunk/packages/Python/lldbsuite/support/funcutils.py
lldb/trunk/packages/Python/lldbsuite/test/decorators.py
Modified:

lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py

lldb/trunk/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py

lldb/trunk/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py

lldb/trunk/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py

lldb/trunk/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py

lldb/trunk/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py

lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py

lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py

lldb/trunk/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py
lldb/trunk/packages/Python/lldbsuite/test/lldbplatformutil.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py

Added: lldb/trunk/packages/Python/lldbsuite/support/funcutils.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/funcutils.py?rev=259807&view=auto
==
--- lldb/trunk/packages/Python/lldbsuite/support/funcutils.py (added)
+++ lldb/trunk/packages/Python/lldbsuite/support/funcutils.py Thu Feb  4 
12:03:01 2016
@@ -0,0 +1,16 @@
+from __future__ import print_function
+from __future__ import absolute_import
+
+# System modules
+import inspect
+
+# Third-party modules
+
+# LLDB modules
+
+def requires_self(func):
+func_argc = len(inspect.getargspec(func).args)
+if func_argc == 0 or (getattr(func,'im_self', None) is not None) or 
(hasattr(func, '__self__')):
+return False
+else:
+return True

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py?rev=259807&r1=259806&r2=259807&view=diff
===

[Lldb-commits] [lldb] r259810 - Use an artifical namespace so that member vars do not hide local vars.

2016-02-04 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Thu Feb  4 12:38:35 2016
New Revision: 259810

URL: http://llvm.org/viewvc/llvm-project?rev=259810&view=rev
Log:
Use an artifical namespace so that member vars do not hide local vars.

Summary:
While evaluating expressions when stopped in a class method, there was a
problem of member variables hiding local variables. This was happening
because, in the context of a method, clang already knew about member
variables with their name and assumed that they were the only variables
with those names in scope. Consequently, clang never checks with LLDB
about the possibility of local variables with the same name and goes
wrong. This change addresses the problem by using an artificial
namespace "$__lldb_local_vars". All local variables in scope are
declared in the "$__lldb_expr" method as follows:

using $__lldb_local_vars::;
using $__lldb_local_vars::;
...

This hides the member variables with the same name and forces clang to
enquire about the variables which it thinks are declared in
$__lldb_local_vars. When LLDB notices that clang is enquiring about
variables in $__lldb_local_vars, it looks up local vars and conveys
their information if found. This way, member variables do not hide local
variables, leading to correct evaluation of expressions.

A point to keep in mind is that the above solution does not solve the
problem for one specific case:

namespace N
{
int a;
}

class A
{
public:
void Method();
int a;
};

void
A::Method()
{
using N::a;
...

// Since the above solution only touches locals, it does not
// force clang to enquire about "a" coming from namespace N.
}

Reviewers: clayborg, spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16746

Added:

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
Modified:
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h
lldb/trunk/include/lldb/Symbol/TypeSystem.h
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/CompilerDeclContext.cpp
lldb/trunk/source/Symbol/TypeSystem.cpp

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=259810&r1=259809&r2=259810&view=diff
==
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Feb  4 12:38:35 2016
@@ -422,6 +422,11 @@ public:
 GetUniqueNamespaceDeclaration (const char *name,
clang::DeclContext *decl_ctx);
 
+static clang::NamespaceDecl *
+GetUniqueNamespaceDeclaration (clang::ASTContext *ast,
+   const char *name,
+   clang::DeclContext *decl_ctx);
+
 //--
 // Function Types
 //--
@@ -565,7 +570,9 @@ public:
 //--
 
 std::vector
-DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name) 
override;
+DeclContextFindDeclByName (void *opaque_decl_ctx,
+   ConstString name,
+   const bool ignore_using_decls) override;
 
 bool
 DeclContextIsStructUnionOrClass (void *opaque_decl_ctx) override;

Modified: lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h?rev=259810&r1=259809&r2=259810&view=diff
==
--- lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h Thu Feb  4 12:38:35 
2016
@@ -66,7 +66,7 @@ public:
 IsClang () const;
 
 std::vector
-FindDeclByName (ConstString name);
+FindDeclByName (ConstString name, const bool ignore_using_decls);
 
 //--
 /// Checks if this decl context represents a method of a class.

Modified: l

[Lldb-commits] [lldb] r259818 - Make HostThread SetName work on OS X. GetName doesn't currently work, the code that was in

2016-02-04 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Thu Feb  4 13:42:32 2016
New Revision: 259818

URL: http://llvm.org/viewvc/llvm-project?rev=259818&view=rev
Log:
Make HostThread SetName work on OS X.  GetName doesn't currently work, the code 
that was in
GetName actually got the queue name not the thread name and anyway didn't 
actually work to do
that.  So I just deleted it with a fixme.



Modified:
lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h
lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
lldb/trunk/source/Host/macosx/ThisThread.cpp

Modified: lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h?rev=259818&r1=259817&r2=259818&view=diff
==
--- lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h (original)
+++ lldb/trunk/include/lldb/Host/macosx/HostInfoMacOSX.h Thu Feb  4 13:42:32 
2016
@@ -32,6 +32,7 @@ class HostInfoMacOSX : public HostInfoPo
 static bool GetOSBuildString(std::string &s);
 static bool GetOSKernelDescription(std::string &s);
 static FileSpec GetProgramFileSpec();
+static uint32_t GetMaxThreadNameLength();
 
   protected:
 static bool ComputeSupportExeDirectory(FileSpec &file_spec);

Modified: lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm?rev=259818&r1=259817&r2=259818&view=diff
==
--- lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm (original)
+++ lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm Thu Feb  4 13:42:32 2016
@@ -370,3 +370,9 @@ HostInfoMacOSX::ComputeHostArchitectureS
 }
 }
 }
+
+uint32_t
+HostInfoMacOSX::GetMaxThreadNameLength()
+{
+return 64;
+}

Modified: lldb/trunk/source/Host/macosx/ThisThread.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/ThisThread.cpp?rev=259818&r1=259817&r2=259818&view=diff
==
--- lldb/trunk/source/Host/macosx/ThisThread.cpp (original)
+++ lldb/trunk/source/Host/macosx/ThisThread.cpp Thu Feb  4 13:42:32 2016
@@ -10,30 +10,20 @@
 #include "lldb/Host/ThisThread.h"
 
 #include 
+#include "llvm/ADT/SmallVector.h"
 
 using namespace lldb_private;
 
 void
 ThisThread::SetName(llvm::StringRef name)
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
-::pthread_setname_np(name);
+#if defined (__APPLE__)
+::pthread_setname_np(name.str().c_str());
 #endif
 }
 
 void
 ThisThread::GetName(llvm::SmallVectorImpl &name)
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
-char pthread_name[1024];
-dispatch_queue_t current_queue = ::dispatch_get_current_queue();
-if (current_queue != NULL)
-{
-const char *queue_name = dispatch_queue_get_label(current_queue);
-if (queue_name && queue_name[0])
-{
-name = queue_name;
-}
-}
-#endif
+// FIXME - implement this.
 }


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


[Lldb-commits] [PATCH] D16895: Revert "Use an artifical namespace so that member vars do not hide local vars."

2016-02-04 Thread Siva Chandra via lldb-commits
sivachandra created this revision.
sivachandra added a reviewer: spyffe.
sivachandra added a subscriber: lldb-commits.

This reverts commit 8af14b5f9af68c31ac80945e5b5d56f0a14b38e4.
Reverting as it breaks a few tests on Mac.

http://reviews.llvm.org/D16895

Files:
  include/lldb/Symbol/ClangASTContext.h
  include/lldb/Symbol/CompilerDeclContext.h
  include/lldb/Symbol/TypeSystem.h
  
packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
  
packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
  
packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
  source/Expression/ExpressionSourceCode.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
  source/Symbol/ClangASTContext.cpp
  source/Symbol/CompilerDeclContext.cpp
  source/Symbol/TypeSystem.cpp

Index: source/Symbol/TypeSystem.cpp
===
--- source/Symbol/TypeSystem.cpp
+++ source/Symbol/TypeSystem.cpp
@@ -153,9 +153,7 @@
 
 
 std::vector
-TypeSystem::DeclContextFindDeclByName (void *opaque_decl_ctx,
-   ConstString name,
-   bool ignore_imported_decls)
+TypeSystem::DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name)
 {
 return std::vector();
 }
Index: source/Symbol/CompilerDeclContext.cpp
===
--- source/Symbol/CompilerDeclContext.cpp
+++ source/Symbol/CompilerDeclContext.cpp
@@ -15,11 +15,10 @@
 using namespace lldb_private;
 
 std::vector
-CompilerDeclContext::FindDeclByName (ConstString name, const bool ignore_using_decls)
+CompilerDeclContext::FindDeclByName (ConstString name)
 {
 if (IsValid())
-return m_type_system->DeclContextFindDeclByName(
-m_opaque_decl_ctx, name, ignore_using_decls);
+return m_type_system->DeclContextFindDeclByName(m_opaque_decl_ctx, name);
 else
 return std::vector();
 }
Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -1885,17 +1885,6 @@
 return namespace_decl;
 }
 
-NamespaceDecl *
-ClangASTContext::GetUniqueNamespaceDeclaration (clang::ASTContext *ast,
-const char *name,
-clang::DeclContext *decl_ctx)
-{
-ClangASTContext *ast_ctx = ClangASTContext::GetASTContext(ast);
-if (ast_ctx == nullptr)
-return nullptr;
-
-return ast_ctx->GetUniqueNamespaceDeclaration(name, decl_ctx);
-}
 
 clang::BlockDecl *
 ClangASTContext::CreateBlockDeclaration (clang::DeclContext *ctx)
@@ -9792,9 +9781,7 @@
 //--
 
 std::vector
-ClangASTContext::DeclContextFindDeclByName(void *opaque_decl_ctx,
-   ConstString name,
-   const bool ignore_using_decls)
+ClangASTContext::DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name)
 {
 std::vector found_decls;
 if (opaque_decl_ctx)
@@ -9818,16 +9805,12 @@
 {
 if (clang::UsingDirectiveDecl *ud = llvm::dyn_cast(child))
 {
-if (ignore_using_decls)
-continue;
 clang::DeclContext *from = ud->getCommonAncestor();
 if (searched.find(ud->getNominatedNamespace()) == searched.end())
 search_queue.insert(std::make_pair(from, ud->getNominatedNamespace()));
 }
 else if (clang::UsingDecl *ud = llvm::dyn_cast(child))
 {
-if (ignore_using_decls)
-continue;
 for (clang::UsingShadowDecl *usd : ud->shadows())
 {
 clang::Decl *target = usd->getTargetDecl();
Index: source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
===
--- source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
+++ source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
@@ -707,9 +707,6 @@
 AddThisType(NameSearchContext &context,
 TypeFromUser &type,
 unsigned int current_id);
-
-ClangASTContext *
-GetClangASTContext();
 };
 
 } // namespace lldb_private
Index: source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
===
--- source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
+++ source/Plugins/Expre

[Lldb-commits] [lldb] r259823 - Revert "Use an artifical namespace so that member vars do not hide local vars."

2016-02-04 Thread Siva Chandra via lldb-commits
Author: sivachandra
Date: Thu Feb  4 14:08:40 2016
New Revision: 259823

URL: http://llvm.org/viewvc/llvm-project?rev=259823&view=rev
Log:
Revert "Use an artifical namespace so that member vars do not hide local vars."

Summary:
This reverts commit 8af14b5f9af68c31ac80945e5b5d56f0a14b38e4.
Reverting as it breaks a few tests on Mac.

Reviewers: spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D16895

Removed:

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
Modified:
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h
lldb/trunk/include/lldb/Symbol/TypeSystem.h
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/CompilerDeclContext.cpp
lldb/trunk/source/Symbol/TypeSystem.cpp

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=259823&r1=259822&r2=259823&view=diff
==
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Feb  4 14:08:40 2016
@@ -422,11 +422,6 @@ public:
 GetUniqueNamespaceDeclaration (const char *name,
clang::DeclContext *decl_ctx);
 
-static clang::NamespaceDecl *
-GetUniqueNamespaceDeclaration (clang::ASTContext *ast,
-   const char *name,
-   clang::DeclContext *decl_ctx);
-
 //--
 // Function Types
 //--
@@ -570,9 +565,7 @@ public:
 //--
 
 std::vector
-DeclContextFindDeclByName (void *opaque_decl_ctx,
-   ConstString name,
-   const bool ignore_using_decls) override;
+DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name) 
override;
 
 bool
 DeclContextIsStructUnionOrClass (void *opaque_decl_ctx) override;

Modified: lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h?rev=259823&r1=259822&r2=259823&view=diff
==
--- lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h Thu Feb  4 14:08:40 
2016
@@ -66,7 +66,7 @@ public:
 IsClang () const;
 
 std::vector
-FindDeclByName (ConstString name, const bool ignore_using_decls);
+FindDeclByName (ConstString name);
 
 //--
 /// Checks if this decl context represents a method of a class.

Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=259823&r1=259822&r2=259823&view=diff
==
--- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original)
+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Thu Feb  4 14:08:40 2016
@@ -143,9 +143,7 @@ public:
 //--
 
 virtual std::vector
-DeclContextFindDeclByName (void *opaque_decl_ctx,
-   ConstString name,
-   const bool ignore_imported_decls);
+DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name);
 
 virtual bool
 DeclContextIsStructUnionOrClass (void *opaque_decl_ctx) = 0;

Removed: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile?rev=259822&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
 (removed)
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES = main.cpp
-
-i

Re: [Lldb-commits] [PATCH] D16895: Revert "Use an artifical namespace so that member vars do not hide local vars."

2016-02-04 Thread Siva Chandra via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL259823: Revert "Use an artifical namespace so that member 
vars do not hide local vars." (authored by sivachandra).

Changed prior to commit:
  http://reviews.llvm.org/D16895?vs=46944&id=46945#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16895

Files:
  lldb/trunk/include/lldb/Symbol/ClangASTContext.h
  lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h
  lldb/trunk/include/lldb/Symbol/TypeSystem.h
  
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
  
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
  
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
  lldb/trunk/source/Expression/ExpressionSourceCode.cpp
  lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
  lldb/trunk/source/Symbol/ClangASTContext.cpp
  lldb/trunk/source/Symbol/CompilerDeclContext.cpp
  lldb/trunk/source/Symbol/TypeSystem.cpp

Index: lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h
===
--- lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h
+++ lldb/trunk/include/lldb/Symbol/CompilerDeclContext.h
@@ -66,7 +66,7 @@
 IsClang () const;
 
 std::vector
-FindDeclByName (ConstString name, const bool ignore_using_decls);
+FindDeclByName (ConstString name);
 
 //--
 /// Checks if this decl context represents a method of a class.
Index: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
===
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h
@@ -422,11 +422,6 @@
 GetUniqueNamespaceDeclaration (const char *name,
clang::DeclContext *decl_ctx);
 
-static clang::NamespaceDecl *
-GetUniqueNamespaceDeclaration (clang::ASTContext *ast,
-   const char *name,
-   clang::DeclContext *decl_ctx);
-
 //--
 // Function Types
 //--
@@ -570,9 +565,7 @@
 //--
 
 std::vector
-DeclContextFindDeclByName (void *opaque_decl_ctx,
-   ConstString name,
-   const bool ignore_using_decls) override;
+DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name) override;
 
 bool
 DeclContextIsStructUnionOrClass (void *opaque_decl_ctx) override;
Index: lldb/trunk/include/lldb/Symbol/TypeSystem.h
===
--- lldb/trunk/include/lldb/Symbol/TypeSystem.h
+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h
@@ -143,9 +143,7 @@
 //--
 
 virtual std::vector
-DeclContextFindDeclByName (void *opaque_decl_ctx,
-   ConstString name,
-   const bool ignore_imported_decls);
+DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name);
 
 virtual bool
 DeclContextIsStructUnionOrClass (void *opaque_decl_ctx) = 0;
Index: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES = main.cpp
-
-include $(LEVEL)/Makefile.rules
Index: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
@@ -1,73 +0,0 @@
-namespace NN
-{
-  int a = 778899;
-  int b = 665544;
-  int c = 445566;
-}
-
-class A
-{
-public:
-  A();
-  int Method(int a, int b);
-
-private:
-  int a, b;
-};
-
-A::A() : a(10), b(100) { }
-
-int a = 112233;
-int b = 445566;
-int c = 778899;
-
-int
-A::Method(int a, int b)
-{
-{
-int a = 12345;
-int b = 54321;
-int c = 34567;
-this->a = a + b + this->b; // Break 2
-}
-
-{
-using namespace NN;
-int a = 10001;
- 

Re: [Lldb-commits] [PATCH] D16818: [lldb/NetBSD] Remove dead function. Unbreak the build with -Werror

2016-02-04 Thread Kamil Rytarowski via lldb-commits
krytarowski added a comment.

Feel free to land it.


http://reviews.llvm.org/D16818



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


[Lldb-commits] [PATCH] D16900: Take 2: Use an artifical namespace so that member vars do not hide local vars.

2016-02-04 Thread Siva Chandra via lldb-commits
sivachandra created this revision.
sivachandra added reviewers: spyffe, tfiala.
sivachandra added a subscriber: lldb-commits.

This relands r259810 with fix for failures on Mac.

http://reviews.llvm.org/D16900

Files:
  include/lldb/Symbol/ClangASTContext.h
  include/lldb/Symbol/CompilerDeclContext.h
  include/lldb/Symbol/TypeSystem.h
  
packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
  
packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
  
packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/main.cpp
  source/Expression/ExpressionSourceCode.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
  source/Symbol/ClangASTContext.cpp
  source/Symbol/CompilerDeclContext.cpp
  source/Symbol/TypeSystem.cpp

Index: source/Symbol/TypeSystem.cpp
===
--- source/Symbol/TypeSystem.cpp
+++ source/Symbol/TypeSystem.cpp
@@ -153,7 +153,9 @@
 
 
 std::vector
-TypeSystem::DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name)
+TypeSystem::DeclContextFindDeclByName (void *opaque_decl_ctx,
+   ConstString name,
+   bool ignore_imported_decls)
 {
 return std::vector();
 }
Index: source/Symbol/CompilerDeclContext.cpp
===
--- source/Symbol/CompilerDeclContext.cpp
+++ source/Symbol/CompilerDeclContext.cpp
@@ -15,10 +15,11 @@
 using namespace lldb_private;
 
 std::vector
-CompilerDeclContext::FindDeclByName (ConstString name)
+CompilerDeclContext::FindDeclByName (ConstString name, const bool ignore_using_decls)
 {
 if (IsValid())
-return m_type_system->DeclContextFindDeclByName(m_opaque_decl_ctx, name);
+return m_type_system->DeclContextFindDeclByName(
+m_opaque_decl_ctx, name, ignore_using_decls);
 else
 return std::vector();
 }
Index: source/Symbol/ClangASTContext.cpp
===
--- source/Symbol/ClangASTContext.cpp
+++ source/Symbol/ClangASTContext.cpp
@@ -1885,6 +1885,17 @@
 return namespace_decl;
 }
 
+NamespaceDecl *
+ClangASTContext::GetUniqueNamespaceDeclaration (clang::ASTContext *ast,
+const char *name,
+clang::DeclContext *decl_ctx)
+{
+ClangASTContext *ast_ctx = ClangASTContext::GetASTContext(ast);
+if (ast_ctx == nullptr)
+return nullptr;
+
+return ast_ctx->GetUniqueNamespaceDeclaration(name, decl_ctx);
+}
 
 clang::BlockDecl *
 ClangASTContext::CreateBlockDeclaration (clang::DeclContext *ctx)
@@ -9781,7 +9792,9 @@
 //--
 
 std::vector
-ClangASTContext::DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name)
+ClangASTContext::DeclContextFindDeclByName(void *opaque_decl_ctx,
+   ConstString name,
+   const bool ignore_using_decls)
 {
 std::vector found_decls;
 if (opaque_decl_ctx)
@@ -9805,12 +9818,16 @@
 {
 if (clang::UsingDirectiveDecl *ud = llvm::dyn_cast(child))
 {
+if (ignore_using_decls)
+continue;
 clang::DeclContext *from = ud->getCommonAncestor();
 if (searched.find(ud->getNominatedNamespace()) == searched.end())
 search_queue.insert(std::make_pair(from, ud->getNominatedNamespace()));
 }
 else if (clang::UsingDecl *ud = llvm::dyn_cast(child))
 {
+if (ignore_using_decls)
+continue;
 for (clang::UsingShadowDecl *usd : ud->shadows())
 {
 clang::Decl *target = usd->getTargetDecl();
Index: source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
===
--- source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
+++ source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
@@ -707,6 +707,9 @@
 AddThisType(NameSearchContext &context,
 TypeFromUser &type,
 unsigned int current_id);
+
+ClangASTContext *
+GetClangASTContext();
 };
 
 } // namespace lldb_private
Index: source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
===
--- source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
+++ source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
@@

Re: [Lldb-commits] [PATCH] D16900: Take 2: Use an artifical namespace so that member vars do not hide local vars.

2016-02-04 Thread Siva Chandra via lldb-commits
sivachandra added inline comments.


Comment at: source/Expression/ExpressionSourceCode.cpp:188
@@ +187,3 @@
+ConstString var_name = var_sp->GetName();
+if (var_name == ConstString("this") || var_name == 
ConstString(".block_descriptor"))
+continue;

This line is the only one difference between the previous version and this. An 
additional check for a var with name ".block_descriptor" has been added.


http://reviews.llvm.org/D16900



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


Re: [Lldb-commits] [lldb] r259611 - The compiler may use "line number 0" to indicate compiler generated goo that it can't

2016-02-04 Thread Joerg Sonnenberger via lldb-commits
On Wed, Feb 03, 2016 at 12:14:52AM +, Zachary Turner via lldb-commits wrote:
> Shouldn't it be possible to force clang to generate code like this?  If so
> couldn't you write a test for this by stepping over a function call which
> has this kind of code in it?

Doesn't global inline assembler turn into this?

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


Re: [Lldb-commits] [PATCH] D16900: Take 2: Use an artifical namespace so that member vars do not hide local vars.

2016-02-04 Thread Todd Fiala via lldb-commits
tfiala added a comment.

I'm going to try this out now


http://reviews.llvm.org/D16900



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


[Lldb-commits] [lldb] r259834 - Replace tabs with spaces for consistent indentation. No actual text changes.

2016-02-04 Thread Adrian McCarthy via lldb-commits
Author: amccarth
Date: Thu Feb  4 16:20:30 2016
New Revision: 259834

URL: http://llvm.org/viewvc/llvm-project?rev=259834&view=rev
Log:
Replace tabs with spaces for consistent indentation.  No actual text changes.

Modified:
lldb/trunk/www/status.html

Modified: lldb/trunk/www/status.html
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/www/status.html?rev=259834&r1=259833&r2=259834&view=diff
==
--- lldb/trunk/www/status.html (original)
+++ lldb/trunk/www/status.html Thu Feb  4 16:20:30 2016
@@ -12,198 +12,198 @@
 
 
 
-   
+
 
 
-   
-   
-   Mac OS X Status
-   
+
+
+Mac OS X Status
+
 
-  LLDB has matured a lot in the last year 
and can be used for
- C, C++ and Objective C development for 
x86_64, i386 and ARM debugging.
- The entire public API is exposed though a 
framework on Mac OS X which
- is used by Xcode, the lldb command line 
tool, and can also be used by
- Python. The entire public API is exposed 
through script bridging which
- allows LLDB to use an embedded Python 
script interpreter, as well as 
- having a Python module named "lldb" which 
can be used from Python
- on the command line. This allows debug 
sessions to be scripted. It also
- allows powerful debugging actions to be 
created and attached to a variety
- of debugging workflows.
-   
-   Linux Status
-   
-LLDB is improving on Linux. While 
the debugserver has not been ported
-   (to enable remote debugging) Linux is 
nearing feature completeness with Darwin
-   to debug x86_64 programs, and is 
partially working with i386 programs.
-   ARM architectures on Linux are untested.
-   For more details, see the Features by 
OS section below.
-   
-   FreeBSD Status
-   
-LLDB on FreeBSD lags behind the 
Linux implementation but is improving rapidly.
-   For more details, see the Features by 
OS section below.
-   
-   Features by OS
-   
-The table below shows a summary of 
the features that are available
-   on several platforms. In addition to 
Linux and Mac OS X, LLDB is also
-   known to work on FreeBSD. Windows and 
NetBSD support is under development.
-   
-   
-   
Feature
-   
FreeBSD(x86_64)
-   
Linux(x86_64)
-   Mac 
OS X (i386/x86_64 and ARM/Thumb)
-   
-   
-   
Backtracing
-   
OK
-   
OK
-   
OK
-   
-   
-   
Breakpoints
-   

-   
source-line
-   
symbolic
-   
C++ mangled names
-   
module scoping
-

[Lldb-commits] [PATCH] D16902: Add status for LLDB on Windows to status.html.

2016-02-04 Thread Adrian McCarthy via lldb-commits
amccarth created this revision.
amccarth added reviewers: zturner, jingham.
amccarth added a subscriber: lldb-commits.

Just a proposal.

http://reviews.llvm.org/D16902

Files:
  www/status.html

Index: www/status.html
===
--- www/status.html
+++ www/status.html
@@ -44,23 +44,32 @@
  LLDB on FreeBSD lags behind the Linux implementation but is improving rapidly.
 For more details, see the Features by OS section below.
 
+Windows Status
+
+ LLDB on Windows is still under development, but already useful for i386
+and x86_64 programs built with DWARF debug information, including postmortem
+analysis of minidumps.
+For more details, see the Features by OS section below.
+
 Features by OS
 
  The table below shows a summary of the features that are available
 on several platforms. In addition to Linux and Mac OS X, LLDB is also
-known to work on FreeBSD. Windows and NetBSD support is under development.
+known to work on FreeBSD. NetBSD support is under development.
 
 
 Feature
 FreeBSD(x86_64)
 Linux(x86_64)
 Mac OS X (i386/x86_64 and ARM/Thumb)
+Windows (i386/x86_64)
 
 
 Backtracing
 OK
 OK
 OK
+OK
 
 
 Breakpoints
@@ -74,6 +83,7 @@
 OK
 OK
 OK
+OK
 
 
 C++11:
@@ -85,42 +95,49 @@
 OK
 OK
 OK
+Unknown
 
 
 Commandline lldb tool
 OK
 OK
 OK
+OK
 
 
 Core file debugging
 OK (ELF)
 OK (ELF)
 OK (MachO)
+OK (Minidump with DWARF symbols)
 
 
 Debugserver (remote debugging)
 Not ported
 Not ported
 OK
+Not ported
 
 
 Disassembly
 OK
 OK
 OK
+OK
 
 
 Expression evaluation
 Unknown
 Works with some bugs
 OK
+Unknown
 
 
 JIT debugging
 Unknown
 Symbolic debugging only
 Untested
+Unknown
 
 
 Objective-C 2.0:
@@ -138,6 +155,7 @@
 Unknown
 Not applicable
 OK
+Not applicable
 
 
 Process control
@@ -153,12 +171,14 @@
 Works, with some bugs
 OK (except exec*)
 OK
+Unknown
 
 
 Public Python API
 OK
 OK
 OK
+OK

Re: [Lldb-commits] [PATCH] D16902: Add status for LLDB on Windows to status.html.

2016-02-04 Thread Adrian McCarthy via lldb-commits
amccarth updated this revision to Diff 46964.
amccarth added a comment.

More tweaks after comments from Zach.

Notably removed the Script Bridging row since that's duplicating the Python 
Scripting row.


http://reviews.llvm.org/D16902

Files:
  www/status.html

Index: www/status.html
===
--- www/status.html
+++ www/status.html
@@ -44,23 +44,32 @@
  LLDB on FreeBSD lags behind the Linux implementation but is improving rapidly.
 For more details, see the Features by OS section below.
 
+Windows Status
+
+ LLDB on Windows is still under development, but already useful for i386
+programs (x86_64 untested) built with DWARF debug information, including postmortem
+analysis of minidumps.
+For more details, see the Features by OS section below.
+
 Features by OS
 
  The table below shows a summary of the features that are available
 on several platforms. In addition to Linux and Mac OS X, LLDB is also
-known to work on FreeBSD. Windows and NetBSD support is under development.
+known to work on FreeBSD. NetBSD support is under development.
 
 
 Feature
 FreeBSD(x86_64)
 Linux(x86_64)
 Mac OS X (i386/x86_64 and ARM/Thumb)
+Windows (i386)
 
 
 Backtracing
 OK
 OK
 OK
+OK
 
 
 Breakpoints
@@ -74,6 +83,7 @@
 OK
 OK
 OK
+OK
 
 
 C++11:
@@ -85,42 +95,49 @@
 OK
 OK
 OK
+Unknown
 
 
 Commandline lldb tool
 OK
 OK
 OK
+OK
 
 
 Core file debugging
 OK (ELF)
 OK (ELF)
 OK (MachO)
+OK (Minidump)
 
 
 Debugserver (remote debugging)
 Not ported
 Not ported
 OK
+Not ported
 
 
 Disassembly
 OK
 OK
 OK
+OK
 
 
 Expression evaluation
 Unknown
 Works with some bugs
 OK
+Works with some bugs
 
 
 JIT debugging
 Unknown
 Symbolic debugging only
 Untested
+No
 
 
 Objective-C 2.0:
@@ -138,6 +155,7 @@
 Unknown
 Not applicable
 OK
+Not applicable
 
 
 Process control
@@ -153,12 +171,14 @@
 Works, with some bugs
 OK (except exec*)
 OK
+OK
 
 
 Public Python API
-OK
-OK
-   

[Lldb-commits] [PATCH] Fix the search path for CMake files

2016-02-04 Thread Niels Ole Salscheider via lldb-commits
This allows to find the LLVM's CMake files after moving them in
r259821.
---
 cmake/modules/LLDBStandalone.cmake | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/modules/LLDBStandalone.cmake 
b/cmake/modules/LLDBStandalone.cmake
index d3955f1..4fa5ca9 100644
--- a/cmake/modules/LLDBStandalone.cmake
+++ b/cmake/modules/LLDBStandalone.cmake
@@ -34,7 +34,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
   endif()
 
-  list(APPEND CMAKE_MODULE_PATH "${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
+  list(APPEND CMAKE_MODULE_PATH 
"${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
 
   if (LLDB_PATH_TO_LLVM_BUILD)
 get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
@@ -73,9 +73,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
 message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
   endif()
   # Import CMake library targets from LLVM and Clang.
-  include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
-  if (EXISTS "${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
-  
include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
+  
include("${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
+  if (EXISTS 
"${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+
include("${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
   endif()
 
   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
-- 
2.7.0

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


Re: [Lldb-commits] [PATCH] Fix the search path for CMake files

2016-02-04 Thread Zachary Turner via lldb-commits
Seems fine.  Does this only affect the LLDB Standalone build?  I don't know
if any of the main contributors test that, but if you test it and it works
for you then I guess this is ok.

On Thu, Feb 4, 2016 at 2:52 PM Niels Ole Salscheider via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> This allows to find the LLVM's CMake files after moving them in
> r259821.
> ---
>  cmake/modules/LLDBStandalone.cmake | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/cmake/modules/LLDBStandalone.cmake
> b/cmake/modules/LLDBStandalone.cmake
> index d3955f1..4fa5ca9 100644
> --- a/cmake/modules/LLDBStandalone.cmake
> +++ b/cmake/modules/LLDBStandalone.cmake
> @@ -34,7 +34,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
>set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
>endif()
>
> -  list(APPEND CMAKE_MODULE_PATH
> "${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
> +  list(APPEND CMAKE_MODULE_PATH
> "${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
>
>if (LLDB_PATH_TO_LLVM_BUILD)
>  get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
> @@ -73,9 +73,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
>  message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
>endif()
># Import CMake library targets from LLVM and Clang.
> -  include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
> -  if (EXISTS
> "${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
> -
> include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
> +
> include("${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
> +  if (EXISTS
> "${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
> +
> include("${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
>endif()
>
>set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
> --
> 2.7.0
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] Fix the search path for CMake files

2016-02-04 Thread Niels Ole Salscheider via lldb-commits
On Thursday, 4 February 2016, 23:02:13 CET, Zachary Turner wrote:
> Seems fine.  Does this only affect the LLDB Standalone build?  I don't know
> if any of the main contributors test that, but if you test it and it works
> for you then I guess this is ok.

Yes, this is only relevant for the standalone build.

> On Thu, Feb 4, 2016 at 2:52 PM Niels Ole Salscheider via lldb-commits <
> 
> lldb-commits@lists.llvm.org> wrote:
> > This allows to find the LLVM's CMake files after moving them in
> > r259821.
> > ---
> > 
> >  cmake/modules/LLDBStandalone.cmake | 8 
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/cmake/modules/LLDBStandalone.cmake
> > b/cmake/modules/LLDBStandalone.cmake
> > index d3955f1..4fa5ca9 100644
> > --- a/cmake/modules/LLDBStandalone.cmake
> > +++ b/cmake/modules/LLDBStandalone.cmake
> > @@ -34,7 +34,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
> > 
> >set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
> >
> >endif()
> > 
> > -  list(APPEND CMAKE_MODULE_PATH
> > "${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
> > +  list(APPEND CMAKE_MODULE_PATH
> > "${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
> > 
> >if (LLDB_PATH_TO_LLVM_BUILD)
> >
> >  get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
> > 
> > @@ -73,9 +73,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
> > 
> >  message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
> >
> >endif()
> ># Import CMake library targets from LLVM and Clang.
> > 
> > -  include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
> > -  if (EXISTS
> > "${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
> > -
> > include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
> > +
> > include("${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LL
> > VMConfig.cmake") +  if (EXISTS
> > "${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangCon
> > fig.cmake") +
> > include("${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/
> > ClangConfig.cmake")> 
> >endif()
> >
> >set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
> > 
> > --
> > 2.7.0
> > 
> > ___
> > lldb-commits mailing list
> > lldb-commits@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


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


[Lldb-commits] [lldb] r259845 - Fix the search path for CMake files

2016-02-04 Thread Niels Ole Salscheider via lldb-commits
Author: olesalscheider
Date: Thu Feb  4 17:28:57 2016
New Revision: 259845

URL: http://llvm.org/viewvc/llvm-project?rev=259845&view=rev
Log:
Fix the search path for CMake files

This allows to find the LLVM's CMake files after moving them in
r259821.

Modified:
lldb/trunk/cmake/modules/LLDBStandalone.cmake

Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=259845&r1=259844&r2=259845&view=diff
==
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Thu Feb  4 17:28:57 2016
@@ -34,7 +34,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
   endif()
 
-  list(APPEND CMAKE_MODULE_PATH "${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
+  list(APPEND CMAKE_MODULE_PATH 
"${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
 
   if (LLDB_PATH_TO_LLVM_BUILD)
 get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
@@ -73,9 +73,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
 message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
   endif()
   # Import CMake library targets from LLVM and Clang.
-  include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
-  if (EXISTS "${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
-  
include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
+  
include("${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
+  if (EXISTS 
"${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+  
include("${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
   endif()
 
   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")


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


[Lldb-commits] [lldb] r259850 - Add a little logging to ProcessMachCore so it is easier to tell when a user process dyld

2016-02-04 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Feb  4 17:45:17 2016
New Revision: 259850

URL: http://llvm.org/viewvc/llvm-project?rev=259850&view=rev
Log:
Add a little logging to ProcessMachCore so it is easier to tell when a user 
process dyld
or mach kernel binary are found, and if there are multiples of them found 
within a single
corefile.
 

Modified:
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp

Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=259850&r1=259849&r2=259850&view=diff
==
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Thu Feb  4 
17:45:17 2016
@@ -19,6 +19,7 @@
 #include "lldb/Core/DataBuffer.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/PluginManager.h"
+#include "lldb/Core/Log.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/Section.h"
@@ -163,6 +164,7 @@ ProcessMachCore::GetPluginVersion()
 bool
 ProcessMachCore::GetDynamicLoaderAddress (lldb::addr_t addr)
 {
+Log *log(lldb_private::GetLogIfAnyCategoriesSet 
(LIBLLDB_LOG_DYNAMIC_LOADER | LIBLLDB_LOG_PROCESS));
 llvm::MachO::mach_header header;
 Error error;
 if (DoReadMemory (addr, &header, sizeof(header), error) != sizeof(header))
@@ -194,6 +196,8 @@ ProcessMachCore::GetDynamicLoaderAddress
 case llvm::MachO::MH_DYLINKER:
 //printf("0x%16.16" PRIx64 ": file_type = MH_DYLINKER\n", vaddr);
 // Address of dyld "struct mach_header" in the core file
+if (log)
+log->Printf ("ProcessMachCore::GetDynamicLoaderAddress found a 
user process dyld binary image at 0x%" PRIx64, addr);
 m_dyld_addr = addr;
 return true;
 
@@ -203,6 +207,8 @@ ProcessMachCore::GetDynamicLoaderAddress
 // is NOT set. If it isn't, then we have a mach_kernel.
 if ((header.flags & llvm::MachO::MH_DYLDLINK) == 0)
 {
+if (log)
+log->Printf ("ProcessMachCore::GetDynamicLoaderAddress 
found a mach kernel binary image at 0x%" PRIx64, addr);
 // Address of the mach kernel "struct mach_header" in the core 
file.
 m_mach_kernel_addr = addr;
 return true;
@@ -219,6 +225,7 @@ ProcessMachCore::GetDynamicLoaderAddress
 Error
 ProcessMachCore::DoLoadCore ()
 {
+Log *log(lldb_private::GetLogIfAnyCategoriesSet 
(LIBLLDB_LOG_DYNAMIC_LOADER | LIBLLDB_LOG_PROCESS));
 Error error;
 if (!m_core_module_sp)
 {
@@ -314,9 +321,7 @@ ProcessMachCore::DoLoadCore ()
 // later if both are present.
 
 const size_t num_core_aranges = m_core_aranges.GetSize();
-for (size_t i = 0; 
- i < num_core_aranges && (m_dyld_addr == LLDB_INVALID_ADDRESS || 
m_mach_kernel_addr == LLDB_INVALID_ADDRESS); 
- ++i)
+for (size_t i = 0; i < num_core_aranges; ++i)
 {
 const VMRangeToFileOffset::Entry *entry = 
m_core_aranges.GetEntryAtIndex(i);
 lldb::addr_t section_vm_addr_start = entry->GetRangeBase();
@@ -336,10 +341,14 @@ ProcessMachCore::DoLoadCore ()
 {
 if (m_mach_kernel_addr != LLDB_INVALID_ADDRESS)
 {
+if (log)
+log->Printf ("ProcessMachCore::DoLoadCore: Using kernel 
corefile image at 0x%" PRIx64, m_mach_kernel_addr);
 m_dyld_plugin_name = 
DynamicLoaderDarwinKernel::GetPluginNameStatic();
 }
 else if (m_dyld_addr != LLDB_INVALID_ADDRESS)
 {
+if (log)
+log->Printf ("ProcessMachCore::DoLoadCore: Using user process 
dyld image at 0x%" PRIx64, m_dyld_addr);
 m_dyld_plugin_name = 
DynamicLoaderMacOSXDYLD::GetPluginNameStatic();
 }
 }
@@ -347,10 +356,14 @@ ProcessMachCore::DoLoadCore ()
 {
 if (m_dyld_addr != LLDB_INVALID_ADDRESS)
 {
+if (log)
+log->Printf ("ProcessMachCore::DoLoadCore: Using user process 
dyld image at 0x%" PRIx64, m_dyld_addr);
 m_dyld_plugin_name = 
DynamicLoaderMacOSXDYLD::GetPluginNameStatic();
 }
 else if (m_mach_kernel_addr != LLDB_INVALID_ADDRESS)
 {
+if (log)
+log->Printf ("ProcessMachCore::DoLoadCore: Using kernel 
corefile image at 0x%" PRIx64, m_mach_kernel_addr);
 m_dyld_plugin_name = 
DynamicLoaderDarwinKernel::GetPluginNameStatic();
 }
 }


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


[Lldb-commits] Buildbot numbers for week of 1/24/2016 - 1/30/2016

2016-02-04 Thread Galina Kistanova via lldb-commits
Hello everyone,

Below are some buildbot numbers for the last week of 1/24/2016 - 1/30/2016.

Thanks

Galina


Number of commits by project:


 project   |   commits
---+---
 llvm  |   283
 cfe   |   100
 lld   |46
 lldb  |46
 compiler-rt   |36
 clang-tools-extra |16
 libcxx|14
 openmp|13
 polly |11
---+---
   565


Number of completed builds, failed builds and average build time for
successful builds per active builder:

 buildername   | completed  |
failed | time
---+++
 clang-aarch64-lnt | 44
| 21 | 02:25:25
 clang-atom-d525-fedora|136
|130 | 09:02:23
 clang-atom-d525-fedora-rel|146
|117 | 01:57:06
 clang-bpf-build   |311
| 32 | 00:03:29
 clang-cmake-aarch64-42vma |150
| 31 | 00:47:52
 clang-cmake-aarch64-full  | 50
| 15 | 03:38:37
 clang-cmake-aarch64-quick |162
| 36 | 00:43:11
 clang-cmake-armv7-a15 |168
| 17 | 00:36:58
 clang-cmake-armv7-a15-full| 76
|  4 | 01:51:26
 clang-cmake-armv7-a15-selfhost| 34
|  1 | 04:21:24
 clang-cmake-armv7-a15-selfhost-neon   | 24
|  2 | 06:25:21
 clang-cmake-mips  | 89
| 14 | 01:40:21
 clang-cmake-mipsel| 26
|  6 | 07:45:24
 clang-cmake-thumbv7-a15   |177
| 24 | 00:32:34
 clang-cmake-thumbv7-a15-full-sh   | 23
|  1 | 06:47:51
 clang-hexagon-elf | 90
| 17 | 00:19:14
 clang-native-aarch64-full | 18
|  1 | 07:28:21
 clang-native-arm-lnt  | 90
|  2 | 01:25:41
 clang-native-arm-lnt-perf | 18
|  1 | 08:42:18
 clang-ppc64be-linux   |299
| 41 | 00:07:41
 clang-ppc64be-linux-lnt   | 57
| 18 | 01:01:57
 clang-ppc64be-linux-multistage|169
| 13 | 00:35:54
 clang-ppc64le-linux   |217
| 86 | 00:21:30
 clang-ppc64le-linux-lnt   | 22
|  1 | 02:39:35
 clang-ppc64le-linux-multistage|111
| 20 | 01:07:57
 clang-s390x-linux |133
| 86 | 00:09:07
 clang-sphinx-docs |108
| 42 | 00:00:23
 clang-x64-ninja-win7  |180
|152 | 00:37:35
 clang-x86-win2008-selfhost|122
| 49 | 01:17:24
 clang-x86_64-darwin13-cross-arm   | 76
|  2 | 00:20:11
 clang-x86_64-darwin13-cross-mingw32   | 68
|  3 | 00:24:06
 clang-x86_64-debian-fast  |122
| 76 | 00:14:17
 clang-x86_64-linux-abi-test   |316
| 73 | 00:09:56
 clang-x86_64-linux-selfhost-modules   |257
| 52 | 00:16:36
 libcxx-libcxxabi-arm-linux| 13
|| 01:08:38
 libcxx-libcxxabi-singlethreaded-x86_64-linux-debian   | 13
|  8 | 00:08:26
 libcxx-libcxxabi-x86_64-linux-debian  | 12
|  2 | 00:09:44
 libcxx-libcxxabi-x86_64-linux-debian-noexceptions | 11
|  2 | 00:09:23
 libcxx-libcxxabi-x86_64-linux-ubuntu-asan | 12
|| 00:11:04
 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx03| 12
|| 00:05:42
 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx11| 13
|| 00:06:39
 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx14| 13
|| 00:07:11
 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx1z| 12
|| 00:07:12
 libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11  | 12
| 12 |
 libcxx

Re: [Lldb-commits] [PATCH] D16900: Take 2: Use an artifical namespace so that member vars do not hide local vars.

2016-02-04 Thread Todd Fiala via lldb-commits
This tested cleanly, no failures on OS X. Lgtm.

-Todd

> On Feb 4, 2016, at 2:15 PM, Todd Fiala  wrote:
> 
> tfiala added a comment.
> 
> I'm going to try this out now
> 
> 
> http://reviews.llvm.org/D16900
> 
> 
> 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D16900: Take 2: Use an artifical namespace so that member vars do not hide local vars.

2016-02-04 Thread Siva Chandra via lldb-commits
sivachandra added a comment.

Thanks a lot Todd. I will put this in tomorrow morning just to be on the safer 
side.


http://reviews.llvm.org/D16900



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


[Lldb-commits] [lldb] r259865 - Add two more addresses to check for the address of the kernel in debug mode;

2016-02-04 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Thu Feb  4 19:38:56 2016
New Revision: 259865

URL: http://llvm.org/viewvc/llvm-project?rev=259865&view=rev
Log:
Add two more addresses to check for the address of the kernel in debug mode;
also add some logging about where lldb is lookin for a kernel as it connects.
 

Modified:

lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=259865&r1=259864&r2=259865&view=diff
==
--- 
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
 Thu Feb  4 19:38:56 2016
@@ -266,6 +266,16 @@ DynamicLoaderDarwinKernel::SearchForKern
 {
 return addr;
 }
+addr = process->ReadUnsignedIntegerFromMemory (0xfff02010ULL, 
8, LLDB_INVALID_ADDRESS, read_err);
+if (CheckForKernelImageAtAddress (addr, process).IsValid())
+{
+return addr;
+}
+addr = process->ReadUnsignedIntegerFromMemory (0xfff04010ULL, 
8, LLDB_INVALID_ADDRESS, read_err);
+if (CheckForKernelImageAtAddress (addr, process).IsValid())
+{
+return addr;
+}
 }
 else
 {
@@ -397,9 +407,13 @@ DynamicLoaderDarwinKernel::SearchForKern
 lldb_private::UUID
 DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress (lldb::addr_t addr, 
Process *process)
 {
+Log *log(lldb_private::GetLogIfAnyCategoriesSet 
(LIBLLDB_LOG_DYNAMIC_LOADER));
 if (addr == LLDB_INVALID_ADDRESS)
 return UUID();
 
+if (log)
+log->Printf ("DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress: 
looking for kernel binary at 0x%" PRIx64, addr);
+
 // First try a quick test -- read the first 4 bytes and see if there is a 
valid Mach-O magic field there
 // (the first field of the mach_header/mach_header_64 struct).
 
@@ -450,6 +464,8 @@ DynamicLoaderDarwinKernel::CheckForKerne
 {
 process->GetTarget().SetArchitecture (kernel_arch);
 }
+if (log)
+log->Printf 
("DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress: kernel binary image 
found at 0x%" PRIx64, addr);
 return memory_module_sp->GetUUID();
 }
 }


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


Re: [Lldb-commits] [PATCH] D16900: Take 2: Use an artifical namespace so that member vars do not hide local vars.

2016-02-04 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

In http://reviews.llvm.org/D16900#344702, @sivachandra wrote:

> Thanks a lot Todd. I will put this in tomorrow morning just to be on the 
> safer side.


My pleasure, Siva!


http://reviews.llvm.org/D16900



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


Re: [Lldb-commits] [PATCH] D16858: Add verbose logging support to gdb-remote tests

2016-02-04 Thread Todd Fiala via lldb-commits
tfiala added a comment.

In http://reviews.llvm.org/D16858#343895, @labath wrote:

> In http://reviews.llvm.org/D16858#343140, @tfiala wrote:
>
> > BTW I was planning on re-organizing the lldb-server/debugserver tests 
> > sometime in the near future to break them into many different directories 
> > and pull off the dsym/dwarf/dwo changes for the many tests where that 
> > doesn't matter.
>
>
> I think that basically none of these tests rely on debug info, and we can 
> remove the debug info duplication entirely. Unfortunately, the only way right 
> now is to annotate each function with `@no_debug_info_test`, so I have been 
> waiting until I get a chance to make that decorator work on classes.
>
> That should cut the running time in half, so then you may not even need to 
> split stuff out more...


True.

Maybe I'll wait until then.  If/when I get to writing more tests in that area, 
I may reorganize just because it is currently a massive hunk of tests in one 
file, but if you're going to get rid of the alternatives with a class-level 
decorator, that definitely will remove the main piece I cared about (namely, 
the time).


Repository:
  rL LLVM

http://reviews.llvm.org/D16858



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


Re: [Lldb-commits] [PATCH] D16049: [LLDB][MIPS] A small fix in GetBreakableLoadAddress() for MIPS

2016-02-04 Thread Bhushan Attarde via lldb-commits
bhushan closed this revision.
bhushan added a comment.

Closed by commit http://reviews.llvm.org/rL258919


Repository:
  rL LLVM

http://reviews.llvm.org/D16049



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


[Lldb-commits] [PATCH] D16916: [LLDB][MIPS] Fix TestExpressionInSyscall.py for MIPS

2016-02-04 Thread Bhushan Attarde via lldb-commits
bhushan created this revision.
bhushan added a reviewer: clayborg.
bhushan added subscribers: lldb-commits, nitesh.jain, mohit.bhakkad, sagar, 
jaydeep.
bhushan set the repository for this revision to rL LLVM.

This test (TestExpressionInSyscall.py) checks if we are able to evaluate 
expressions when the inferior is blocked in a syscall.

As a part of expression evaluation LLDB checks for memory allocation on target 
(by executing mmap).
So we setup call to mmap by setting argument registers and PC.
Now the process is stopped in the syscall and when it continue to allocate 
memory, the system call is restarted.

In MIPS, to restart a syscall, kernel decreases the PC by 4 so the resulting PC 
now points to mmap-4
and also register R7 that provides 'flags' argument to mmap gets clobbered to 0 
and hence mmap fails.

A fix to this issue is to postpone the syscall restart until the expression is 
evaluated.
In MIPS, register R0 controls syscall restart. This patch writes 0 into 
register R0 when preparing call to mmap.
This setting avoids a syscall restart and prevents automatic decrement of the 
PC so that expression can be evaluated correctly.

Once the expression completes the registers are restored and program resumes 
the interrupted syscall when the continue command is issued.

This fixes TestExpressionInSyscall.py and solves bug 23659 for MIPS.

Repository:
  rL LLVM

http://reviews.llvm.org/D16916

Files:
  source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
  source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp

Index: source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
===
--- source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
+++ source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
@@ -207,6 +207,17 @@
 const RegisterInfo *sp_reg_info = reg_ctx->GetRegisterInfo 
(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
 const RegisterInfo *ra_reg_info = reg_ctx->GetRegisterInfo 
(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
 const RegisterInfo *r25_info = reg_ctx->GetRegisterInfoByName("r25", 0);
+const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("zero", 0);
+
+if (log)
+log->Printf("Writing R0: 0x%" PRIx64, (uint64_t)0);
+
+/* Write r0 with 0, in case we are stopped in syscall,
+ * such setting prevents automatic decrement of the PC.
+ * This clears the bug 23659 for MIPS.
+*/ 
+if (!reg_ctx->WriteRegisterFromUnsigned (r0_info, (uint64_t)0))
+return false;
 
 if (log)
 log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
Index: source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
===
--- source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
+++ source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
@@ -242,6 +242,17 @@
 const RegisterInfo *sp_reg_info = reg_ctx->GetRegisterInfo 
(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
 const RegisterInfo *ra_reg_info = reg_ctx->GetRegisterInfo 
(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
 const RegisterInfo *r25_info = reg_ctx->GetRegisterInfoByName("r25", 0);
+const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("zero", 0);
+
+if (log)
+log->Printf("Writing R0: 0x%" PRIx64, (uint64_t)0);
+
+/* Write r0 with 0, in case we are stopped in syscall,
+ * such setting prevents automatic decrement of the PC.
+ * This clears the bug 23659 for MIPS.
+*/ 
+if (!reg_ctx->WriteRegisterFromUnsigned (r0_info, (uint64_t)0))
+return false;
 
 if (log)
 log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);


Index: source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
===
--- source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
+++ source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
@@ -207,6 +207,17 @@
 const RegisterInfo *sp_reg_info = reg_ctx->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
 const RegisterInfo *ra_reg_info = reg_ctx->GetRegisterInfo (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
 const RegisterInfo *r25_info = reg_ctx->GetRegisterInfoByName("r25", 0);
+const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("zero", 0);
+
+if (log)
+log->Printf("Writing R0: 0x%" PRIx64, (uint64_t)0);
+
+/* Write r0 with 0, in case we are stopped in syscall,
+ * such setting prevents automatic decrement of the PC.
+ * This clears the bug 23659 for MIPS.
+*/ 
+if (!reg_ctx->WriteRegisterFromUnsigned (r0_info, (uint64_t)0))
+return false;
 
 if (log)
 log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
Index: source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
===
--- source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
+++ source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
@@ -242,6 +242,17 @@
 const RegisterInfo *sp_reg_info = reg_ctx->GetRegisterInfo (eRegisterKindGene