[Lldb-commits] [lldb] r255097 - wire timeouts and exceptional inferior process exits through the test event system

2015-12-08 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Wed Dec  9 00:45:43 2015
New Revision: 255097

URL: http://llvm.org/viewvc/llvm-project?rev=255097&view=rev
Log:
wire timeouts and exceptional inferior process exits through the test event 
system

The results formatter system is now fed timeouts and exceptional process
exits (i.e. inferior dotest.py process that exited by signal on POSIX
systems).

If a timeout or exceptional exit happens while a test method is running
on the worker queue, the timeout or exceptional exit is charged and
reported against that test method.  Otherwise, if no test method was
running at the time of the timeout or exceptional exit, only the test
filename will be reported as the TIMEOUT or ERROR.

Implements:
https://llvm.org/bugs/show_bug.cgi?id=24830
https://llvm.org/bugs/show_bug.cgi?id=25703

In support of:
https://llvm.org/bugs/show_bug.cgi?id=25450

Modified:
lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py
lldb/trunk/packages/Python/lldbsuite/test/dosep.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py
lldb/trunk/packages/Python/lldbsuite/test/test_runner/lib/process_control.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py?rev=255097&r1=255096&r2=255097&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/basic_results_formatter.py Wed 
Dec  9 00:45:43 2015
@@ -14,6 +14,7 @@ import os
 
 # Our imports
 from . import result_formatter
+from .result_formatter import EventBuilder
 import lldbsuite
 
 
@@ -96,12 +97,27 @@ class BasicResultsFormatter(result_forma
 self.result_events[test_key],
 test_event)
 self.result_events[test_key] = test_event
+elif event_type == "job_result":
+# Build the job key.
+test_key = test_event.get("test_filename", None)
+if test_key is None:
+raise Exception(
+"failed to find test filename for job event {}".format(
+test_event))
+self.result_events[test_key] = test_event
 else:
 # This is an unknown event.
 if self.options.assert_on_unknown_events:
 raise Exception("unknown event type {} from {}\n".format(
 event_type, test_event))
 
+@classmethod
+def _event_sort_key(cls, event):
+if "test_name" in event:
+return event["test_name"]
+else:
+return event.get("test_filename", None)
+
 def _partition_results_by_status(self, categories):
 """Partitions the captured test results by event status.
 
@@ -123,7 +139,7 @@ class BasicResultsFormatter(result_forma
 if event.get("status", "") == result_status_id]
 partitioned_events[result_status_id] = sorted(
 matching_events,
-key=lambda x: x[1]["test_name"])
+key=lambda x: self._event_sort_key(x[1]))
 return partitioned_events
 
 def _print_summary_counts(
@@ -223,13 +239,29 @@ class BasicResultsFormatter(result_forma
 if print_matching_tests:
 # Sort by test name
 for (_, event) in result_events_by_status[result_status_id]:
-test_relative_path = os.path.relpath(
-os.path.realpath(event["test_filename"]),
-lldbsuite.lldb_test_root)
-self.out_file.write("{}: {} ({})\n".format(
-detail_label,
-event["test_name"],
-test_relative_path))
+extra_info = ""
+if result_status_id == EventBuilder.STATUS_EXCEPTIONAL_EXIT:
+extra_info = "{} ({}) ".format(
+event["exception_code"],
+event["exception_description"])
+
+if event["event"] == EventBuilder.TYPE_JOB_RESULT:
+# Jobs status that couldn't be mapped to a test method
+# doesn't have as much detail.
+self.out_file.write("{}: {}{} (no test method 
running)\n".format(
+detail_label,
+extra_info,
+event["test_filename"]))
+else:
+# Test-method events have richer detail, use that here.
+test_relative_path = os.path.relpath(
+os.path.realpath(event["test_filename"]),
+lldbsuite.lldb_test_root)
+self.out_file.write("{}: {}{} ({})\n".format(
+detail_label,
+

Re: [Lldb-commits] [PATCH] D15273: [LLDB][MIPS] Handle PIC calling convention for MIPS32

2015-12-08 Thread Bhushan Attarde via lldb-commits
bhushan closed this revision.
bhushan added a comment.

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


Repository:
  rL LLVM

http://reviews.llvm.org/D15273



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


[Lldb-commits] [lldb] r255093 - Add some additional safety checks to the StructuredData access

2015-12-08 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Tue Dec  8 22:15:47 2015
New Revision: 255093

URL: http://llvm.org/viewvc/llvm-project?rev=255093&view=rev
Log:
Add some additional safety checks to the StructuredData access
methods - lldb can still crash pretty easily on corrupt JSON text,
and these will help eliminate a bunch of cases where that would
result in a crash.  Some of the methods would check that e.g.
GetItemAtIndex would actually return an item before dereferencing it,
some would not, that kind of thing.  

 

Modified:
lldb/trunk/include/lldb/Core/StructuredData.h

Modified: lldb/trunk/include/lldb/Core/StructuredData.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/StructuredData.h?rev=255093&r1=255092&r2=255093&view=diff
==
--- lldb/trunk/include/lldb/Core/StructuredData.h (original)
+++ lldb/trunk/include/lldb/Core/StructuredData.h Tue Dec  8 22:15:47 2015
@@ -250,11 +250,14 @@ public:
 bool
 GetItemAtIndexAsInteger(size_t idx, IntType &result) const
 {
-ObjectSP value = GetItemAtIndex(idx);
-if (auto int_value = value->GetAsInteger())
+ObjectSP value_sp = GetItemAtIndex(idx);
+if (value_sp.get())
 {
-result = static_cast(int_value->GetValue());
-return true;
+if (auto int_value = value_sp->GetAsInteger())
+{
+result = static_cast(int_value->GetValue());
+return true;
+}
 }
 return false;
 }
@@ -272,11 +275,14 @@ public:
 bool
 GetItemAtIndexAsString(size_t idx, std::string &result) const
 {
-ObjectSP value = GetItemAtIndex(idx);
-if (auto string_value = value->GetAsString())
+ObjectSP value_sp = GetItemAtIndex(idx);
+if (value_sp.get())
 {
-result = string_value->GetValue();
-return true;
+if (auto string_value = value_sp->GetAsString())
+{
+result = string_value->GetValue();
+return true;
+}
 }
 return false;
 }
@@ -293,13 +299,13 @@ public:
 bool
 GetItemAtIndexAsString(size_t idx, ConstString &result) const
 {
-ObjectSP value = GetItemAtIndex(idx);
-if (!value)
-return false;
-if (auto string_value = value->GetAsString())
-{
-result = ConstString(string_value->GetValue());
-return true;
+ObjectSP value_sp = GetItemAtIndex(idx);
+if (value_sp.get()) {
+if (auto string_value = value_sp->GetAsString())
+{
+result = ConstString(string_value->GetValue());
+return true;
+}
 }
 return false;
 }
@@ -316,17 +322,27 @@ public:
 bool
 GetItemAtIndexAsDictionary(size_t idx, Dictionary *&result) const
 {
-ObjectSP value = GetItemAtIndex(idx);
-result = value->GetAsDictionary();
-return (result != nullptr);
+result = nullptr;
+ObjectSP value_sp = GetItemAtIndex(idx);
+if (value_sp.get()) 
+{
+result = value_sp->GetAsDictionary();
+return (result != nullptr);
+}
+return false;
 }
 
 bool
 GetItemAtIndexAsArray(size_t idx, Array *&result) const
 {
-ObjectSP value = GetItemAtIndex(idx);
-result = value->GetAsArray();
-return (result != nullptr);
+result = nullptr;
+ObjectSP value_sp = GetItemAtIndex(idx);
+if (value_sp.get())
+{
+result = value_sp->GetAsArray();
+return (result != nullptr);
+}
+return false;
 }
 
 void
@@ -542,13 +558,13 @@ public:
 bool
 GetValueForKeyAsInteger(llvm::StringRef key, IntType &result) const
 {
-ObjectSP value = GetValueForKey(key);
-if (!value)
-return false;
-if (auto int_value = value->GetAsInteger())
-{
-result = static_cast(int_value->GetValue());
-return true;
+ObjectSP value_sp = GetValueForKey(key);
+if (value_sp) {
+if (auto int_value = value_sp->GetAsInteger())
+{
+result = static_cast(int_value->GetValue());
+return true;
+}
 }
 return false;
 }
@@ -566,13 +582,14 @@ public:
 bool
 GetValueForKeyAsString(llvm::StringRef key, std::string &resu

[Lldb-commits] [lldb] r255090 - When printing warnings, the repeat_key should be

2015-12-08 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Tue Dec  8 19:25:01 2015
New Revision: 255090

URL: http://llvm.org/viewvc/llvm-project?rev=255090&view=rev
Log:
When printing warnings, the repeat_key should be
const void * because the data is never accessed,
the pointer is the only useful piece of data.

Modified:
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=255090&r1=255089&r2=255090&view=diff
==
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Tue Dec  8 19:25:01 2015
@@ -3201,7 +3201,7 @@ protected:
 /// printf style format string
 //--
 void
-PrintWarning (uint64_t warning_type, void *repeat_key, const char *fmt, 
...) __attribute__((format(printf, 4, 5)));
+PrintWarning (uint64_t warning_type, const void *repeat_key, const char 
*fmt, ...) __attribute__((format(printf, 4, 5)));
 
 //--
 // NextEventAction provides a way to register an action on the next
@@ -3286,7 +3286,7 @@ protected:
 // Type definitions
 //--
 typedef std::map 
LanguageRuntimeCollection;
-typedef std::unordered_set WarningsPointerSet;
+typedef std::unordered_set WarningsPointerSet;
 typedef std::map WarningsCollection;
 
 struct PreResumeCallbackAndBaton

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=255090&r1=255089&r2=255090&view=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Dec  8 19:25:01 2015
@@ -6400,7 +6400,7 @@ Process::ModulesDidLoad (ModuleList &mod
 }
 
 void
-Process::PrintWarning (uint64_t warning_type, void *repeat_key, const char 
*fmt, ...)
+Process::PrintWarning (uint64_t warning_type, const void *repeat_key, const 
char *fmt, ...)
 {
 bool print_warning = true;
 


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


Re: [Lldb-commits] [PATCH] D15326: Rework breakpoint language filtering to use the symbol context's language.

2015-12-08 Thread Dawn Perchik via lldb-commits
dawn marked an inline comment as done.
dawn added a comment.

Thanks Greg.  Will fix comment in commit.

@Jim, can you accept please?


Repository:
  rL LLVM

http://reviews.llvm.org/D15326



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


Re: [Lldb-commits] [PATCH] D15359: Fix DoReadMemory for Windows mini dumps.

2015-12-08 Thread Adrian McCarthy via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL255083: Fix DoReadMemory for Windows mini dumps. (authored 
by amccarth).

Changed prior to commit:
  http://reviews.llvm.org/D15359?vs=42243&id=42246#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D15359

Files:
  lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp

Index: lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
===
--- lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
+++ lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
@@ -30,6 +30,7 @@
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/UnixSignals.h"
+#include "lldb/Utility/LLDBAssert.h"
 #include "llvm/Support/ConvertUTF.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Support/raw_ostream.h"
@@ -267,7 +268,9 @@
 // There's at least some overlap between the beginning of the desired range
 // (addr) and the current range.  Figure out where the overlap begins and
 // how much overlap there is, then copy it to the destination buffer.
-const size_t offset = range.start - addr;
+lldbassert(range.start <= addr);
+const size_t offset = addr - range.start;
+lldbassert(offset < range.size);
 const size_t overlap = std::min(size, range.size - offset);
 std::memcpy(buf, range.ptr + offset, overlap);
 return overlap;


Index: lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
===
--- lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
+++ lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
@@ -30,6 +30,7 @@
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/UnixSignals.h"
+#include "lldb/Utility/LLDBAssert.h"
 #include "llvm/Support/ConvertUTF.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Support/raw_ostream.h"
@@ -267,7 +268,9 @@
 // There's at least some overlap between the beginning of the desired range
 // (addr) and the current range.  Figure out where the overlap begins and
 // how much overlap there is, then copy it to the destination buffer.
-const size_t offset = range.start - addr;
+lldbassert(range.start <= addr);
+const size_t offset = addr - range.start;
+lldbassert(offset < range.size);
 const size_t overlap = std::min(size, range.size - offset);
 std::memcpy(buf, range.ptr + offset, overlap);
 return overlap;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r255083 - Fix DoReadMemory for Windows mini dumps.

2015-12-08 Thread Adrian McCarthy via lldb-commits
Author: amccarth
Date: Tue Dec  8 18:29:38 2015
New Revision: 255083

URL: http://llvm.org/viewvc/llvm-project?rev=255083&view=rev
Log:
Fix DoReadMemory for Windows mini dumps.

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

Modified:
lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp

Modified: 
lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp?rev=255083&r1=255082&r2=255083&view=diff
==
--- lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp 
(original)
+++ lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp 
Tue Dec  8 18:29:38 2015
@@ -30,6 +30,7 @@
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/UnixSignals.h"
+#include "lldb/Utility/LLDBAssert.h"
 #include "llvm/Support/ConvertUTF.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Support/raw_ostream.h"
@@ -267,7 +268,9 @@ ProcessWinMiniDump::DoReadMemory(lldb::a
 // There's at least some overlap between the beginning of the desired range
 // (addr) and the current range.  Figure out where the overlap begins and
 // how much overlap there is, then copy it to the destination buffer.
-const size_t offset = range.start - addr;
+lldbassert(range.start <= addr);
+const size_t offset = addr - range.start;
+lldbassert(offset < range.size);
 const size_t overlap = std::min(size, range.size - offset);
 std::memcpy(buf, range.ptr + offset, overlap);
 return overlap;


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


Re: [Lldb-commits] [PATCH] D15326: Rework breakpoint language filtering to use the symbol context's language.

2015-12-08 Thread Greg Clayton via lldb-commits
clayborg accepted this revision.
clayborg added a comment.

Just fix the comment as mentioned in the inline comments and this is ready. Jim 
should OK this as well.



Comment at: include/lldb/Target/Language.h:176
@@ -175,1 +175,3 @@
 
+// return the primary language, so if LanguageIsC(l), return 
eLanguageTypeC, etc.
+static lldb::LanguageType

Fix comment to say "so if LanguageIsC(language)" since the variable below is 
"language".


Repository:
  rL LLVM

http://reviews.llvm.org/D15326



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


Re: [Lldb-commits] [PATCH] D15326: Rework breakpoint language filtering to use the symbol context's language.

2015-12-08 Thread Dawn Perchik via lldb-commits
dawn requested a review of this revision.
dawn added a comment.

Please reconsider.  Thanks.


Repository:
  rL LLVM

http://reviews.llvm.org/D15326



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


Re: [Lldb-commits] [PATCH] D15326: Rework breakpoint language filtering to use the symbol context's language.

2015-12-08 Thread Dawn Perchik via lldb-commits
dawn added a reviewer: clayborg.
dawn added a comment.

(Added Greg - he wrote Mangled::GetLanguage - now GuessLanguage).

This patch removes the dependence on determining language from the name 
mangling for 99% of cases (there's still the much less common problem for 
symbols since Symbol 's GetLanguage calls Mangled::GuessLanguage).  It is a win 
win.


Repository:
  rL LLVM

http://reviews.llvm.org/D15326



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


Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Greg Clayton via lldb-commits
clayborg added a comment.

In http://reviews.llvm.org/D15312#305392, @dawn wrote:

> > Greg: But going forward I would like to see more of "find a struct named 'X'
>
>
> in CompilerDeclContext 'Y'" queries, instead of ...
>
> I think lldb should have both, a "search for anything named foo in my scope 
> context" (for when a user does "p foo"), and a "search for a thingy 
> (functions/types/variables/etc.) named foo in my scope context" (for when a 
> user does "expr --type function -- foo").


That is fine.

> 

> 

> > tberghammer: I am not sure if doing all of the parsing lazily is the good 
> > approach because of speed considerations.  ...  looking into the direction 
> > we are heading now we will need to parse more and more information to 
> > improve the expression evaluation

> 

> 

> Agreed.

> 

> > Greg:

> 

> > 

> 

> >   int32_t CompilerDeclContext::GetDepth (const CompilerDeclContext 
> > &decl_ctx);

> 

> > 

> 

> > This would get the depth of one CompilerDeclContext within another 
> > CompilerDeclContext, it would return -1 if "decl_ctx" doesn't fall within 
> > the object, and zero or above it is is contained.

> 

> 

> The problem with this is that it won't work for using declarations which 
> require information about the thing we're looking up before it can determine 
> the proper scope levels.

> 

> > BTW: I fixed DeclContextFindDeclByName to return a vector of CompilerDecl 
> > objects:

> 

> 

> Cool, but it needs to accept an optional type to deal with function 
> overloading.  I can add that and see if I can come up with a new patch that 
> uses the new DeclContextFindDeclByName. (In my copious spare time - heh).  
> But...


No rush for sure...

> One major performance benefit of my original implementation is that the 
> function's name and type *only* need to be tested in the case of a using 
> declaration, so in general it's much faster, because we only need to look for 
> the function's parent's lookup scope.  So, are you sure you want to go down 
> this path?


If you want to make this patch general then yes, but I wouldn't recommend it.

The functionality that you need is very specific to clang and your original 
implementation it just fine, I would say to just make a clang specific function 
that does exactly what you need and is only on ClangASTContext. We have 
discovered by our conversations above that the stuff you want to do doesn't map 
well onto CompilerDeclContext or CompilerDecl. Our needs are just too specific. 
So I vote to remove all code from TypeSystem.h and GoASTContext.h, change the 
version in ClangASTContext.h to be:

  uint32_t
  CountDeclLevels (clang::DeclContext *decl_ctx,
   clang::DeclContext *child_decl_ctx,
   ConstString *find_name = nullptr,
   CompilerType *find_type = nullptr) override;

And just do what you need to do as efficiently as you need to. When you are in 
ClangExpressionDeclMap.cpp you know that your type system is a ClangASTContext 
already, so you should be able to just use your existing AST.

My whole aversion to the previous solution was you were putting very specify 
clang stuff into an API (TypeSystem) that is designed to be language agnostic.


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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


Re: [Lldb-commits] [PATCH] D15326: Rework breakpoint language filtering to use the symbol context's language.

2015-12-08 Thread Dawn Perchik via lldb-commits
dawn added a comment.

In http://reviews.llvm.org/D15326#305163, @jingham wrote:

> The part of this fix which is using info in the SymbolContext to make the 
> language detection more accurate is fine.
>
> We have to do something better about how we detect the language from a 
> mangled name.  The target knows some that it should be able to contribute, 
> but there's no clear way to do that now.  But you aren't making that any 
> worse (except the one inline comment about cstring_is_mangled above, which 
> will need to get fixed) so I don't think you are obligated to solve that 
> problem now.


Can we please accept this as is?  It helps *a lot* - we know the *exact* 
language whenever we have debug info for an identifier.  I've been able to 
remove my #if 0's around the filtering code with this patch.  As you say, it 
doesn't make anything worse, and for many of us makes, things are far better.  
Why would you reject it?

The name mangling issue is a whole other beast - it was a flawed assumption 
from the start (and I complained about it then).  I'm simply trying to make the 
best with what we have.


Repository:
  rL LLVM

http://reviews.llvm.org/D15326



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


[Lldb-commits] [PATCH] D15357: Update code to silent some ARM/ARM64 specific compiler warnings

2015-12-08 Thread Muhammad Omair Javaid via lldb-commits
omjavaid created this revision.
omjavaid added a reviewer: tberghammer.
omjavaid added a subscriber: lldb-commits.
Herald added subscribers: rengolin, aemerson.

Following changes remove conditions where an unsigned integer is being tested 
to be greater or equal to zero.

These conditions will always remain true and will result in compiler warning 
though most compilers will optimize this out.

http://reviews.llvm.org/D15357

Files:
  source/Plugins/Instruction/ARM/EmulationStateARM.cpp
  source/Utility/ARM64_DWARF_Registers.cpp

Index: source/Utility/ARM64_DWARF_Registers.cpp
===
--- source/Utility/ARM64_DWARF_Registers.cpp
+++ source/Utility/ARM64_DWARF_Registers.cpp
@@ -109,7 +109,7 @@
 ::memset (®_info, 0, sizeof(RegisterInfo));
 ::memset (reg_info.kinds, LLDB_INVALID_REGNUM, sizeof(reg_info.kinds));
 
-if (reg_num >= x0 && reg_num <= pc)
+if (reg_num <= pc)
 {
 reg_info.byte_size = 8;
 reg_info.format = eFormatHex;
Index: source/Plugins/Instruction/ARM/EmulationStateARM.cpp
===
--- source/Plugins/Instruction/ARM/EmulationStateARM.cpp
+++ source/Plugins/Instruction/ARM/EmulationStateARM.cpp
@@ -77,7 +77,7 @@
 bool
 EmulationStateARM::StorePseudoRegisterValue (uint32_t reg_num, uint64_t value)
 {
-if ((dwarf_r0 <= reg_num) && (reg_num <= dwarf_cpsr))
+if (reg_num <= dwarf_cpsr)
 m_gpr[reg_num  - dwarf_r0] = (uint32_t) value;
 else if ((dwarf_s0 <= reg_num) && (reg_num <= dwarf_s31))
 {
@@ -105,7 +105,7 @@
 uint64_t value = 0;
 success = true;
 
-if ((dwarf_r0 <= reg_num) && (reg_num <= dwarf_cpsr))
+if (reg_num <= dwarf_cpsr)
 value = m_gpr[reg_num  - dwarf_r0];
 else if ((dwarf_s0 <= reg_num) && (reg_num <= dwarf_s31))
 {


Index: source/Utility/ARM64_DWARF_Registers.cpp
===
--- source/Utility/ARM64_DWARF_Registers.cpp
+++ source/Utility/ARM64_DWARF_Registers.cpp
@@ -109,7 +109,7 @@
 ::memset (®_info, 0, sizeof(RegisterInfo));
 ::memset (reg_info.kinds, LLDB_INVALID_REGNUM, sizeof(reg_info.kinds));
 
-if (reg_num >= x0 && reg_num <= pc)
+if (reg_num <= pc)
 {
 reg_info.byte_size = 8;
 reg_info.format = eFormatHex;
Index: source/Plugins/Instruction/ARM/EmulationStateARM.cpp
===
--- source/Plugins/Instruction/ARM/EmulationStateARM.cpp
+++ source/Plugins/Instruction/ARM/EmulationStateARM.cpp
@@ -77,7 +77,7 @@
 bool
 EmulationStateARM::StorePseudoRegisterValue (uint32_t reg_num, uint64_t value)
 {
-if ((dwarf_r0 <= reg_num) && (reg_num <= dwarf_cpsr))
+if (reg_num <= dwarf_cpsr)
 m_gpr[reg_num  - dwarf_r0] = (uint32_t) value;
 else if ((dwarf_s0 <= reg_num) && (reg_num <= dwarf_s31))
 {
@@ -105,7 +105,7 @@
 uint64_t value = 0;
 success = true;
 
-if ((dwarf_r0 <= reg_num) && (reg_num <= dwarf_cpsr))
+if (reg_num <= dwarf_cpsr)
 value = m_gpr[reg_num  - dwarf_r0];
 else if ((dwarf_s0 <= reg_num) && (reg_num <= dwarf_s31))
 {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Dawn Perchik via lldb-commits
dawn added a comment.

> Greg: But going forward I would like to see more of "find a struct named 'X'


in CompilerDeclContext 'Y'" queries, instead of ...

I think lldb should have both, a "search for anything named foo in my scope 
context" (for when a user does "p foo"), and a "search for a thingy 
(functions/types/variables/etc.) named foo in my scope context" (for when a 
user does "expr --type function -- foo").

> tberghammer: I am not sure if doing all of the parsing lazily is the good 
> approach because of speed considerations.  ...  looking into the direction we 
> are heading now we will need to parse more and more information to improve 
> the expression evaluation


Agreed.

> Greg:

> 

>   int32_t CompilerDeclContext::GetDepth (const CompilerDeclContext &decl_ctx);

> 

> This would get the depth of one CompilerDeclContext within another 
> CompilerDeclContext, it would return -1 if "decl_ctx" doesn't fall within the 
> object, and zero or above it is is contained.


The problem with this is that it won't work for using declarations which 
require information about the thing we're looking up before it can determine 
the proper scope levels.

> BTW: I fixed DeclContextFindDeclByName to return a vector of CompilerDecl 
> objects:


Cool, but it needs to accept an optional type to deal with function 
overloading.  I can add that and see if I can come up with a new patch that 
uses the new DeclContextFindDeclByName. (In my copious spare time - heh).  
But...

One major performance benefit of my original implementation is that the 
function's name and type *only* need to be tested in the case of a using 
declaration, so in general it's much faster, because we only need to look for 
the function's parent's lookup scope.  So, are you sure you want to go down 
this path?


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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


[Lldb-commits] [PATCH] D15355: Add failure paths to a few JSONNumber members

2015-12-08 Thread Muhammad Omair Javaid via lldb-commits
omjavaid created this revision.
omjavaid added a reviewer: tberghammer.
omjavaid added a subscriber: lldb-commits.

This patch updates GetAsUnsigned(), GetAsSigned(), and GetAsDouble() JSONNumber 
functions to add failure check.

The previous code was generating compiler warnings for not being able to 
provide a return path for all possibilities.



http://reviews.llvm.org/D15355

Files:
  include/lldb/Utility/JSON.h
  source/Utility/JSON.cpp

Index: source/Utility/JSON.cpp
===
--- source/Utility/JSON.cpp
+++ source/Utility/JSON.cpp
@@ -60,46 +60,64 @@
 s.Printf("\"%s\"", json_string_quote_metachars(m_data).c_str());
 }
 
-uint64_t
-JSONNumber::GetAsUnsigned() const
+bool
+JSONNumber::GetAsUnsigned(uint64_t &value) const
 {
 switch (m_data_type)
 {
-case DataType::Unsigned:
-return m_data.m_unsigned;
 case DataType::Signed:
-return (uint64_t)m_data.m_signed;
+	value = (uint64_t)m_data.m_signed;
+	break;
 case DataType::Double:
-return (uint64_t)m_data.m_double;
+	value = (uint64_t)m_data.m_double;
+	break;
+case DataType::Unsigned:
+	value = m_data.m_unsigned;
+	break;
+default:
+	return false;
 }
+return true;
 }
 
-uint64_t
-JSONNumber::GetAsSigned() const
+bool
+JSONNumber::GetAsSigned(int64_t &value) const
 {
 switch (m_data_type)
 {
 case DataType::Unsigned:
-return (int64_t)m_data.m_unsigned;
-case DataType::Signed:
-return m_data.m_signed;
+	value = (int64_t)m_data.m_unsigned;
+	break;
 case DataType::Double:
-return (int64_t)m_data.m_double;
+	value = (int64_t)m_data.m_double;
+	break;
+case DataType::Signed:
+	value = m_data.m_signed;
+	break;
+default:
+	return false;
 }
+return true;
 }
 
-double
-JSONNumber::GetAsDouble() const
+bool
+JSONNumber::GetAsDouble(double &value) const
 {
 switch (m_data_type)
 {
 case DataType::Unsigned:
-return (double)m_data.m_unsigned;
+	value = (double)m_data.m_unsigned;
+	break;
 case DataType::Signed:
-return (double)m_data.m_signed;
+	value = (double)m_data.m_signed;
+	break;
 case DataType::Double:
-return m_data.m_double;
+	value = m_data.m_double;
+	break;
+default:
+	return false;
 }
+return true;
 }
 
 void
Index: include/lldb/Utility/JSON.h
===
--- include/lldb/Utility/JSON.h
+++ include/lldb/Utility/JSON.h
@@ -142,14 +142,14 @@
 void
 Write(Stream& s) override;
 
-uint64_t
-GetAsUnsigned() const;
+bool
+GetAsUnsigned(uint64_t &value) const;
 
-uint64_t
-GetAsSigned() const;
+bool
+GetAsSigned(int64_t &value) const;
 
-double
-GetAsDouble() const;
+bool
+GetAsDouble(double &value) const;
 
 static bool classof(const JSONValue *V)
 {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r255060 - Remove the -c option from dotest.py.

2015-12-08 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Tue Dec  8 16:15:48 2015
New Revision: 255060

URL: http://llvm.org/viewvc/llvm-project?rev=255060&view=rev
Log:
Remove the -c option from dotest.py.

This seems to be a legacy relic from days gone by where the
remote test suite runner operated completely differently than it
does today.  git blames and comments traced this functionality
back to about 2012, and nobody seems to know anything about it
now.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py?rev=255060&r1=255059&r2=255060&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
 Tue Dec  8 16:15:48 2015
@@ -26,8 +26,8 @@ class SBDirCheckerCase(TestBase):
 """Test the SB API directory and make sure there's no unwanted 
stuff."""
 
 # Only proceed if this is an Apple OS, "x86_64", and local platform.
-if not (self.platformIsDarwin() and self.getArchitecture() == "x86_64" 
and not configuration.test_remote):
-self.skipTest("This test is only for LLDB.framework built 64-bit 
and !configuration.test_remote")
+if not (self.platformIsDarwin() and self.getArchitecture() == 
"x86_64"):
+self.skipTest("This test is only for LLDB.framework built 64-bit")
 if self.getArchitecture() == "i386":
 self.skipTest("LLDB is 64-bit and cannot be linked to 32-bit test 
program.")
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=255060&r1=255059&r2=255060&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Tue Dec  8 
16:15:48 2015
@@ -72,26 +72,12 @@ failuresPerCategory = {}
 # The path to LLDB.framework is optional.
 lldbFrameworkPath = None
 
-# The config file is optional.
-configFile = None
-
 # Test suite repeat count.  Can be overwritten with '-# count'.
 count = 1
 
-# The dictionary as a result of sourcing configFile.
-config = {}
-# The pre_flight and post_flight functions come from reading a config file.
-pre_flight = None
-post_flight = None
-# So do the lldbtest_remote_sandbox and lldbtest_remote_shell_template 
variables.
-test_remote = False
-lldbtest_remote_sandbox = None
-lldbtest_remote_shell_template = None
-
-# The 'archs' and 'compilers' can be specified via either command line or 
configFile,
-# with the command line overriding the configFile.  The corresponding options 
can be
-# specified more than once. For example, "-A x86_64 -A i386" => 
archs=['x86_64', 'i386']
-# and "-C gcc -C clang" => compilers=['gcc', 'clang'].
+# The 'archs' and 'compilers' can be specified via command line.  The 
corresponding
+# options can be specified more than once. For example, "-A x86_64 -A i386"
+# => archs=['x86_64', 'i386'] and "-C gcc -C clang" => compilers=['gcc', 
'clang'].
 archs = None# Must be initialized after option parsing
 compilers = None# Must be initialized after option parsing
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=255060&r1=255059&r2=255060&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Dec  8 16:15:48 2015
@@ -300,14 +300,6 @@ def parseOptionsAndInitTestdirs():
   "functionality (-G lldb-mi, --skip-category lldb-mi) instead.")
 sys.exit(1)
 
-if args.c:
-if args.c.startswith('-'):
-usage(parser)
-configuration.configFile = args.c
-if not os.path.isfile(configuration.configFile):
-print('Config file:', configuration.configFile, 'does not exist!')
-usage(parser)
-
 if args.d:
 sys.stdout.write("Suspending the process %d to wait for debugger to 
attach...\n" % os.getpid())
 sys.s

[Lldb-commits] [PATCH] D15347: Add Hexagon ABI to System Initialization

2015-12-08 Thread Ted Woodward via lldb-commits
ted created this revision.
ted added a reviewer: clayborg.
ted added a subscriber: lldb-commits.

When the Hexagon ABI was added, it was inadvertently left out of 
initialization/termination. This patch adds it.

http://reviews.llvm.org/D15347

Files:
  source/API/SystemInitializerFull.cpp

Index: source/API/SystemInitializerFull.cpp
===
--- source/API/SystemInitializerFull.cpp
+++ source/API/SystemInitializerFull.cpp
@@ -32,6 +32,7 @@
 #include "Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h"
 #include "Plugins/ABI/SysV-arm/ABISysV_arm.h"
 #include "Plugins/ABI/SysV-arm64/ABISysV_arm64.h"
+#include "Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h"
 #include "Plugins/ABI/SysV-i386/ABISysV_i386.h"
 #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h"
 #include "Plugins/ABI/SysV-ppc/ABISysV_ppc.h"
@@ -277,6 +278,7 @@
 ABIMacOSX_arm64::Initialize();
 ABISysV_arm::Initialize();
 ABISysV_arm64::Initialize();
+ABISysV_hexagon::Initialize();
 ABISysV_i386::Initialize();
 ABISysV_x86_64::Initialize();
 ABISysV_ppc::Initialize();
@@ -395,6 +397,7 @@
 ABIMacOSX_arm64::Terminate();
 ABISysV_arm::Terminate();
 ABISysV_arm64::Terminate();
+ABISysV_hexagon::Terminate();
 ABISysV_i386::Terminate();
 ABISysV_x86_64::Terminate();
 ABISysV_ppc::Terminate();


Index: source/API/SystemInitializerFull.cpp
===
--- source/API/SystemInitializerFull.cpp
+++ source/API/SystemInitializerFull.cpp
@@ -32,6 +32,7 @@
 #include "Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h"
 #include "Plugins/ABI/SysV-arm/ABISysV_arm.h"
 #include "Plugins/ABI/SysV-arm64/ABISysV_arm64.h"
+#include "Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h"
 #include "Plugins/ABI/SysV-i386/ABISysV_i386.h"
 #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h"
 #include "Plugins/ABI/SysV-ppc/ABISysV_ppc.h"
@@ -277,6 +278,7 @@
 ABIMacOSX_arm64::Initialize();
 ABISysV_arm::Initialize();
 ABISysV_arm64::Initialize();
+ABISysV_hexagon::Initialize();
 ABISysV_i386::Initialize();
 ABISysV_x86_64::Initialize();
 ABISysV_ppc::Initialize();
@@ -395,6 +397,7 @@
 ABIMacOSX_arm64::Terminate();
 ABISysV_arm::Terminate();
 ABISysV_arm64::Terminate();
+ABISysV_hexagon::Terminate();
 ABISysV_i386::Terminate();
 ABISysV_x86_64::Terminate();
 ABISysV_ppc::Terminate();
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r255049 - Remove default case in switch which covers all enumeration values

2015-12-08 Thread Ed Maste via lldb-commits
Author: emaste
Date: Tue Dec  8 14:50:35 2015
New Revision: 255049

URL: http://llvm.org/viewvc/llvm-project?rev=255049&view=rev
Log:
Remove default case in switch which covers all enumeration values

This also conveniently eliminates another warning from the unintentional
use of a trigraph:

warning: trigraph converted to '[' character [-Wtrigraphs]
default: printf("???(%u)", type);
  ^

Modified:
lldb/trunk/source/Symbol/Type.cpp

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=255049&r1=255048&r2=255049&view=diff
==
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Tue Dec  8 14:50:35 2015
@@ -56,7 +56,6 @@ CompilerContext::Dump() const
 case CompilerContextKind::Variable: printf("Variable"); break;
 case CompilerContextKind::Enumeration:  printf("Enumeration"); 
break;
 case CompilerContextKind::Typedef:  printf("Typedef"); break;
-default: printf("???(%u)", type);
 }
 printf("(\"%s\")\n", name.GetCString());
 }


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


[Lldb-commits] [lldb] r255048 - Remove the -X option from dotest.py

2015-12-08 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Tue Dec  8 14:36:22 2015
New Revision: 255048

URL: http://llvm.org/viewvc/llvm-project?rev=255048&view=rev
Log:
Remove the -X option from dotest.py

This removes the option to exclude a single directory.  This is
part of an effort to remove unused options and cleanup the interface
to the test suite.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=255048&r1=255047&r2=255048&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Tue Dec  8 
14:36:22 2015
@@ -107,9 +107,6 @@ bmBreakpointSpec = None
 # The benchmark iteration count, as specified by the '-y' option.
 bmIterationCount = -1
 
-# By default, don't exclude any directories.  Use '-X' to add one excluded 
directory.
-excluded = set(['.svn', '.git'])
-
 # By default, failfast is False.  Use '-F' to overwrite it.
 failfast = False
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=255048&r1=255047&r2=255048&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Dec  8 14:36:22 2015
@@ -410,11 +410,6 @@ def parseOptionsAndInitTestdirs():
 if args.w:
 os.environ['LLDB_WAIT_BETWEEN_TEST_CASES'] = 'YES'
 
-if args.X:
-if args.X.startswith('-'):
-usage(parser)
-configuration.excluded.add(args.X)
-
 if args.x:
 if args.x.startswith('-'):
 usage(parser)
@@ -859,7 +854,9 @@ def setupSysPath():
 def visit(prefix, dir, names):
 """Visitor function for os.path.walk(path, visit, arg)."""
 
-if set(dir.split(os.sep)).intersection(configuration.excluded):
+dir_components = set(dir.split(os.sep))
+excluded_components = set(['.svn', '.git'])
+if dir_components.intersection(excluded_components):
 #print("Detected an excluded dir component: %s" % dir)
 return
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py?rev=255048&r1=255047&r2=255048&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py Tue Dec  8 
14:36:22 2015
@@ -63,7 +63,6 @@ def create_parser():
 group.add_argument('-f', metavar='filterspec', action='append', 
help='Specify a filter, which consists of the test class name, a dot, followed 
by the test method, to only admit such test into the test suite')  # FIXME: 
Example?
 X('-l', "Don't skip long running tests")
 group.add_argument('-p', metavar='pattern', help='Specify a regexp 
filename pattern for inclusion in the test suite')
-group.add_argument('-X', metavar='directory', help="Exclude a directory 
from consideration for test discovery. -X types => if 'types' appear in the 
pathname components of a potential testfile, it will be ignored")
 group.add_argument('-G', '--category', metavar='category', 
action='append', dest='categoriesList', help=textwrap.dedent('''Specify 
categories of test cases of interest. Can be specified more than once.'''))
 group.add_argument('--skip-category', metavar='category', action='append', 
dest='skipCategories', help=textwrap.dedent('''Specify categories of test cases 
to skip. Takes precedence over -G. Can be specified more than once.'''))
 


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


Re: [Lldb-commits] [PATCH] D15326: Rework breakpoint language filtering to use the symbol context's language.

2015-12-08 Thread Jim Ingham via lldb-commits
jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

The part of this fix which is using info in the SymbolContext to make the 
language detection more accurate is fine.

We have to do something better about how we detect the language from a mangled 
name.  The target knows some that it should be able to contribute, but there's 
no clear way to do that now.  But you aren't making that any worse (except the 
one inline comment about cstring_is_mangled above, which will need to get 
fixed) so I don't think you are obligated to solve that problem now.


Repository:
  rL LLVM

http://reviews.llvm.org/D15326



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


[Lldb-commits] [lldb] r255041 - Remove the -g option from dotest.py

2015-12-08 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Tue Dec  8 12:48:53 2015
New Revision: 255041

URL: http://llvm.org/viewvc/llvm-project?rev=255041&view=rev
Log:
Remove the -g option from dotest.py

This removes the non-exclusive filterspec option as part of an
effort to remove unused / deprecated command line options from
dotest.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=255041&r1=255040&r2=255041&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Tue Dec  8 
12:48:53 2015
@@ -120,11 +120,6 @@ filters = []
 # Use '-k' to specify a runhook.
 runHooks = []
 
-# If '-g' is specified, the filterspec is not exclusive.  If a test module does
-# not contain testclass.testmethod which matches the filterspec, the whole test
-# module is still admitted into our test suite.  fs4all flag defaults to True.
-fs4all = True
-
 # Ignore the build search path relative to this script to locate the lldb.py 
module.
 ignore = False
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=255041&r1=255040&r2=255041&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Dec  8 12:48:53 2015
@@ -339,9 +339,6 @@ def parseOptionsAndInitTestdirs():
 # output-on-success.
 configuration.no_multiprocess_test_runner = True
 
-if args.g:
-configuration.fs4all = False
-
 if args.i:
 configuration.ignore = True
 
@@ -915,8 +912,7 @@ def visit(prefix, dir, names):
 continue
 
 # Forgo this module if the (base, filterspec) combo is invalid
-# and no '-g' option is specified
-if configuration.filters and configuration.fs4all and not filtered:
+if configuration.filters and not filtered:
 continue
 
 # Add either the filtered test case(s) (which is done before) or 
the entire test class.

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py?rev=255041&r1=255040&r2=255041&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py Tue Dec  8 
12:48:53 2015
@@ -61,7 +61,6 @@ def create_parser():
 group = parser.add_argument_group('Test filtering options')
 group.add_argument('-N', choices=['dwarf', 'dwo', 'dsym'], help="Don't do 
test cases marked with the @dsym_test/@dwarf_test/@dwo_test decorator by 
passing dsym/dwarf/dwo as the option arg")
 group.add_argument('-f', metavar='filterspec', action='append', 
help='Specify a filter, which consists of the test class name, a dot, followed 
by the test method, to only admit such test into the test suite')  # FIXME: 
Example?
-X('-g', 'If specified, the filterspec by -f is not exclusive, i.e., if a 
test module does not match the filterspec (testclass.testmethod), the whole 
module is still admitted to the test suite')
 X('-l', "Don't skip long running tests")
 group.add_argument('-p', metavar='pattern', help='Specify a regexp 
filename pattern for inclusion in the test suite')
 group.add_argument('-X', metavar='directory', help="Exclude a directory 
from consideration for test discovery. -X types => if 'types' appear in the 
pathname components of a potential testfile, it will be ignored")


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


[Lldb-commits] [lldb] r255040 - Remove the -b option from dotest.py

2015-12-08 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Tue Dec  8 12:43:16 2015
New Revision: 255040

URL: http://llvm.org/viewvc/llvm-project?rev=255040&view=rev
Log:
Remove the -b option from dotest.py

This removes the blacklist option as part of an effort to remove
unused / unmaintained command line options from the test suite.

Removed:
lldb/trunk/packages/Python/lldbsuite/test/blacklist.py
Modified:
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Removed: lldb/trunk/packages/Python/lldbsuite/test/blacklist.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/blacklist.py?rev=255039&view=auto
==
--- lldb/trunk/packages/Python/lldbsuite/test/blacklist.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/blacklist.py (removed)
@@ -1,18 +0,0 @@
-"""
-'blacklist' is a Python dictionary, it stores the mapping of a string 
describing
-either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a
-string) it is blacklisted.
-
-Following is an example which states that test class IntegerTypesExprTestCase
-should be skipped because 'This test class crashed' and the test case
-FoundationTestCase.test_data_type_and_expr_with_dsym should be skipped because
-it is 'Temporarily disabled'.
-
-blacklist = {'IntegerTypesExprTestCase': 'This test class crashed',
- 'FoundationTestCase.test_data_type_and_expr_with_dsym': 
'Temporarily disabled'
- }
-"""
-
-blacklist = {'STLTestCase': ' Crashed while running 
the entire test suite'
- # To skip this test case: ./dotest.py -b blacklist.py -v -w 2> 
~/Developer/Log/lldbtest.log
- }

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=255040&r1=255039&r2=255040&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Tue Dec  8 
12:43:16 2015
@@ -60,13 +60,6 @@ dont_do_dsym_test = False
 dont_do_dwarf_test = False
 dont_do_dwo_test = False
 
-# The blacklist is optional (-b blacklistFile) and allows a central place to 
skip
-# testclass's and/or testclass.testmethod's.
-blacklist = None
-
-# The dictionary as a result of sourcing blacklistFile.
-blacklistConfig = {}
-
 # The list of categories we said we care about
 categoriesList = None
 # set to true if we are going to use categories for cherry-picking test cases

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=255040&r1=255039&r2=255040&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Dec  8 12:43:16 2015
@@ -300,17 +300,6 @@ def parseOptionsAndInitTestdirs():
   "functionality (-G lldb-mi, --skip-category lldb-mi) instead.")
 sys.exit(1)
 
-if args.b:
-if args.b.startswith('-'):
-usage(parser)
-blacklistFile = args.b
-if not os.path.isfile(blacklistFile):
-print('Blacklist file:', blacklistFile, 'does not exist!')
-usage(parser)
-# Now read the blacklist contents and assign it to blacklist.
-execfile(blacklistFile, globals(), configuration.blacklistConfig)
-configuration.blacklist = 
configuration.blacklistConfig.get('blacklist')
-
 if args.c:
 if args.c.startswith('-'):
 usage(parser)

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py?rev=255040&r1=255039&r2=255040&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py Tue Dec  8 
12:43:16 2015
@@ -60,7 +60,6 @@ def create_parser():
 # Test filtering options
 group = parser.add_argument_group('Test filtering options')
 group.add_argument('-N', choices=['dwarf', 'dwo', 'dsym'], help="Don't do 
test cases marked with the @dsym_test/@dwarf_test/@dwo_test decorator by 
passing dsym/dwarf/dwo as the option arg")
-group.add_argument('-b', metavar='blacklist', help='Read a blacklist file 
specified after this option')
 group.add_argument('-f', metavar='filterspec', action='append', 
help='Specify a filter, which consists of the test class name, a dot, foll

Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Greg Clayton via lldb-commits
clayborg added a comment.

BTW: I fixed DeclContextFindDeclByName to return a vector of CompilerDecl 
objects:

% svn commit
Sendinginclude/lldb/Symbol/ClangASTContext.h
Sendinginclude/lldb/Symbol/GoASTContext.h
Sendinginclude/lldb/Symbol/TypeSystem.h
Sendingsource/Symbol/ClangASTContext.cpp
Sendingsource/Symbol/CompilerDeclContext.cpp
Sendingsource/Symbol/TypeSystem.cpp
Transmitting file data ..
Committed revision 255038.


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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


[Lldb-commits] [lldb] r255038 - Change DeclContextFindDeclByName to return a vector of CompilerDecl objects. Opaque pointers should only be used for the decl context object. Also made a default implem

2015-12-08 Thread Greg Clayton via lldb-commits
Author: gclayton
Date: Tue Dec  8 12:39:50 2015
New Revision: 255038

URL: http://llvm.org/viewvc/llvm-project?rev=255038&view=rev
Log:
Change DeclContextFindDeclByName to return a vector of CompilerDecl objects. 
Opaque pointers should only be used for the decl context object. Also made a 
default implementation so that GoASTContext doesn't need to override 
DeclContextFindDeclByName.


Modified:
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/GoASTContext.h
lldb/trunk/include/lldb/Symbol/TypeSystem.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=255038&r1=255037&r2=255038&view=diff
==
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Tue Dec  8 12:39:50 2015
@@ -564,7 +564,7 @@ public:
 // CompilerDeclContext override functions
 //--
 
-std::vector
+std::vector
 DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name) 
override;
 
 bool

Modified: lldb/trunk/include/lldb/Symbol/GoASTContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/GoASTContext.h?rev=255038&r1=255037&r2=255038&view=diff
==
--- lldb/trunk/include/lldb/Symbol/GoASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/GoASTContext.h Tue Dec  8 12:39:50 2015
@@ -100,12 +100,6 @@ class GoASTContext : public TypeSystem
 // CompilerDeclContext functions
 //--
 
-std::vector
-DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name) 
override
-{
-return std::vector();
-}
-
 bool
 DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) override
 {

Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=255038&r1=255037&r2=255038&view=diff
==
--- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original)
+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Tue Dec  8 12:39:50 2015
@@ -25,6 +25,7 @@
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Expression/Expression.h"
 #include "lldb/Host/Mutex.h"
+#include "lldb/Symbol/CompilerDecl.h"
 #include "lldb/Symbol/CompilerDeclContext.h"
 
 class DWARFDIE;
@@ -141,8 +142,8 @@ public:
 // CompilerDeclContext functions
 //--
 
-virtual std::vector
-DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name) = 0;
+virtual std::vector
+DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name);
 
 virtual bool
 DeclContextIsStructUnionOrClass (void *opaque_decl_ctx) = 0;

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=255038&r1=255037&r2=255038&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Dec  8 12:39:50 2015
@@ -9627,10 +9627,10 @@ ClangASTContext::DeclGetFunctionArgument
 // CompilerDeclContext functions
 //--
 
-std::vector
+std::vector
 ClangASTContext::DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString 
name)
 {
-std::vector found_decls;
+std::vector found_decls;
 if (opaque_decl_ctx)
 {
 DeclContext *root_decl_ctx = (DeclContext *)opaque_decl_ctx;
@@ -9665,7 +9665,7 @@ ClangASTContext::DeclContextFindDeclByNa
 {
 IdentifierInfo *ii = nd->getIdentifier();
 if (ii != nullptr && 
ii->getName().equals(name.AsCString(nullptr)))
-found_decls.push_back(nd);
+found_decls.push_back(CompilerDecl(this, 
nd));
 }
 }
 }
@@ -9673,7 +9673,7 @@ ClangASTContext::DeclContextFindDeclByNa
 {
 IdentifierInfo *ii = nd->getIdentifier();
 if (ii != nullptr && 
ii->getName().equals(name.AsCString(nullptr)))
-found_decls.push_back(nd);
+found_decls.push_back(CompilerDecl(t

[Lldb-commits] [lldb] r255037 - Remove +b option from dotest.py

2015-12-08 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Tue Dec  8 12:36:05 2015
New Revision: 255037

URL: http://llvm.org/viewvc/llvm-project?rev=255037&view=rev
Log:
Remove +b option from dotest.py

Modified:
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=255037&r1=255036&r2=255037&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Tue Dec  8 
12:36:05 2015
@@ -56,9 +56,6 @@ def setupCrashInfoHook():
 # The test suite.
 suite = unittest2.TestSuite()
 
-# By default, benchmarks tests are not run.
-just_do_benchmarks_test = False
-
 dont_do_dsym_test = False
 dont_do_dwarf_test = False
 dont_do_dwo_test = False

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=255037&r1=255036&r2=255037&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Dec  8 12:36:05 2015
@@ -300,9 +300,6 @@ def parseOptionsAndInitTestdirs():
   "functionality (-G lldb-mi, --skip-category lldb-mi) instead.")
 sys.exit(1)
 
-if args.plus_b:
-lldbsuite.test.just_do_benchmarks_test = True
-
 if args.b:
 if args.b.startswith('-'):
 usage(parser)

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py?rev=255037&r1=255036&r2=255037&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py Tue Dec  8 
12:36:05 2015
@@ -60,7 +60,6 @@ def create_parser():
 # Test filtering options
 group = parser.add_argument_group('Test filtering options')
 group.add_argument('-N', choices=['dwarf', 'dwo', 'dsym'], help="Don't do 
test cases marked with the @dsym_test/@dwarf_test/@dwo_test decorator by 
passing dsym/dwarf/dwo as the option arg")
-X('+b', 'Just do benchmark tests', dest='plus_b')
 group.add_argument('-b', metavar='blacklist', help='Read a blacklist file 
specified after this option')
 group.add_argument('-f', metavar='filterspec', action='append', 
help='Specify a filter, which consists of the test class name, a dot, followed 
by the test method, to only admit such test into the test suite')  # FIXME: 
Example?
 X('-g', 'If specified, the filterspec by -f is not exclusive, i.e., if a 
test module does not match the filterspec (testclass.testmethod), the whole 
module is still admitted to the test suite')

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=255037&r1=255036&r2=255037&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Tue Dec  8 12:36:05 
2015
@@ -521,8 +521,7 @@ def benchmarks_test(func):
 raise Exception("@benchmarks_test can only be used to decorate a test 
method")
 @wraps(func)
 def wrapper(self, *args, **kwargs):
-if not configuration.just_do_benchmarks_test:
-self.skipTest("benchmarks tests")
+self.skipTest("benchmarks test")
 return func(self, *args, **kwargs)
 
 # Mark this function as such to separate them from the regular tests.
@@ -1457,19 +1456,6 @@ class Base(unittest2.TestCase):
 # used for all the test cases.
 self.testMethodName = self._testMethodName
 
-# Benchmarks test is decorated with @benchmarks_test,
-# which also sets the "__benchmarks_test__" attribute of the
-# function object to True.
-try:
-if configuration.just_do_benchmarks_test:
-testMethod = getattr(self, self._testMethodName)
-if getattr(testMethod, "__benchmarks_test__", False):
-pass
-else:
-self.skipTest("non benchmarks test")
-except AttributeError:
-pass
-
 # This is for the case of directly spawning 'lldb'/'gdb' and 
interacting
 # with it using pexpect.
 self.child = None


___

[Lldb-commits] [lldb] r255035 - Remove the -D option from dotest.py.

2015-12-08 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Tue Dec  8 12:25:38 2015
New Revision: 255035

URL: http://llvm.org/viewvc/llvm-project?rev=255035&view=rev
Log:
Remove the -D option from dotest.py.

This removes the option to dump Python sys.path variable as part
of an effort to remove unused options.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=255035&r1=255034&r2=255035&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Tue Dec  8 
12:25:38 2015
@@ -110,9 +110,6 @@ compilers = None# Must be initialize
 # just that.
 cflags_extras = ''
 
-# Dump the Python sys.path variable.  Use '-D' to dump sys.path.
-dumpSysPath = False
-
 # Full path of the benchmark executable, as specified by the '-e' option.
 bmExecutable = None
 # The breakpoint specification of bmExecutable, as specified by the '-x' 
option.

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=255035&r1=255034&r2=255035&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Dec  8 12:25:38 2015
@@ -278,9 +278,6 @@ def parseOptionsAndInitTestdirs():
 if args.skipCategories:
 configuration.skipCategories = 
test_categories.validate(args.skipCategories, False)
 
-if args.D:
-configuration.dumpSysPath = True
-
 if args.E:
 cflags_extras = args.E
 os.environ['CFLAGS_EXTRAS'] = cflags_extras
@@ -875,8 +872,6 @@ def setupSysPath():
 
 # This is to locate the lldb.py module.  Insert it right after 
sys.path[0].
 sys.path[1:1] = [lldbPythonDir]
-if configuration.dumpSysPath:
-print("sys.path:", sys.path)
 
 def visit(prefix, dir, names):
 """Visitor function for os.path.walk(path, visit, arg)."""

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py?rev=255035&r1=255034&r2=255035&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py Tue Dec  8 
12:25:38 2015
@@ -56,7 +56,6 @@ def create_parser():
 # FIXME? This won't work for different extra flags according to each arch.
 group.add_argument('-E', metavar='extra-flags', 
help=textwrap.dedent('''Specify the extra flags to be passed to the toolchain 
when building the inferior programs to be debugged
suggestions: do not 
lump the "-A arch1 -A arch2" together such that the -E option applies to only 
one of the architectures'''))
-X('-D', 'Dump the Python sys.path variable')
 
 # Test filtering options
 group = parser.add_argument_group('Test filtering options')


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


Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Greg Clayton via lldb-commits
clayborg added a comment.

In http://reviews.llvm.org/D15312#304652, @dawn wrote:

> Thanks Greg!  To address your main point:
>
> > So either make it generic, or clang specific.
>
>
> DeclContextCountDeclLevels's interface follows DeclContextFindDeclByName 
> (authored by Paul Herman).  If DeclContextCountDeclLevels is to change, then 
> DeclContextFindDeclByName should also change for consistency.


Indeed it should be. It should return a vector of CompilerDecl objects.

> My take on this is that the code in 
> ClangExpressionDeclMap::FindExternalVisibleDecls which calls these 
> scope-based lookup routines should be moved out of ClangExpressionDeclMap.cpp 
> into CompilerExpressionDeclMap.cpp, so the interfaces to 
> DeclContextFindDeclByName/DeclContextCountDeclLevels should remain generic 
> while the implementations are compiler specific.  That's way more than I'd 
> like to take on as part of this patch however.


I would still like to see your new 
ClangASTContext::DeclContextCountDeclLevels() broken up into one or more 
functions that are more useful on CompilerDeclContext. In my previous comment I 
mentioned a new CompilerDeclContext that could be used to get the depth:

  int32_t CompilerDeclContext::GetDepth (const CompilerDeclContext &decl_ctx);

This would get the depth of one CompilerDeclContext within another 
CompilerDeclContext, it would return -1 if "decl_ctx" doesn't fall within the 
object, and zero or above it is is contained.

Not sure how to break out the other thing with the name and type, but thing 
about what would make a good API on CompilerDeclContext and what questions you 
might ask of it. The DeclContextCountDeclLevels seems to be too specific.

> Paul, any feedback from you on this?


We should be using our CompilerDecl and CompilerDeclContext objects. No one 
should be using opaque pointers outside the API unless you are making the 
objects or changing the contained decl/decl context.


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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


Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Greg Clayton via lldb-commits
clayborg added a comment.

That does make sense. Lets ignore the partial parsing until we find a 
performance problem that needs to be fixed.

By I really do want to see the API on CompilerDeclContext and CompilerDecl get 
a lot more member functions that can do useful things now that we have this 
infrastructure.


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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


Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Tamas Berghammer via lldb-commits
tberghammer added a comment.

I am not sure if doing all of the parsing lazily is the good approach because 
of speed considerations.

The problem is that if we do everything lazily then in one side we are parsing 
only the information what we need but on the other side it is very difficult 
(or impossible) to make it multi threaded. In case of a high end machine I 
think doing the parsing in 8-16 core (or even more) can be faster then the lazy 
approach if we have to parse a lot of information anyway.

I don't have any measurements but looking into the direction we are heading now 
we will need to parse more and more information to improve the expression 
evaluation (e.g. to support limit debug info) and to get it a parse a lot of 
thing upfront might be a better approach. In terms of the performance I expect 
it to be a small to medium difference (not sure about memory) but will speed up 
the debugging experience later. For me it is more annoying when I have to wait 
to evaluate an expression then to wait for the debugger to start up.


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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


Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Greg Clayton via lldb-commits
clayborg added a comment.

So one thing I don't want to propagate here is the "go parse everything inside 
a decl context" if we can avoid it. I believe the first CompilerDeclContext 
patch did this, but I don't remember the exact details so I could be wrong. But 
going forward I would like to see more of "find a struct named 'X' in 
CompilerDeclContext 'Y'" queries, instead of "parse everything in 
CompilerDeclContext 'Y' and then I would look for 'X'". Or if we know what we 
are looking for (function decl contexts and lexical block decl contexts in this 
case), then I would prefer to have "go parse all function and block decl 
contexts in CompilerDeclContext 'Y'".


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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


[Lldb-commits] [lldb] r255025 - flip on executable bit on test runner tests

2015-12-08 Thread Todd Fiala via lldb-commits
Author: tfiala
Date: Tue Dec  8 10:22:27 2015
New Revision: 255025

URL: http://llvm.org/viewvc/llvm-project?rev=255025&view=rev
Log:
flip on executable bit on test runner tests

Modified:
lldb/trunk/packages/Python/lldbsuite/test/test_runner/test/inferior.py   
(contents, props changed)

lldb/trunk/packages/Python/lldbsuite/test/test_runner/test/process_control_tests.py
   (contents, props changed)

Modified: lldb/trunk/packages/Python/lldbsuite/test/test_runner/test/inferior.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/test_runner/test/inferior.py?rev=255025&r1=255024&r2=255025&view=diff
==
(empty)

Propchange: 
lldb/trunk/packages/Python/lldbsuite/test/test_runner/test/inferior.py
--
svn:executable = *

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/test_runner/test/process_control_tests.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/test_runner/test/process_control_tests.py?rev=255025&r1=255024&r2=255025&view=diff
==
(empty)

Propchange: 
lldb/trunk/packages/Python/lldbsuite/test/test_runner/test/process_control_tests.py
--
svn:executable = *


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


Re: [Lldb-commits] [PATCH] D15318: Get rid of global variables in dotest.py

2015-12-08 Thread Todd Fiala via lldb-commits
> I just got a clean build

And by that, I mean a clean test run.

On Tue, Dec 8, 2015 at 8:17 AM, Todd Fiala  wrote:

> Okay cool.
>
> I just got a clean build here on a local OS X machine.  Thanks for
> addressing that, Pavel!  I looked at the diffs and they made sense vs. the
> behavior I saw last night.
>
> On Tue, Dec 8, 2015 at 7:58 AM, Pavel Labath  wrote:
>
>> I'm still waiting for the buildbots to finish, but yeah, it's looking
>> good so far.
>>
>> On 8 December 2015 at 15:51, Todd Fiala via lldb-commits
>>  wrote:
>> > I think Pavel cleared this up.  I'm checking now.  If there's anything
>> > remaining, I'll resolve it after I see what happens.
>> >
>> > On Mon, Dec 7, 2015 at 9:59 PM, Zachary Turner 
>> wrote:
>> >>
>> >> zturner added a comment.
>> >>
>> >> To be clear, we explicitly set the LLDB_TEST environment variable as
>> part
>> >> of initialization, and it's now trying to read the value of the
>> >> environment
>> >> variable before it's been set.  At least I think anyway, I'm going off
>> of
>> >> memory, don't have code in front of me.
>> >>
>> >>
>> >> http://reviews.llvm.org/D15318
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > -Todd
>> >
>> > ___
>> > lldb-commits mailing list
>> > lldb-commits@lists.llvm.org
>> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>> >
>>
>
>
>
> --
> -Todd
>



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


Re: [Lldb-commits] [PATCH] D15318: Get rid of global variables in dotest.py

2015-12-08 Thread Todd Fiala via lldb-commits
Okay cool.

I just got a clean build here on a local OS X machine.  Thanks for
addressing that, Pavel!  I looked at the diffs and they made sense vs. the
behavior I saw last night.

On Tue, Dec 8, 2015 at 7:58 AM, Pavel Labath  wrote:

> I'm still waiting for the buildbots to finish, but yeah, it's looking
> good so far.
>
> On 8 December 2015 at 15:51, Todd Fiala via lldb-commits
>  wrote:
> > I think Pavel cleared this up.  I'm checking now.  If there's anything
> > remaining, I'll resolve it after I see what happens.
> >
> > On Mon, Dec 7, 2015 at 9:59 PM, Zachary Turner 
> wrote:
> >>
> >> zturner added a comment.
> >>
> >> To be clear, we explicitly set the LLDB_TEST environment variable as
> part
> >> of initialization, and it's now trying to read the value of the
> >> environment
> >> variable before it's been set.  At least I think anyway, I'm going off
> of
> >> memory, don't have code in front of me.
> >>
> >>
> >> http://reviews.llvm.org/D15318
> >>
> >>
> >>
> >
> >
> >
> > --
> > -Todd
> >
> > ___
> > lldb-commits mailing list
> > lldb-commits@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> >
>



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


Re: [Lldb-commits] [PATCH] D15318: Get rid of global variables in dotest.py

2015-12-08 Thread Pavel Labath via lldb-commits
I'm still waiting for the buildbots to finish, but yeah, it's looking
good so far.

On 8 December 2015 at 15:51, Todd Fiala via lldb-commits
 wrote:
> I think Pavel cleared this up.  I'm checking now.  If there's anything
> remaining, I'll resolve it after I see what happens.
>
> On Mon, Dec 7, 2015 at 9:59 PM, Zachary Turner  wrote:
>>
>> zturner added a comment.
>>
>> To be clear, we explicitly set the LLDB_TEST environment variable as part
>> of initialization, and it's now trying to read the value of the
>> environment
>> variable before it's been set.  At least I think anyway, I'm going off of
>> memory, don't have code in front of me.
>>
>>
>> http://reviews.llvm.org/D15318
>>
>>
>>
>
>
>
> --
> -Todd
>
> ___
> 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] D15318: Get rid of global variables in dotest.py

2015-12-08 Thread Todd Fiala via lldb-commits
tfiala added a subscriber: tfiala.
tfiala added a comment.

I think Pavel cleared this up.  I'm checking now.  If there's anything
remaining, I'll resolve it after I see what happens.


http://reviews.llvm.org/D15318



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


Re: [Lldb-commits] [PATCH] D15318: Get rid of global variables in dotest.py

2015-12-08 Thread Todd Fiala via lldb-commits
I think Pavel cleared this up.  I'm checking now.  If there's anything
remaining, I'll resolve it after I see what happens.

On Mon, Dec 7, 2015 at 9:59 PM, Zachary Turner  wrote:

> zturner added a comment.
>
> To be clear, we explicitly set the LLDB_TEST environment variable as part
> of initialization, and it's now trying to read the value of the environment
> variable before it's been set.  At least I think anyway, I'm going off of
> memory, don't have code in front of me.
>
>
> http://reviews.llvm.org/D15318
>
>
>
>


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


Re: [Lldb-commits] [lldb] r254979 - Refactor ResultsFormatter creation into result_formatter.

2015-12-08 Thread Todd Fiala via lldb-commits
Perfect.  I have a few things I'm trying to work in - finishing up wiring
things up (timeouts and exceptional process exits) to the new basic
formatter, then getting the low-load, single worker test runner pass up for
review.   I have most of the first one done, should have that in today.
The second one will take me a bit longer but I hope to have that done by,
say, end of tomorrow or the day after.

Looks like Pavel got to fix up the OS X dotest.py.  I ran out of steam last
night to diagnose.

-Todd

On Mon, Dec 7, 2015 at 9:37 PM, Zachary Turner  wrote:

> I'll hold off a bit on major changes for now.  I'm going to start working
> on non-controversial command line options tomorrow, but no more major code
> moves.  I worked on this today since I wanted to get final agreement on the
> command line options first.
>
> On Mon, Dec 7, 2015 at 9:21 PM Todd Fiala  wrote:
>
>> (We're highly intersecting right now - I've got some other goo that I
>> figured I'd hold off on since I'm sure we're hitting the same files).
>>
>> On Mon, Dec 7, 2015 at 9:21 PM, Todd Fiala  wrote:
>>
>>> Yep sure thing.
>>>
>>> On Mon, Dec 7, 2015 at 5:00 PM, Zachary Turner 
>>> wrote:
>>>
 I'm going to have to merge this into my patch.  Can you hold off on any
 other patches until I get in?

 On Mon, Dec 7, 2015 at 4:56 PM Todd Fiala via lldb-commits <
 lldb-commits@lists.llvm.org> wrote:

> Author: tfiala
> Date: Mon Dec  7 18:53:56 2015
> New Revision: 254979
>
> URL: http://llvm.org/viewvc/llvm-project?rev=254979&view=rev
> Log:
> Refactor ResultsFormatter creation into result_formatter.
>
> This cleans up dotest.py and is a pre-step for getting
> the test inferior runner to send post-inferior run events
> to the events collector, as this code needs to be accessed
> from within dosep.py.
>
> Modified:
> lldb/trunk/packages/Python/lldbsuite/test/dotest.py
> lldb/trunk/packages/Python/lldbsuite/test/result_formatter.py
>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=254979&r1=254978&r2=254979&view=diff
>
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Mon Dec  7
> 18:53:56 2015
> @@ -239,7 +239,6 @@ test_runner_name = None
>  # Test results handling globals
>  results_filename = None
>  results_port = None
> -results_file_object = None
>  results_formatter_name = None
>  results_formatter_object = None
>  results_formatter_options = None
> @@ -910,73 +909,24 @@ def createSocketToLocalPort(port):
>  def setupTestResults():
>  """Sets up test results-related objects based on arg settings."""
>  global results_filename
> -global results_file_object
>  global results_formatter_name
>  global results_formatter_object
>  global results_formatter_options
>  global results_port
>
> -default_formatter_name = None
> -cleanup_func = None
> +# Setup the results formatter configuration.
> +config = result_formatter.FormatterConfig()
> +config.filename = results_filename
> +config.formatter_name = results_formatter_name
> +config.formatter_options = results_formatter_options
> +config.port = results_port
> +
> +# Create the results formatter.
> +formatter_spec = result_formatter.create_results_formatter(config)
> +if formatter_spec is not None and formatter_spec.formatter is not
> None:
> +results_formatter_object = formatter_spec.formatter
>
> -if results_filename:
> -# Open the results file for writing.
> -if results_filename == 'stdout':
> -results_file_object = sys.stdout
> -cleanup_func = None
> -elif results_filename == 'stderr':
> -results_file_object = sys.stderr
> -cleanup_func = None
> -else:
> -results_file_object = open(results_filename, "w")
> -cleanup_func = results_file_object.close
> -default_formatter_name =
> "lldbsuite.test.result_formatter.XunitFormatter"
> -elif results_port:
> -# Connect to the specified localhost port.
> -results_file_object, cleanup_func = createSocketToLocalPort(
> -results_port)
> -default_formatter_name = (
> -"lldbsuite.test.result_formatter.RawPickledFormatter")
> -
> -# If we have a results formatter name specified and we didn't
> specify
> -# a results file, we should use stdout.
> -if results_formatter_name is not None 

[Lldb-commits] [lldb] r255017 - Fix MSVC build after rL255016

2015-12-08 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Tue Dec  8 08:27:40 2015
New Revision: 255017

URL: http://llvm.org/viewvc/llvm-project?rev=255017&view=rev
Log:
Fix MSVC build after rL255016

Modified:

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp?rev=255017&r1=255016&r2=255017&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
 Tue Dec  8 08:27:40 2015
@@ -55,9 +55,11 @@ GDBRemoteCommunicationServerPlatform::GD
 m_spawned_pids_mutex (Mutex::eMutexTypeRecursive),
 m_platform_sp (Platform::GetHostPlatform ()),
 m_port_map (),
-m_port_offset(0),
-m_pending_gdb_server{ LLDB_INVALID_PROCESS_ID, 0, "" }
+m_port_offset(0)
 {
+m_pending_gdb_server.pid = LLDB_INVALID_PROCESS_ID;
+m_pending_gdb_server.port = 0;
+
 
RegisterMemberFunctionHandler(StringExtractorGDBRemote::eServerPacketType_qC,
   
&GDBRemoteCommunicationServerPlatform::Handle_qC);
 
RegisterMemberFunctionHandler(StringExtractorGDBRemote::eServerPacketType_qGetWorkingDir,


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


Re: [Lldb-commits] [PATCH] D14952: Modify "platform connect" to connect to processes as well

2015-12-08 Thread Tamas Berghammer via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL255016: Modify "platform connect" to connect to processes as 
well (authored by tberghammer).

Changed prior to commit:
  http://reviews.llvm.org/D14952?vs=42063&id=42170#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14952

Files:
  lldb/trunk/docs/lldb-gdb-remote.txt
  lldb/trunk/include/lldb/Target/Platform.h
  lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
  
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
  
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile
  
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py
  
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/main.cpp
  lldb/trunk/source/Commands/CommandObjectPlatform.cpp
  lldb/trunk/source/Commands/CommandObjectProcess.cpp
  lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
  lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
  lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
  lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
  lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
  lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
  lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
  lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
  lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
  
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
  
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
  lldb/trunk/source/Target/Platform.cpp
  lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp
  lldb/trunk/source/Utility/StringExtractorGDBRemote.h
  lldb/trunk/tools/lldb-server/lldb-platform.cpp

Index: lldb/trunk/include/lldb/Target/Platform.h
===
--- lldb/trunk/include/lldb/Target/Platform.h
+++ lldb/trunk/include/lldb/Target/Platform.h
@@ -487,6 +487,13 @@
   Target *target,   // Can be nullptr, if nullptr create a new target, else use existing one
   Error &error);
 
+virtual lldb::ProcessSP
+ConnectProcess (const char* connect_url,
+const char* plugin_name,
+lldb_private::Debugger &debugger,
+lldb_private::Target *target,
+lldb_private::Error &error);
+
 //--
 /// Attach to an existing process using a process ID.
 ///
@@ -1034,6 +1041,25 @@
 virtual Error
 UnloadImage (lldb_private::Process* process, uint32_t image_token);
 
+//--
+/// Connect to all processes waiting for a debugger to attach
+///
+/// If the platform have a list of processes waiting for a debugger
+/// to connect to them then connect to all of these pending processes.
+///
+/// @param[in] debugger
+/// The debugger used for the connect.
+///
+/// @param[out] error
+/// If an error occurred during the connect then this object will
+/// contain the error message.
+///
+/// @return
+/// The number of processes we are succesfully connected to.
+//--
+virtual size_t
+ConnectToWaitingProcesses(lldb_private::Debugger& debugger, lldb_private::Error& error);
+
 protected:
 bool m_is_host;
 // Set to true when we are able to actually set the OS version while
Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
@@ -1115,21 +1115,23 @@
 # @skipIf(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), skip for gcc>=4.9 on linux with i386
 
 # TODO: refactor current code, to make skipIfxxx functions to call this function
-def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, debug_info=None, swig_version=None, py_version=None):
+def skipIf(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, debug_info=None, swig_version=None, py_version=None, remote=None):
 def fn(self):
 oslist_passes = oslist is None or self.getPlatform() in oslist
 compiler_passes = compiler is None or (compiler in self.getCompiler() an

[Lldb-commits] [lldb] r255016 - Modify "platform connect" to connect to processes as well

2015-12-08 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Tue Dec  8 08:08:19 2015
New Revision: 255016

URL: http://llvm.org/viewvc/llvm-project?rev=255016&view=rev
Log:
Modify "platform connect" to connect to processes as well

The standard remote debugging workflow with gdb is to start the
application on the remote host under gdbserver (e.g.: gdbserver :5039
a.out) and then connect to it with gdb.

The same workflow is supported by debugserver/lldb-gdbserver with a very
similar syntax but to access all features of lldb we need to be
connected also to an lldb-platform instance running on the target.

Before this change this had to be done manually with starting a separate
lldb-platform on the target machine and then connecting to it with lldb
before connecting to the process.

This change modifies the behavior of "platform connect" with
automatically connecting to the process instance if it was started by
the remote platform. With this command replacing gdbserver in a gdb
based worflow is usually as simple as replacing the command to execute
gdbserver with executing lldb-platform.

Differential revision: http://reviews.llvm.org/D14952

Added:

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

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile

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

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/main.cpp
Modified:
lldb/trunk/docs/lldb-gdb-remote.txt
lldb/trunk/include/lldb/Target/Platform.h
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
lldb/trunk/source/Commands/CommandObjectPlatform.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp

lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
lldb/trunk/source/Target/Platform.cpp
lldb/trunk/source/Utility/StringExtractorGDBRemote.cpp
lldb/trunk/source/Utility/StringExtractorGDBRemote.h
lldb/trunk/tools/lldb-server/lldb-platform.cpp

Modified: lldb/trunk/docs/lldb-gdb-remote.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/lldb-gdb-remote.txt?rev=255016&r1=255015&r2=255016&view=diff
==
--- lldb/trunk/docs/lldb-gdb-remote.txt (original)
+++ lldb/trunk/docs/lldb-gdb-remote.txt Tue Dec  8 08:08:19 2015
@@ -1597,3 +1597,29 @@ On MacOSX with debugserver, we expedite
 (up to 256 entries) by reading 2 pointers worth of bytes at the frame pointer 
(for
 the previous FP and PC), and follow the backchain. Most backtraces on MacOSX 
and
 iOS now don't require us to read any memory!
+
+//--
+// "qQueryGDBServer"
+//
+// BRIEF
+//  Ask the platform for the list of gdbservers we have to connect
+//
+// PRIORITY TO IMPLEMENT
+//  Low. The packet is required to support connecting to gdbserver started
+//  by the platform instance automatically.
+//--
+
+If the remote platform automatically started one or more gdbserver instance 
(without
+lldb asking it) then it have to return the list of port number or socket name 
for
+each of them what can be used by lldb to connect to those instances.
+
+The data in this packet is a JSON array of JSON objects with the following 
keys:
+"port":(optional)
+"socket_name":  (optional)
+
+Example packet:
+[
+{ "port": 1234 },
+{ "port": 5432 },
+{ "socket_name": "foo" }
+]

Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=255016&r1=255015&r2=255016&view=diff
==
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Tue Dec  8 08:08:19 2015
@@ -487,6 +487,13 @@ class ModuleCache;
  

[Lldb-commits] [lldb] r255014 - Add a new option to Platform::LoadImage to install the image

2015-12-08 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Tue Dec  8 07:43:59 2015
New Revision: 255014

URL: http://llvm.org/viewvc/llvm-project?rev=255014&view=rev
Log:
Add a new option to Platform::LoadImage to install the image

This change introduce 3 different working mode for Platform::LoadImage
depending on the file specs specified.
* If only a remote file is specified then the remote file is loaded on
  the target (same behavior as before)
* If only a local file is specified then the local file is installed to
  the current working directory and then loaded from there.
* If both local and remote file is specified then the local file is
  installed to the specified location and then loaded from there.

The same options are exposed on the SB API with a new method LoadImage
method while the old signature presers its meaning.

On the command line the installation of the shared library can be specified
with the "--install" option of "process load".

Differential revision: http://reviews.llvm.org/D15152

Modified:
lldb/trunk/include/lldb/API/SBProcess.h
lldb/trunk/include/lldb/Target/Platform.h

lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
lldb/trunk/source/API/SBProcess.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
lldb/trunk/source/Target/Platform.cpp

Modified: lldb/trunk/include/lldb/API/SBProcess.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=255014&r1=255013&r2=255014&view=diff
==
--- lldb/trunk/include/lldb/API/SBProcess.h (original)
+++ lldb/trunk/include/lldb/API/SBProcess.h Tue Dec  8 07:43:59 2015
@@ -294,8 +294,56 @@ public:
 uint32_t
 GetNumSupportedHardwareWatchpoints (lldb::SBError &error) const;
 
+//--
+/// Load a shared library into this process.
+///
+/// @param[in] remote_image_spec
+/// The path for the shared library on the target what you want
+/// to load.
+///
+/// @param[out] error
+/// An error object that gets filled in with any errors that
+/// might occur when trying to load the shared library.
+///
+/// @return
+/// A token that represents the shared library that can be
+/// later used to unload the shared library. A value of
+/// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
+/// library can't be opened.
+//--
 uint32_t
-LoadImage (lldb::SBFileSpec &image_spec, lldb::SBError &error);
+LoadImage (lldb::SBFileSpec &remote_image_spec, lldb::SBError &error);
+
+//--
+/// Load a shared library into this process.
+///
+/// @param[in] local_image_spec
+/// The file spec that points to the shared library that you
+/// want to load if the library is located on the host. The
+/// library will be copied over to the location specified by
+/// remote_image_spec or into the current working directory with
+/// the same filename if the remote_image_spec isn't specified.
+///
+/// @param[in] remote_image_spec
+/// If local_image_spec is specified then the location where the
+/// library should be copied over from the host. If
+/// local_image_spec isn't specified, then the path for the
+/// shared library on the target what you want to load.
+///
+/// @param[out] error
+/// An error object that gets filled in with any errors that
+/// might occur when trying to load the shared library.
+///
+/// @return
+/// A token that represents the shared library that can be
+/// later used to unload the shared library. A value of
+/// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
+/// library can't be opened.
+//--
+uint32_t
+LoadImage (const lldb::SBFileSpec &local_image_spec,
+   const lldb::SBFileSpec &remote_image_spec,
+   lldb::SBError &error);
 
 lldb::SBError
 UnloadImage (uint32_t image_token);

Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=255014&r1=255013&r2=255014&view=diff
==
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Tue Dec  8 07:43:59 2015
@@ -997,9 +997,18 @@ class ModuleCache;
 /// @param[in] process
 /// The process to load the image.
 ///
-/// @pa

Re: [Lldb-commits] [PATCH] D15152: Add a new option to Platform::LoadImage to install the image

2015-12-08 Thread Tamas Berghammer via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL255014: Add a new option to Platform::LoadImage to install 
the image (authored by tberghammer).

Changed prior to commit:
  http://reviews.llvm.org/D15152?vs=42055&id=42166#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D15152

Files:
  lldb/trunk/include/lldb/API/SBProcess.h
  lldb/trunk/include/lldb/Target/Platform.h
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
  lldb/trunk/source/API/SBProcess.cpp
  lldb/trunk/source/Commands/CommandObjectProcess.cpp
  lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
  lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
  lldb/trunk/source/Target/Platform.cpp

Index: lldb/trunk/source/API/SBProcess.cpp
===
--- lldb/trunk/source/API/SBProcess.cpp
+++ lldb/trunk/source/API/SBProcess.cpp
@@ -1288,7 +1288,15 @@
 }
 
 uint32_t
-SBProcess::LoadImage (lldb::SBFileSpec &sb_image_spec, lldb::SBError &sb_error)
+SBProcess::LoadImage (lldb::SBFileSpec &sb_remote_image_spec, lldb::SBError &sb_error)
+{
+return LoadImage(SBFileSpec(), sb_remote_image_spec, sb_error);
+}
+
+uint32_t
+SBProcess::LoadImage (const lldb::SBFileSpec &sb_local_image_spec,
+  const lldb::SBFileSpec &sb_remote_image_spec,
+  lldb::SBError &sb_error)
 {
 ProcessSP process_sp(GetSP());
 if (process_sp)
@@ -1298,7 +1306,10 @@
 {
 Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
 PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
-return platform_sp->LoadImage (process_sp.get(), *sb_image_spec, sb_error.ref());
+return platform_sp->LoadImage (process_sp.get(),
+   *sb_local_image_spec,
+   *sb_remote_image_spec,
+   sb_error.ref());
 }
 else
 {
Index: lldb/trunk/source/Commands/CommandObjectProcess.cpp
===
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp
@@ -1174,6 +1174,57 @@
 class CommandObjectProcessLoad : public CommandObjectParsed
 {
 public:
+class CommandOptions : public Options
+{
+public:
+CommandOptions (CommandInterpreter &interpreter) :
+Options(interpreter)
+{
+// Keep default values of all options in one place: OptionParsingStarting ()
+OptionParsingStarting ();
+}
+
+~CommandOptions () override = default;
+
+Error
+SetOptionValue (uint32_t option_idx, const char *option_arg) override
+{
+Error error;
+const int short_option = m_getopt_table[option_idx].val;
+switch (short_option)
+{
+case 'i':
+do_install = true;
+if (option_arg && option_arg[0])
+install_path.SetFile(option_arg, false);
+break;
+default:
+error.SetErrorStringWithFormat("invalid short option character '%c'", short_option);
+break;
+}
+return error;
+}
+
+void
+OptionParsingStarting () override
+{
+do_install = false;
+install_path.Clear();
+}
+
+const OptionDefinition*
+GetDefinitions () override
+{
+return g_option_table;
+}
+
+// Options table: Required for subclasses of Options.
+static OptionDefinition g_option_table[];
+
+// Instance variables to hold the values for command options.
+bool do_install;
+FileSpec install_path;
+};
 
 CommandObjectProcessLoad (CommandInterpreter &interpreter) :
 CommandObjectParsed (interpreter,
@@ -1183,12 +1234,17 @@
  eCommandRequiresProcess   |
  eCommandTryTargetAPILock  |
  eCommandProcessMustBeLaunched |
- eCommandProcessMustBePaused   )
+ eCommandProcessMustBePaused   ),
+m_options (interpreter)
 {
 }
 
-~CommandObjectProcessLoad () override
+~CommandObjectProcessLoad () override = default;
+
+Options *
+GetOptions () override
 {
+return &m_options;
 }
 
 protected:
@@ -1198,18 +1254,34 @@
 Process *process = m_exe_ctx.GetProcessPtr();
 
 const size_t argc = command.GetArgumentCount();
-
 for (uint32_t i=0; iGetTarget().GetPlatform();
-platform->ResolveRemotePath(image_spec, image_spec);
-uint32_t image_token = platform->LoadImage(process, image_spec, error);
+

[Lldb-commits] [lldb] r255013 - Fixup dotest.py on mac for the configuration package

2015-12-08 Thread Pavel Labath via lldb-commits
Author: labath
Date: Tue Dec  8 07:32:07 2015
New Revision: 255013

URL: http://llvm.org/viewvc/llvm-project?rev=255013&view=rev
Log:
Fixup dotest.py on mac for the configuration package

Modified:
lldb/trunk/packages/Python/lldbsuite/test/configuration.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/configuration.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/configuration.py?rev=255013&r1=255012&r2=255013&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/configuration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/configuration.py Tue Dec  8 
07:32:07 2015
@@ -27,7 +27,7 @@ def __setCrashInfoHook_Mac(text):
 from . import crashinfo
 crashinfo.setCrashReporterDescription(text)
 
-def __setupCrashInfoHook():
+def setupCrashInfoHook():
 if platform.system() == "Darwin":
 from . import lock
 test_dir = os.environ['LLDB_TEST']
@@ -48,7 +48,7 @@ def __setupCrashInfoHook():
 compile_lock.release()
 del compile_lock
 
-setCrashInfoHook = setCrashInfoHook_Mac
+setCrashInfoHook = __setCrashInfoHook_Mac
 
 else:
 pass
@@ -220,7 +220,6 @@ all_tests = set()
 
 # safe default
 setCrashInfoHook = lambda x : None
-__setupCrashInfoHook()
 
 def shouldSkipBecauseOfCategories(test_categories):
 if useCategories:

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=255013&r1=255012&r2=255013&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Dec  8 07:32:07 2015
@@ -1086,6 +1086,7 @@ def run_suite():
 signal.signal(signal.SIGINT, signal.SIG_IGN)
 
 setupSysPath()
+configuration.setupCrashInfoHook()
 
 #
 # If '-l' is specified, do not skip the long running tests.


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


[Lldb-commits] [lldb] r255009 - Fixup dotest.py after the configuration package introduction

2015-12-08 Thread Pavel Labath via lldb-commits
Author: labath
Date: Tue Dec  8 06:09:56 2015
New Revision: 255009

URL: http://llvm.org/viewvc/llvm-project?rev=255009&view=rev
Log:
Fixup dotest.py after the configuration package introduction

Modified:
lldb/trunk/packages/Python/lldbsuite/test/dotest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=255009&r1=255008&r2=255009&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Dec  8 06:09:56 2015
@@ -1350,7 +1350,7 @@ def run_suite():
 
 # First, write out the number of collected test cases.
 if not configuration.parsable:
-sys.stderr.write(separator + "\n")
+sys.stderr.write(configuration.separator + "\n")
 sys.stderr.write("Collected %d test%s\n\n"
  % (configuration.suite.countTestCases(),
 configuration.suite.countTestCases() != 1 
and "s" or ""))


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


Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Tamas Berghammer via lldb-commits
tberghammer added a subscriber: tberghammer.
tberghammer added a comment.

Paul is not working on LLDB anymore so I added Siva who took over most of his 
work.


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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


Re: [Lldb-commits] [PATCH] D15312: Fix scope-based lookup when more than one function is found.

2015-12-08 Thread Dawn Perchik via lldb-commits
dawn added a comment.

bloodbath:~% exit
Thanks Greg!  To address your main point:

> So either make it generic, or clang specific.


DeclContextCountDeclLevels's interface follows DeclContextFindDeclByName 
(authored by Paul Herman).  If DeclContextCountDeclLevels is to change, then 
DeclContextFindDeclByName should also change for consistency.

My take on this is that the code in 
ClangExpressionDeclMap::FindExternalVisibleDecls which calls these scope-based 
lookup routines should be moved out of ClangExpressionDeclMap.cpp into 
CompilerExpressionDeclMap.cpp, so the interfaces to 
DeclContextFindDeclByName/DeclContextCountDeclLevels should remain generic 
while the implementations are compiler specific.  That's way more than I'd like 
to take on as part of this patch however.

Paul, any feedback from you on this?


Repository:
  rL LLVM

http://reviews.llvm.org/D15312



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