[Lldb-commits] [lldb] r258113 - Unconditionally accept symbol sizes from elf

2016-01-19 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Tue Jan 19 04:24:51 2016
New Revision: 258113

URL: http://llvm.org/viewvc/llvm-project?rev=258113=rev
Log:
Unconditionally accept symbol sizes from elf

The ELF symbol table always contain the size of the symbols so we
don't have to try to guess them based on the address of the next
symbol (it is needed for mach-o).

The change fixes an issue when a symbol is removed after a 0 size
symbol (e.g. because the second one is not public) what previously
caused the symbol lookup algorithm to end up with showing the 0 size
symbol even for the later addresses (what are not part of any symbol).
That symbol lookup error can confuse the user and also confuses the
current stack unwinder.

Re-commit this CL after fixing the issue with gcc-4.9.2 on i386 Linux.

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

Modified:
lldb/trunk/include/lldb/Symbol/Symbol.h
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/trunk/source/Symbol/Symbol.cpp
lldb/trunk/source/Symbol/Symtab.cpp

Modified: lldb/trunk/include/lldb/Symbol/Symbol.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symbol.h?rev=258113=258112=258113=diff
==
--- lldb/trunk/include/lldb/Symbol/Symbol.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symbol.h Tue Jan 19 04:24:51 2016
@@ -383,6 +383,9 @@ public:
 bool prefer_file_cache,
 Stream );
 
+bool
+ContainsFileAddress (lldb::addr_t file_addr) const;
+
 protected:
 // This is the internal guts of ResolveReExportedSymbol, it assumes 
reexport_name is not null, and that module_spec
 // is valid.  We track the modules we've already seen to make sure we 
don't get caught in a cycle.

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=258113=258112=258113=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Tue Jan 19 
04:24:51 2016
@@ -2283,6 +2283,12 @@ ObjectFileELF::ParseSymbols (Symtab *sym
 mangled.SetDemangledName( ConstString((demangled_name + 
suffix).str()) );
 }
 
+// In ELF all symbol should have a valid size but it is not true for 
some code symbols
+// coming from hand written assembly. As none of the code symbol 
should have 0 size we try
+// to calculate the size for these symbols in the symtab with saying 
that their original
+// size is not valid.
+bool symbol_size_valid = symbol.st_size != 0 || symbol_type != 
eSymbolTypeCode;
+
 Symbol dc_symbol(
 i + start_id,   // ID is the original symbol table index.
 mangled,
@@ -2295,7 +2301,7 @@ ObjectFileELF::ParseSymbols (Symtab *sym
 symbol_section_sp,  // Section in which this symbol is defined 
or null.
 symbol_value,   // Offset in section or symbol value.
 symbol.st_size),// Size in bytes of this symbol.
-symbol.st_size != 0,// Size is valid if it is not 0
+symbol_size_valid,  // Symbol size is valid
 has_suffix, // Contains linker annotations?
 flags); // Symbol flags.
 symtab->AddSymbol(dc_symbol);
@@ -2304,7 +2310,9 @@ ObjectFileELF::ParseSymbols (Symtab *sym
 }
 
 unsigned
-ObjectFileELF::ParseSymbolTable(Symtab *symbol_table, user_id_t start_id, 
lldb_private::Section *symtab)
+ObjectFileELF::ParseSymbolTable(Symtab *symbol_table,
+user_id_t start_id,
+lldb_private::Section *symtab)
 {
 if (symtab->GetObjectFile() != this)
 {

Modified: lldb/trunk/source/Symbol/Symbol.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symbol.cpp?rev=258113=258112=258113=diff
==
--- lldb/trunk/source/Symbol/Symbol.cpp (original)
+++ lldb/trunk/source/Symbol/Symbol.cpp Tue Jan 19 04:24:51 2016
@@ -737,3 +737,10 @@ Symbol::GetDisassembly (const ExecutionC
 }
 return false;
 }
+
+bool
+Symbol::ContainsFileAddress (lldb::addr_t file_addr) const
+{
+return m_addr_range.ContainsFileAddress(file_addr);
+}
+

Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=258113=258112=258113=diff
==
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Tue Jan 19 04:24:51 2016
@@ -971,9 +971,11 @@ Symtab::InitAddressIndexes()
 if (end_section_file_addr > 

Re: [Lldb-commits] [PATCH] D16107: Fix for Bug 25338

2016-01-19 Thread Ravitheja Addepally via lldb-commits
ravitheja updated this revision to Diff 45238.
ravitheja added a comment.

correcting previous revision.


http://reviews.llvm.org/D16107

Files:
  
packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
  
packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
  packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  source/Plugins/ObjectFile/ELF/ObjectFileELF.h

Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.h
===
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -14,6 +14,7 @@
 #include 
 
 // C++ Includes
+#include 
 #include 
 
 // Other libraries and framework includes
@@ -231,6 +232,7 @@
 typedef DynamicSymbolColl::const_iterator   DynamicSymbolCollConstIter;
 
 typedef std::map FileAddressToAddressClassMap;
+typedef std::function SetDataFunction;
 
 /// Version of this reader common to all plugins based on this class.
 static const uint32_t m_plugin_version = 1;
@@ -279,7 +281,7 @@
 // Parses the ELF program headers.
 static size_t
 GetProgramHeaderInfo(ProgramHeaderColl _headers,
- lldb_private::DataExtractor ,
+ const SetDataFunction _data,
  const elf::ELFHeader );
 
 // Finds PT_NOTE segments and calculates their crc sum.
@@ -302,7 +304,7 @@
 /// Parses the elf section headers and returns the uuid, debug link name, crc, archspec.
 static size_t
 GetSectionHeaderInfo(SectionHeaderColl _headers,
- lldb_private::DataExtractor ,
+ const SetDataFunction _data,
  const elf::ELFHeader ,
  lldb_private::UUID ,
  std::string _debuglink_file,
@@ -437,6 +439,13 @@
 
 static lldb_private::Error
 RefineModuleDetailsFromNote (lldb_private::DataExtractor , lldb_private::ArchSpec _spec, lldb_private::UUID );
+
+
+static lldb::offset_t
+SetData(const lldb_private::DataExtractor , lldb_private::DataExtractor , lldb::offset_t offset, lldb::offset_t length);
+
+lldb::offset_t
+SetDataWithReadMemoryFallback(lldb_private::DataExtractor , lldb::offset_t offset, lldb::offset_t length);
 };
 
 #endif // liblldb_ObjectFileELF_h_
Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===
--- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -729,7 +729,10 @@
 SectionHeaderColl section_headers;
 lldb_private::UUID  = spec.GetUUID();
 
-GetSectionHeaderInfo(section_headers, data, header, uuid, gnu_debuglink_file, gnu_debuglink_crc, spec.GetArchitecture ());
+using namespace std::placeholders;
+const SetDataFunction set_data = std::bind(::SetData, std::cref(data), _1, _2, _3);
+GetSectionHeaderInfo(section_headers, set_data, header, uuid, gnu_debuglink_file, gnu_debuglink_crc, spec.GetArchitecture ());
+
 
 llvm::Triple _triple = spec.GetArchitecture ().GetTriple ();
 
@@ -759,7 +762,7 @@
 data.SetData(data_sp);
 }
 ProgramHeaderColl program_headers;
-GetProgramHeaderInfo(program_headers, data, header);
+GetProgramHeaderInfo(program_headers, set_data, header);
 
 size_t segment_data_end = 0;
 for (ProgramHeaderCollConstIter I = program_headers.begin();
@@ -1256,7 +1259,7 @@
 //--
 size_t
 ObjectFileELF::GetProgramHeaderInfo(ProgramHeaderColl _headers,
-DataExtractor _data,
+const SetDataFunction _data,
 const ELFHeader )
 {
 // We have already parsed the program headers
@@ -1274,7 +1277,7 @@
 const size_t ph_size = header.e_phnum * header.e_phentsize;
 const elf_off ph_offset = header.e_phoff;
 DataExtractor data;
-if (data.SetData(object_data, ph_offset, ph_size) != ph_size)
+if (set_data(data, ph_offset, ph_size) != ph_size)
 return 0;
 
 uint32_t idx;
@@ -1298,7 +1301,10 @@
 size_t
 ObjectFileELF::ParseProgramHeaders()
 {
-return GetProgramHeaderInfo(m_program_headers, m_data, m_header);
+using namespace std::placeholders;
+return GetProgramHeaderInfo(m_program_headers,
+std::bind(::SetDataWithReadMemoryFallback, this, _1, _2, _3),
+ 

Re: [Lldb-commits] [PATCH] D16107: Fix for Bug 25338

2016-01-19 Thread Pavel Labath via lldb-commits
labath added a comment.

Looks good as far as I am concerned. @tberghammer, @ovyalov ?


http://reviews.llvm.org/D16107



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


[Lldb-commits] [lldb] r258114 - Remove last XTIMEOUTs from android tests

2016-01-19 Thread Pavel Labath via lldb-commits
Author: labath
Date: Tue Jan 19 04:59:10 2016
New Revision: 258114

URL: http://llvm.org/viewvc/llvm-project?rev=258114=rev
Log:
Remove last XTIMEOUTs from android tests

TestHelloWorld seems to be passing now as far as I can tell. TestExitDuringStep 
is still hanging.
I have marked the relevant tests as flaky, which should handle the timeouts now 
as well. I'll be
monitoring the buildbots for fallout.

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

lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dosep.py?rev=258114=258113=258114=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dosep.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dosep.py Tue Jan 19 04:59:10 2016
@@ -1144,12 +1144,7 @@ def getExpectedTimeouts(platform_name):
 
 expected_timeout = set()
 
-if target.startswith("android"):
-expected_timeout |= {
-"TestExitDuringStep.py",
-"TestHelloWorld.py",
-}
-elif target.startswith("freebsd"):
+if target.startswith("freebsd"):
 expected_timeout |= {
 "TestBreakpointConditions.py",
 "TestChangeProcessGroup.py",

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py?rev=258114=258113=258114=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
 Tue Jan 19 04:59:10 2016
@@ -26,6 +26,7 @@ class ExitDuringStepTestCase(TestBase):
 
 @skipIfFreeBSD # llvm.org/pr21411: test is hanging
 @expectedFailureWindows("llvm.org/pr24681")
+@expectedFlakeyAndroid("llvm.org/pr26206")
 def test(self):
 """Test thread exit during step handling."""
 self.build(dictionary=self.getBuildFlags())
@@ -33,6 +34,7 @@ class ExitDuringStepTestCase(TestBase):
 
 @skipIfFreeBSD # llvm.org/pr21411: test is hanging
 @expectedFailureWindows("llvm.org/pr24681")
+@expectedFlakeyAndroid("llvm.org/pr26206")
 def test_step_over(self):
 """Test thread exit during step-over handling."""
 self.build(dictionary=self.getBuildFlags())
@@ -40,6 +42,7 @@ class ExitDuringStepTestCase(TestBase):
 
 @skipIfFreeBSD # llvm.org/pr21411: test is hanging
 @expectedFailureWindows("llvm.org/pr24681")
+@expectedFlakeyAndroid("llvm.org/pr26206")
 def test_step_in(self):
 """Test thread exit during step-in handling."""
 self.build(dictionary=self.getBuildFlags())


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


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

2016-01-19 Thread Bhushan Attarde via lldb-commits
bhushan updated the summary for this revision.
bhushan updated this revision to Diff 45237.
bhushan added a comment.

Addressed review comments.
Instead of adding new decorator, this patch modifies existing `skipUnlessArch` 
to detect the type of the "archs" variable and do the things according to the 
type.
This handles regular expressions as well.

The python test file then uses this decorator as 
`@skipUnlessArch(archs=re.compile('mips*'))` to skip any architectures other 
than mips.


Repository:
  rL LLVM

http://reviews.llvm.org/D16049

Files:
  include/lldb/API/SBInstruction.h
  
packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/Makefile
  
packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
  
packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/main.c
  packages/Python/lldbsuite/test/lldbtest.py
  scripts/interface/SBInstruction.i
  source/API/SBInstruction.cpp
  source/Target/Target.cpp

Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/main.c
===
--- /dev/null
+++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/main.c
@@ -0,0 +1,21 @@
+#include 
+
+foo (int a, int b)
+{
+int c;
+if (a<=b)
+c=b-a;
+else
+c=b+a;
+return c;
+}
+
+int main()
+{
+int a=7, b=8, c;
+
+c = foo(a, b);
+
+return 0;
+}
+
Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
===
--- /dev/null
+++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
@@ -0,0 +1,82 @@
+"""
+Test specific to MIPS 
+"""
+
+import os, time
+import re
+import unittest2
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+class AvoidBreakpointInDelaySlotAPITestCase(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+@skipUnlessArch(archs=re.compile('mips*'))
+def test(self):
+self.build()
+exe = os.path.join(os.getcwd(), "a.out")
+self.expect("file " + exe,
+patterns = [ "Current executable set to .*a.out.*" ])
+
+# Create a target by the debugger.
+target = self.dbg.CreateTarget(exe)
+self.assertTrue(target, VALID_TARGET)
+
+breakpoint = target.BreakpointCreateByName('main', 'a.out')
+self.assertTrue(breakpoint and
+breakpoint.GetNumLocations() == 1,
+VALID_BREAKPOINT)
+
+# Now launch the process, and do not stop at entry point.
+process = target.LaunchSimple (None, None, self.get_process_working_directory())
+self.assertTrue(process, PROCESS_IS_VALID)
+
+list = target.FindFunctions('foo', lldb.eFunctionNameTypeAuto)
+self.assertTrue(list.GetSize() == 1)
+sc = list.GetContextAtIndex(0)
+self.assertTrue(sc.GetSymbol().GetName() == "foo")
+function = sc.GetFunction()
+self.assertTrue(function)
+self.function(function, target)
+
+def function (self, function, target):
+"""Iterate over instructions in function and place a breakpoint on delay slot instruction"""
+# Get the list of all instructions in the function
+insts = function.GetInstructions(target)
+print insts
+i = 0
+for inst in insts:
+if (inst.HasDelaySlot()):
+# Remember the address of branch instruction.
+branchinstaddress = inst.GetAddress().GetLoadAddress(target)
+
+# Get next instruction i.e delay slot instruction.
+delayinst = insts.GetInstructionAtIndex(i+1)
+delayinstaddr = delayinst.GetAddress().GetLoadAddress(target)
+
+# Set breakpoint on delay slot instruction
+breakpoint = target.BreakpointCreateByAddress(delayinstaddr)
+
+# Verify the breakpoint.
+self.assertTrue(breakpoint and
+breakpoint.GetNumLocations() == 1,
+VALID_BREAKPOINT)
+# Get the location from breakpoint
+location = breakpoint.GetLocationAtIndex(0)
+
+# Get the address where breakpoint is actually set.
+bpaddr = location.GetLoadAddress()
+		
+# Breakpoint address should be adjusted to the address of branch instruction.
+self.assertTrue(branchinstaddress ==  bpaddr)
+i += 1
+else:
+i += 1
+
+if __name__ == '__main__':
+import atexit
+lldb.SBDebugger.Initialize()
+atexit.register(lambda: lldb.SBDebugger.Terminate())
+

Re: [Lldb-commits] [PATCH] D16247: Don't assume that thread 0 is always the main thread

2016-01-19 Thread Jim Ingham via lldb-commits
jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

Oh, yeah, I'm supposed to say "request changes" for the use of 
get_threads_stopped_at_breakpoint...


http://reviews.llvm.org/D16247



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


Re: [Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Davide Italiano via lldb-commits
On Tue, Jan 19, 2016 at 2:05 PM, Zachary Turner  wrote:
> This is needed in order to prevent MSVC from warning about this case.  I
> explicitly added these last week.  Can I ask that you revert this change?
>

Well, this broke the build with -Werror which is my default, that's
why I made the change.
Is there a way we can make everybody happy you can think of?

> On Tue, Jan 19, 2016 at 2:03 PM Davide Italiano via lldb-commits
>  wrote:
>>
>> Author: davide
>> Date: Tue Jan 19 15:59:12 2016
>> New Revision: 258199
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=258199=rev
>> Log:
>> [Process] Remove dead code. All the switch cases are already covered.
>>
>> Modified:
>> lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>> lldb/trunk/source/Target/Process.cpp
>>
>> Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258199=258198=258199=diff
>>
>> ==
>> --- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
>> +++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan 19
>> 15:59:12 2016
>> @@ -118,8 +118,6 @@ public:
>>  return false;
>>  else
>>  return true;
>> -default:
>> -return false;
>>  }
>>  }
>>
>>
>> Modified: lldb/trunk/source/Target/Process.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258199=258198=258199=diff
>>
>> ==
>> --- lldb/trunk/source/Target/Process.cpp (original)
>> +++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 15:59:12 2016
>> @@ -1504,8 +1504,6 @@ Process::IsAlive ()
>>  case eStateCrashed:
>>  case eStateSuspended:
>>  return true;
>> -default:
>> -return false;
>>  }
>>  }
>>
>>
>>
>> ___
>> lldb-commits mailing list
>> lldb-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits



-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D16247: Don't assume that thread 0 is always the main thread

2016-01-19 Thread Zachary Turner via lldb-commits
zturner added a comment.

Fixed that issue.  The other issue you pointed out about using 
`get_stopped_thread` sometimes is because in those tests breakpoints were 
created using `runCmd` so we don't have an `SBBreakpoint` handy like we do in 
the other cases.


http://reviews.llvm.org/D16247



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


Re: [Lldb-commits] [PATCH] D16247: Don't assume that thread 0 is always the main thread

2016-01-19 Thread Jim Ingham via lldb-commits
jingham added a comment.

That would be fine too.  Just seems like this is asking to have a miswritten 
test that accidentally stops at two hits of the breakpoint but you didn't 
notice because MOST of the time, the right thread was first, which would lead 
to an odd flakey test.


http://reviews.llvm.org/D16247



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


[Lldb-commits] [lldb] r258194 - Removed a bunch of spurious files from the man page Copy Files build phase.

2016-01-19 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Tue Jan 19 15:48:25 2016
New Revision: 258194

URL: http://llvm.org/viewvc/llvm-project?rev=258194=rev
Log:
Removed a bunch of spurious files from the man page Copy Files build phase.

A few files were accidentally added to the Copy Files build phase for our man
page, and they would appear when 'xcodebuild install' was invoked.  This removes
those files – they continue to be built correctly, but they aren't installed
with our man page.

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=258194=258193=258194=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Jan 19 15:48:25 2016
@@ -637,8 +637,6 @@
26FFC19D14FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 26FFC19714FC072100087D58 /* 
DynamicLoaderPOSIXDYLD.cpp */; };
30DED5DE1B4ECB49004CC508 /* MainLoopPosix.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 30DED5DC1B4ECB17004CC508 /* MainLoopPosix.cpp 
*/; };
332CCB181AFF41620034D4C4 /* SBLanguageRuntime.h in Headers */ = 
{isa = PBXBuildFile; fileRef = 3392EBB71AFF402200858B9F /* SBLanguageRuntime.h 
*/; settings = {ATTRIBUTES = (Public, ); }; };
-   33E5E8421A672A240024ED68 /* StringConvert.cpp in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 33E5E8411A672A240024ED68 /* StringConvert.cpp 
*/; };
-   33E5E8461A6736D30024ED68 /* StringConvert.h in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 33E5E8451A6736D30024ED68 /* StringConvert.h */; 
};
33E5E8471A674FB60024ED68 /* StringConvert.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 33E5E8411A672A240024ED68 /* StringConvert.cpp 
*/; };
3F8160A61AB9F7DD001DA9DF /* Logging.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = 3F8160A51AB9F7DD001DA9DF /* Logging.cpp */; };
3F8169191ABA2419001DA9DF /* ConvertEnum.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 3F8169171ABA2419001DA9DF /* ConvertEnum.cpp */; 
};
@@ -648,12 +646,7 @@
3F8169321ABB7A6D001DA9DF /* SystemInitializerCommon.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 3F81692F1ABB7A6D001DA9DF /* 
SystemInitializerCommon.cpp */; };
3F8169331ABB7A6D001DA9DF /* SystemLifetimeManager.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 3F8169301ABB7A6D001DA9DF /* 
SystemLifetimeManager.cpp */; };
3FA093151BF65D3A0037DD08 /* PythonExceptionStateTests.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 3FA093141BF65D3A0037DD08 /* 
PythonExceptionStateTests.cpp */; };
-   3FBA69DF1B6067020008F44A /* ScriptInterpreterNone.cpp in 
CopyFiles */ = {isa = PBXBuildFile; fileRef = 3FBA69DD1B6067020008F44A /* 
ScriptInterpreterNone.cpp */; };
-   3FBA69E01B6067020008F44A /* ScriptInterpreterNone.h in 
CopyFiles */ = {isa = PBXBuildFile; fileRef = 3FBA69DE1B6067020008F44A /* 
ScriptInterpreterNone.h */; };
3FBA69E11B6067120008F44A /* ScriptInterpreterNone.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 3FBA69DD1B6067020008F44A /* 
ScriptInterpreterNone.cpp */; };
-   3FBA69E71B60672A0008F44A /* lldb-python.h in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = 3FBA69E21B60672A0008F44A /* lldb-python.h */; };
-   3FBA69E91B60672A0008F44A /* PythonDataObjects.h in CopyFiles */ 
= {isa = PBXBuildFile; fileRef = 3FBA69E41B60672A0008F44A /* 
PythonDataObjects.h */; };
-   3FBA69EB1B60672A0008F44A /* ScriptInterpreterPython.h in 
CopyFiles */ = {isa = PBXBuildFile; fileRef = 3FBA69E61B60672A0008F44A /* 
ScriptInterpreterPython.h */; };
3FBA69EC1B6067430008F44A /* PythonDataObjects.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 3FBA69E31B60672A0008F44A /* 
PythonDataObjects.cpp */; };
3FBA69ED1B60674B0008F44A /* ScriptInterpreterPython.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 3FBA69E51B60672A0008F44A /* 
ScriptInterpreterPython.cpp */; };
3FDFDDBD199C3A06009756A7 /* FileAction.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = 3FDFDDBC199C3A06009756A7 /* FileAction.cpp */; };
@@ -678,7 +671,6 @@
494260DA14579144003C1C78 /* VerifyDecl.cpp in Sources */ = {isa 
= PBXBuildFile; fileRef = 494260D914579144003C1C78 /* VerifyDecl.cpp */; };
4959511F1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 4959511E1A1BC4BC00F6F8FC /* 
ClangModulesDeclVendor.cpp */; };
4966DCC4148978A10028481B /* ClangExternalASTSourceCommon.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 4966DCC3148978A10028481B /* 
ClangExternalASTSourceCommon.cpp */; };
-   49684D7B1BAB37E400E6D5D5 

Re: [Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Zachary Turner via lldb-commits
This is needed in order to prevent MSVC from warning about this case.  I
explicitly added these last week.  Can I ask that you revert this change?

On Tue, Jan 19, 2016 at 2:03 PM Davide Italiano via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: davide
> Date: Tue Jan 19 15:59:12 2016
> New Revision: 258199
>
> URL: http://llvm.org/viewvc/llvm-project?rev=258199=rev
> Log:
> [Process] Remove dead code. All the switch cases are already covered.
>
> Modified:
> lldb/trunk/source/Expression/ExpressionSourceCode.cpp
> lldb/trunk/source/Target/Process.cpp
>
> Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258199=258198=258199=diff
>
> ==
> --- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
> +++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan 19
> 15:59:12 2016
> @@ -118,8 +118,6 @@ public:
>  return false;
>  else
>  return true;
> -default:
> -return false;
>  }
>  }
>
>
> Modified: lldb/trunk/source/Target/Process.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258199=258198=258199=diff
>
> ==
> --- lldb/trunk/source/Target/Process.cpp (original)
> +++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 15:59:12 2016
> @@ -1504,8 +1504,6 @@ Process::IsAlive ()
>  case eStateCrashed:
>  case eStateSuspended:
>  return true;
> -default:
> -return false;
>  }
>  }
>
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r258212 - Placate MVSC after my last commit.

2016-01-19 Thread Davide Italiano via lldb-commits
Author: davide
Date: Tue Jan 19 16:47:51 2016
New Revision: 258212

URL: http://llvm.org/viewvc/llvm-project?rev=258212=rev
Log:
Placate MVSC after my last commit.

Zachary introduced the 'default' case explicitly to placate a warning in
the Microsoft compiler but that broke clang with -Werror. 
The new code should keep both compilers happy.

Modified:
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258212=258211=258212=diff
==
--- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan 19 16:47:51 
2016
@@ -106,8 +106,6 @@ public:
 {
 case CURRENT_FILE_NOT_YET_PUSHED:
 return true;
-case CURRENT_FILE_POPPED:
-return false;
 case CURRENT_FILE_PUSHED:
 // If we are in file included in the current file,
 // the entry should be added.
@@ -118,6 +116,8 @@ public:
 return false;
 else
 return true;
+default:
+return false;
 }
 }
 

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258212=258211=258212=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 16:47:51 2016
@@ -1489,12 +1489,6 @@ Process::IsAlive ()
 {
 switch (m_private_state.GetValue())
 {
-case eStateInvalid:
-case eStateUnloaded:
-case eStateDetached:
-case eStateExited:
-return false;
-
 case eStateConnected:
 case eStateAttaching:
 case eStateLaunching:
@@ -1504,6 +1498,8 @@ Process::IsAlive ()
 case eStateCrashed:
 case eStateSuspended:
 return true;
+default:
+return false;
 }
 }
 


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


Re: [Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Davide Italiano via lldb-commits
On Tue, Jan 19, 2016 at 2:08 PM, Davide Italiano  wrote:
> On Tue, Jan 19, 2016 at 2:05 PM, Zachary Turner  wrote:
>> This is needed in order to prevent MSVC from warning about this case.  I
>> explicitly added these last week.  Can I ask that you revert this change?
>>

In particular:

../tools/lldb/source/Target/Process.cpp:1507:9: warning: default label in switch
 which covers all enumeration values [-Wcovered-switch-default]
default:
^


>
> Well, this broke the build with -Werror which is my default, that's
> why I made the change.
> Is there a way we can make everybody happy you can think of?
>
>> On Tue, Jan 19, 2016 at 2:03 PM Davide Italiano via lldb-commits
>>  wrote:
>>>
>>> Author: davide
>>> Date: Tue Jan 19 15:59:12 2016
>>> New Revision: 258199
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=258199=rev
>>> Log:
>>> [Process] Remove dead code. All the switch cases are already covered.
>>>
>>> Modified:
>>> lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>>> lldb/trunk/source/Target/Process.cpp
>>>
>>> Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258199=258198=258199=diff
>>>
>>> ==
>>> --- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
>>> +++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan 19
>>> 15:59:12 2016
>>> @@ -118,8 +118,6 @@ public:
>>>  return false;
>>>  else
>>>  return true;
>>> -default:
>>> -return false;
>>>  }
>>>  }
>>>
>>>
>>> Modified: lldb/trunk/source/Target/Process.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258199=258198=258199=diff
>>>
>>> ==
>>> --- lldb/trunk/source/Target/Process.cpp (original)
>>> +++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 15:59:12 2016
>>> @@ -1504,8 +1504,6 @@ Process::IsAlive ()
>>>  case eStateCrashed:
>>>  case eStateSuspended:
>>>  return true;
>>> -default:
>>> -return false;
>>>  }
>>>  }
>>>
>>>
>>>
>>> ___
>>> lldb-commits mailing list
>>> lldb-commits@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
>
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare



-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Zachary Turner via lldb-commits
What about this:

switch (m_private_state.GetValue())
{
case eStateConnected:
case eStateAttaching:
case eStateLaunching:
case eStateStopped:
case eStateRunning:
case eStateStepping:
case eStateCrashed:
case eStateSuspended:
return true;

default:
return false;
}


On Tue, Jan 19, 2016 at 2:10 PM Davide Italiano  wrote:

> On Tue, Jan 19, 2016 at 2:08 PM, Davide Italiano 
> wrote:
> > On Tue, Jan 19, 2016 at 2:05 PM, Zachary Turner 
> wrote:
> >> This is needed in order to prevent MSVC from warning about this case.  I
> >> explicitly added these last week.  Can I ask that you revert this
> change?
> >>
>
> In particular:
>
> ../tools/lldb/source/Target/Process.cpp:1507:9: warning: default label in
> switch
>  which covers all enumeration values [-Wcovered-switch-default]
> default:
> ^
>
>
> >
> > Well, this broke the build with -Werror which is my default, that's
> > why I made the change.
> > Is there a way we can make everybody happy you can think of?
> >
> >> On Tue, Jan 19, 2016 at 2:03 PM Davide Italiano via lldb-commits
> >>  wrote:
> >>>
> >>> Author: davide
> >>> Date: Tue Jan 19 15:59:12 2016
> >>> New Revision: 258199
> >>>
> >>> URL: http://llvm.org/viewvc/llvm-project?rev=258199=rev
> >>> Log:
> >>> [Process] Remove dead code. All the switch cases are already covered.
> >>>
> >>> Modified:
> >>> lldb/trunk/source/Expression/ExpressionSourceCode.cpp
> >>> lldb/trunk/source/Target/Process.cpp
> >>>
> >>> Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
> >>> URL:
> >>>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258199=258198=258199=diff
> >>>
> >>>
> ==
> >>> --- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
> >>> +++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan 19
> >>> 15:59:12 2016
> >>> @@ -118,8 +118,6 @@ public:
> >>>  return false;
> >>>  else
> >>>  return true;
> >>> -default:
> >>> -return false;
> >>>  }
> >>>  }
> >>>
> >>>
> >>> Modified: lldb/trunk/source/Target/Process.cpp
> >>> URL:
> >>>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258199=258198=258199=diff
> >>>
> >>>
> ==
> >>> --- lldb/trunk/source/Target/Process.cpp (original)
> >>> +++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 15:59:12 2016
> >>> @@ -1504,8 +1504,6 @@ Process::IsAlive ()
> >>>  case eStateCrashed:
> >>>  case eStateSuspended:
> >>>  return true;
> >>> -default:
> >>> -return false;
> >>>  }
> >>>  }
> >>>
> >>>
> >>>
> >>> ___
> >>> lldb-commits mailing list
> >>> lldb-commits@lists.llvm.org
> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> >
> >
> >
> > --
> > Davide
> >
> > "There are no solved problems; there are only problems that are more
> > or less solved" -- Henri Poincare
>
>
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D16247: Don't assume that thread 0 is always the main thread

2016-01-19 Thread Jim Ingham via lldb-commits
jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

That looks good.  get_one_thread_stopped_at_breakpoint is convenient, but I'd 
rather not sweep under the rug cases where you expected only one thread to hit 
your breakpoint but more than one did.  I think it would be better if this API 
returned None for number of threads != 1, not just threads == 0.  That way 
you'd get testing for that for free as well.  And then in the cases where it 
was expected that more than one thread might hit the breakpoint, you should use 
get_threads_stopped_at_breakpoint.


http://reviews.llvm.org/D16247



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


Re: [Lldb-commits] [PATCH] D16247: Don't assume that thread 0 is always the main thread

2016-01-19 Thread Zachary Turner via lldb-commits
zturner added a comment.

Maybe I can give it an argument like `require_exactly_one_thread` which 
defaults to True.  That way at least you can still use the same function in the 
case where you just want the first thread (which is how `get_stopped_thread` 
works)


http://reviews.llvm.org/D16247



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


Re: [Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Davide Italiano via lldb-commits
On Tue, Jan 19, 2016 at 2:11 PM, Zachary Turner  wrote:
> What about this:
>
> switch (m_private_state.GetValue())
> {
> case eStateConnected:
> case eStateAttaching:
> case eStateLaunching:
> case eStateStopped:
> case eStateRunning:
> case eStateStepping:
> case eStateCrashed:
> case eStateSuspended:
> return true;
>
> default:
> return false;
> }
>

Yes, that should work, I modified the other one in the same way
https://people.freebsd.org/~davide/llvm/lldb_uncoveredswitch.diff
Can you please take a look at the patch before I commit? (and also
ensure it doesn't re-introduce warning with your compiler?)

Thanks!

--
Davide

>
> On Tue, Jan 19, 2016 at 2:10 PM Davide Italiano  wrote:
>>
>> On Tue, Jan 19, 2016 at 2:08 PM, Davide Italiano 
>> wrote:
>> > On Tue, Jan 19, 2016 at 2:05 PM, Zachary Turner 
>> > wrote:
>> >> This is needed in order to prevent MSVC from warning about this case.
>> >> I
>> >> explicitly added these last week.  Can I ask that you revert this
>> >> change?
>> >>
>>
>> In particular:
>>
>> ../tools/lldb/source/Target/Process.cpp:1507:9: warning: default label in
>> switch
>>  which covers all enumeration values [-Wcovered-switch-default]
>> default:
>> ^
>>
>>
>> >
>> > Well, this broke the build with -Werror which is my default, that's
>> > why I made the change.
>> > Is there a way we can make everybody happy you can think of?
>> >
>> >> On Tue, Jan 19, 2016 at 2:03 PM Davide Italiano via lldb-commits
>> >>  wrote:
>> >>>
>> >>> Author: davide
>> >>> Date: Tue Jan 19 15:59:12 2016
>> >>> New Revision: 258199
>> >>>
>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=258199=rev
>> >>> Log:
>> >>> [Process] Remove dead code. All the switch cases are already covered.
>> >>>
>> >>> Modified:
>> >>> lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>> >>> lldb/trunk/source/Target/Process.cpp
>> >>>
>> >>> Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>> >>> URL:
>> >>>
>> >>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258199=258198=258199=diff
>> >>>
>> >>>
>> >>> ==
>> >>> --- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
>> >>> +++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan 19
>> >>> 15:59:12 2016
>> >>> @@ -118,8 +118,6 @@ public:
>> >>>  return false;
>> >>>  else
>> >>>  return true;
>> >>> -default:
>> >>> -return false;
>> >>>  }
>> >>>  }
>> >>>
>> >>>
>> >>> Modified: lldb/trunk/source/Target/Process.cpp
>> >>> URL:
>> >>>
>> >>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258199=258198=258199=diff
>> >>>
>> >>>
>> >>> ==
>> >>> --- lldb/trunk/source/Target/Process.cpp (original)
>> >>> +++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 15:59:12 2016
>> >>> @@ -1504,8 +1504,6 @@ Process::IsAlive ()
>> >>>  case eStateCrashed:
>> >>>  case eStateSuspended:
>> >>>  return true;
>> >>> -default:
>> >>> -return false;
>> >>>  }
>> >>>  }
>> >>>
>> >>>
>> >>>
>> >>> ___
>> >>> lldb-commits mailing list
>> >>> lldb-commits@lists.llvm.org
>> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>> >
>> >
>> >
>> > --
>> > Davide
>> >
>> > "There are no solved problems; there are only problems that are more
>> > or less solved" -- Henri Poincare
>>
>>
>>
>> --
>> Davide
>>
>> "There are no solved problems; there are only problems that are more
>> or less solved" -- Henri Poincare



-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D16247: Don't assume that thread 0 is always the main thread

2016-01-19 Thread Jim Ingham via lldb-commits
jingham added a comment.

Yes, that is a cleaner way to do this.

In about half the cases you use get_threads_stopped_at_breakpoint and half 
get_stopped_thread.  It looks like you were just mirroring what the test did, 
so that's fine, but if I know the breakpoint I'm expecting, I prefer 
get_threads_stopped_at_breakpoint as it is a more complete test.  As noted in 
the individual comments, I don't think you are using 
get_threads_stopped_at_breakpoint right, since it returns an array of threads, 
not a single thread.

BTW, I'm not averse to the notion of an API to get the "main thread" but none 
of these tests should be changed to use it (or should have used it if it 
already existed.)  After all, you wanted to know that you stopped on a thread 
at some breakpoint you set.  The fact that that is the "main" thread is 
incidental and gating ALL these tests on having "the main thread" even be a 
sensible notion for your platform seems to make them fragile for no benefit.



Comment at: 
packages/Python/lldbsuite/test/expression_command/test/TestExprs.py:133-134
@@ -132,8 +132,4 @@
 
-# The stop reason of the thread should be breakpoint.
-thread = process.GetThreadAtIndex(0)
-if thread.GetStopReason() != lldb.eStopReasonBreakpoint:
-from lldbsuite.test.lldbutil import stop_reason_to_str
-self.fail(STOPPED_DUE_TO_BREAKPOINT_WITH_STOP_REASON_AS %
-  stop_reason_to_str(thread.GetStopReason()))
+thread = lldbutil.get_threads_stopped_at_breakpoint(process, 
breakpoint)
+self.assertIsNotNone(thread, "Could not find thread stopped at 
breakpoint")
 

Is this one right? get_threads_stopped_at_breakpoint returns an array. You need 
to check that the return has only one element and then set thread to that 
element. Unless there's some Python magic that I'm missing...


Comment at: 
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py:40
@@ -39,4 +39,3 @@
 # We should be stopped at the first breakpoint
-thread = process.GetThreadAtIndex(0)
-self.assertEqual(thread.GetStopReason(), lldb.eStopReasonBreakpoint)
+thread = lldbutil.get_threads_stopped_at_breakpoint(process, 
breakpoint)
 

Is this one right? get_threads_stopped_at_breakpoint returns an array. You need 
to check that the return has only one element and then set thread to that 
element. Unless there's some Python magic that I'm missing...


Comment at: 
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py:54-55
@@ -54,4 +53,4 @@
 # We should be stopped at the second breakpoint
-thread = process.GetThreadAtIndex(0)
-self.assertEqual(thread.GetStopReason(), lldb.eStopReasonBreakpoint)
+thread = lldbutil.get_threads_stopped_at_breakpoint(process, 
breakpoint2)
+self.assertIsNotNone(thread)
 

Is this one right? get_threads_stopped_at_breakpoint returns an array. You need 
to check that the return has only one element and then set thread to that 
element. Unless there's some Python magic that I'm missing...


Comment at: 
packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py:67-68
@@ -66,3 +66,4 @@
 print("j is: ", j)
-thread = process.GetThreadAtIndex(0)
+thread = lldbutil.get_threads_stopped_at_breakpoint(process, 
breakpoint)
+self.assertIsNotNone(thread)
 

Is this one right?  get_threads_stopped_at_breakpoint returns an array.  You 
need to check that the return has only one element and then set thread to that 
element.  Unless there's some Python magic that I'm missing...


http://reviews.llvm.org/D16247



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


Re: [Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Davide Italiano via lldb-commits
On Tue, Jan 19, 2016 at 2:24 PM, Zachary Turner  wrote:
> Should be fine.  I probably don't need to try out the patch, it looks good
> as is (and I'm not in a state where I can try it for a while)
>

Thanks. To close the loop, this is r258212.

> On Tue, Jan 19, 2016 at 2:22 PM Davide Italiano  wrote:
>>
>> On Tue, Jan 19, 2016 at 2:11 PM, Zachary Turner 
>> wrote:
>> > What about this:
>> >
>> > switch (m_private_state.GetValue())
>> > {
>> > case eStateConnected:
>> > case eStateAttaching:
>> > case eStateLaunching:
>> > case eStateStopped:
>> > case eStateRunning:
>> > case eStateStepping:
>> > case eStateCrashed:
>> > case eStateSuspended:
>> > return true;
>> >
>> > default:
>> > return false;
>> > }
>> >
>>
>> Yes, that should work, I modified the other one in the same way
>> https://people.freebsd.org/~davide/llvm/lldb_uncoveredswitch.diff
>> Can you please take a look at the patch before I commit? (and also
>> ensure it doesn't re-introduce warning with your compiler?)
>>
>> Thanks!
>>
>> --
>> Davide
>>
>> >
>> > On Tue, Jan 19, 2016 at 2:10 PM Davide Italiano 
>> > wrote:
>> >>
>> >> On Tue, Jan 19, 2016 at 2:08 PM, Davide Italiano 
>> >> wrote:
>> >> > On Tue, Jan 19, 2016 at 2:05 PM, Zachary Turner 
>> >> > wrote:
>> >> >> This is needed in order to prevent MSVC from warning about this
>> >> >> case.
>> >> >> I
>> >> >> explicitly added these last week.  Can I ask that you revert this
>> >> >> change?
>> >> >>
>> >>
>> >> In particular:
>> >>
>> >> ../tools/lldb/source/Target/Process.cpp:1507:9: warning: default label
>> >> in
>> >> switch
>> >>  which covers all enumeration values [-Wcovered-switch-default]
>> >> default:
>> >> ^
>> >>
>> >>
>> >> >
>> >> > Well, this broke the build with -Werror which is my default, that's
>> >> > why I made the change.
>> >> > Is there a way we can make everybody happy you can think of?
>> >> >
>> >> >> On Tue, Jan 19, 2016 at 2:03 PM Davide Italiano via lldb-commits
>> >> >>  wrote:
>> >> >>>
>> >> >>> Author: davide
>> >> >>> Date: Tue Jan 19 15:59:12 2016
>> >> >>> New Revision: 258199
>> >> >>>
>> >> >>> URL: http://llvm.org/viewvc/llvm-project?rev=258199=rev
>> >> >>> Log:
>> >> >>> [Process] Remove dead code. All the switch cases are already
>> >> >>> covered.
>> >> >>>
>> >> >>> Modified:
>> >> >>> lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>> >> >>> lldb/trunk/source/Target/Process.cpp
>> >> >>>
>> >> >>> Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>> >> >>> URL:
>> >> >>>
>> >> >>>
>> >> >>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258199=258198=258199=diff
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> ==
>> >> >>> --- lldb/trunk/source/Expression/ExpressionSourceCode.cpp
>> >> >>> (original)
>> >> >>> +++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan
>> >> >>> 19
>> >> >>> 15:59:12 2016
>> >> >>> @@ -118,8 +118,6 @@ public:
>> >> >>>  return false;
>> >> >>>  else
>> >> >>>  return true;
>> >> >>> -default:
>> >> >>> -return false;
>> >> >>>  }
>> >> >>>  }
>> >> >>>
>> >> >>>
>> >> >>> Modified: lldb/trunk/source/Target/Process.cpp
>> >> >>> URL:
>> >> >>>
>> >> >>>
>> >> >>> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258199=258198=258199=diff
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> ==
>> >> >>> --- lldb/trunk/source/Target/Process.cpp (original)
>> >> >>> +++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 15:59:12 2016
>> >> >>> @@ -1504,8 +1504,6 @@ Process::IsAlive ()
>> >> >>>  case eStateCrashed:
>> >> >>>  case eStateSuspended:
>> >> >>>  return true;
>> >> >>> -default:
>> >> >>> -return false;
>> >> >>>  }
>> >> >>>  }
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> ___
>> >> >>> lldb-commits mailing list
>> >> >>> lldb-commits@lists.llvm.org
>> >> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Davide
>> >> >
>> >> > "There are no solved problems; there are only problems that are more
>> >> > or less solved" -- Henri Poincare
>> >>
>> >>
>> >>
>> >> --
>> >> Davide
>> >>
>> >> "There are no solved problems; there are only problems that are more
>> >> or less solved" -- Henri Poincare
>>
>>
>>
>> --
>> Davide
>>
>> "There are no solved problems; there are only problems that are more
>> or less solved" -- Henri Poincare



-- 
Davide

"There are no 

[Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Davide Italiano via lldb-commits
Author: davide
Date: Tue Jan 19 15:59:12 2016
New Revision: 258199

URL: http://llvm.org/viewvc/llvm-project?rev=258199=rev
Log:
[Process] Remove dead code. All the switch cases are already covered.

Modified:
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258199=258198=258199=diff
==
--- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
+++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan 19 15:59:12 
2016
@@ -118,8 +118,6 @@ public:
 return false;
 else
 return true;
-default:
-return false;
 }
 }
 

Modified: lldb/trunk/source/Target/Process.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258199=258198=258199=diff
==
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 15:59:12 2016
@@ -1504,8 +1504,6 @@ Process::IsAlive ()
 case eStateCrashed:
 case eStateSuspended:
 return true;
-default:
-return false;
 }
 }
 


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


Re: [Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Zachary Turner via lldb-commits
Should be fine.  I probably don't need to try out the patch, it looks good
as is (and I'm not in a state where I can try it for a while)

On Tue, Jan 19, 2016 at 2:22 PM Davide Italiano  wrote:

> On Tue, Jan 19, 2016 at 2:11 PM, Zachary Turner 
> wrote:
> > What about this:
> >
> > switch (m_private_state.GetValue())
> > {
> > case eStateConnected:
> > case eStateAttaching:
> > case eStateLaunching:
> > case eStateStopped:
> > case eStateRunning:
> > case eStateStepping:
> > case eStateCrashed:
> > case eStateSuspended:
> > return true;
> >
> > default:
> > return false;
> > }
> >
>
> Yes, that should work, I modified the other one in the same way
> https://people.freebsd.org/~davide/llvm/lldb_uncoveredswitch.diff
> Can you please take a look at the patch before I commit? (and also
> ensure it doesn't re-introduce warning with your compiler?)
>
> Thanks!
>
> --
> Davide
>
> >
> > On Tue, Jan 19, 2016 at 2:10 PM Davide Italiano 
> wrote:
> >>
> >> On Tue, Jan 19, 2016 at 2:08 PM, Davide Italiano 
> >> wrote:
> >> > On Tue, Jan 19, 2016 at 2:05 PM, Zachary Turner 
> >> > wrote:
> >> >> This is needed in order to prevent MSVC from warning about this case.
> >> >> I
> >> >> explicitly added these last week.  Can I ask that you revert this
> >> >> change?
> >> >>
> >>
> >> In particular:
> >>
> >> ../tools/lldb/source/Target/Process.cpp:1507:9: warning: default label
> in
> >> switch
> >>  which covers all enumeration values [-Wcovered-switch-default]
> >> default:
> >> ^
> >>
> >>
> >> >
> >> > Well, this broke the build with -Werror which is my default, that's
> >> > why I made the change.
> >> > Is there a way we can make everybody happy you can think of?
> >> >
> >> >> On Tue, Jan 19, 2016 at 2:03 PM Davide Italiano via lldb-commits
> >> >>  wrote:
> >> >>>
> >> >>> Author: davide
> >> >>> Date: Tue Jan 19 15:59:12 2016
> >> >>> New Revision: 258199
> >> >>>
> >> >>> URL: http://llvm.org/viewvc/llvm-project?rev=258199=rev
> >> >>> Log:
> >> >>> [Process] Remove dead code. All the switch cases are already
> covered.
> >> >>>
> >> >>> Modified:
> >> >>> lldb/trunk/source/Expression/ExpressionSourceCode.cpp
> >> >>> lldb/trunk/source/Target/Process.cpp
> >> >>>
> >> >>> Modified: lldb/trunk/source/Expression/ExpressionSourceCode.cpp
> >> >>> URL:
> >> >>>
> >> >>>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ExpressionSourceCode.cpp?rev=258199=258198=258199=diff
> >> >>>
> >> >>>
> >> >>>
> ==
> >> >>> --- lldb/trunk/source/Expression/ExpressionSourceCode.cpp (original)
> >> >>> +++ lldb/trunk/source/Expression/ExpressionSourceCode.cpp Tue Jan 19
> >> >>> 15:59:12 2016
> >> >>> @@ -118,8 +118,6 @@ public:
> >> >>>  return false;
> >> >>>  else
> >> >>>  return true;
> >> >>> -default:
> >> >>> -return false;
> >> >>>  }
> >> >>>  }
> >> >>>
> >> >>>
> >> >>> Modified: lldb/trunk/source/Target/Process.cpp
> >> >>> URL:
> >> >>>
> >> >>>
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=258199=258198=258199=diff
> >> >>>
> >> >>>
> >> >>>
> ==
> >> >>> --- lldb/trunk/source/Target/Process.cpp (original)
> >> >>> +++ lldb/trunk/source/Target/Process.cpp Tue Jan 19 15:59:12 2016
> >> >>> @@ -1504,8 +1504,6 @@ Process::IsAlive ()
> >> >>>  case eStateCrashed:
> >> >>>  case eStateSuspended:
> >> >>>  return true;
> >> >>> -default:
> >> >>> -return false;
> >> >>>  }
> >> >>>  }
> >> >>>
> >> >>>
> >> >>>
> >> >>> ___
> >> >>> lldb-commits mailing list
> >> >>> lldb-commits@lists.llvm.org
> >> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> >> >
> >> >
> >> >
> >> > --
> >> > Davide
> >> >
> >> > "There are no solved problems; there are only problems that are more
> >> > or less solved" -- Henri Poincare
> >>
> >>
> >>
> >> --
> >> Davide
> >>
> >> "There are no solved problems; there are only problems that are more
> >> or less solved" -- Henri Poincare
>
>
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] LLVM buildmaster will be restarted tonight

2016-01-19 Thread Galina Kistanova via lldb-commits
Hello everyone,

LLVM buildmaster will be updated and restarted after 7 PM Pacific time
today.

Thanks

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


[Lldb-commits] [lldb] r258150 - Implementing the method Target::TargetEventData::Dump (Stream *s) so that its clients can easily dump it out for informational messages.

2016-01-19 Thread Oleksiy Vyalov via lldb-commits
Author: ovyalov
Date: Tue Jan 19 11:54:47 2016
New Revision: 258150

URL: http://llvm.org/viewvc/llvm-project?rev=258150=rev
Log:
Implementing the method Target::TargetEventData::Dump (Stream *s) so that its 
clients can easily dump it out for informational messages.

http://reviews.llvm.org/D16244

Submitting on behalf of vishw...@google.com.


Modified:
lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/source/Target/Target.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=258150=258149=258150=diff
==
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Tue Jan 19 11:54:47 2016
@@ -4147,6 +4147,12 @@ Target::TargetEventData::GetFlavorString
 void
 Target::TargetEventData::Dump (Stream *s) const
 {
+for (size_t i = 0; i < m_module_list.GetSize(); ++i)
+{
+if (i != 0)
+ *s << ", ";
+m_module_list.GetModuleAtIndex(i)->GetDescription(s, 
lldb::eDescriptionLevelBrief);
+}
 }
 
 const Target::TargetEventData *


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


Re: [Lldb-commits] [PATCH] D16244: Implementing the method Target::TargetEventData::Dump (Stream *s) so that its clients can easily dump it out for informational messages.

2016-01-19 Thread Oleksiy Vyalov via lldb-commits
ovyalov closed this revision.
ovyalov added a comment.

Submitted as http://reviews.llvm.org/rL258150


http://reviews.llvm.org/D16244



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


Re: [Lldb-commits] [PATCH] D14111: Use "_$" prefix instead of "$" for dynamic checker function inserted by LLDB during expression evaluation

2016-01-19 Thread Sean Callanan via lldb-commits
spyffe requested changes to this revision.
spyffe added a comment.
This revision now requires changes to proceed.

That looks fine to me as far as it goes, but it doesn't cover other places 
where $ is used in function names, e.g. the name of the expression itself, and 
classes it's placed in.  Could you have a look at ExpressionSourceCode.cpp and 
see if there is anything there that needs a $ as well?


Repository:
  rL LLVM

http://reviews.llvm.org/D14111



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


Re: [Lldb-commits] [PATCH] D16334: Fix TestSignedTypes.py by removing a bogus step-over

2016-01-19 Thread Jim Ingham via lldb-commits
jingham added a subscriber: jingham.
jingham added a comment.

I agree with Zachary.  Just because a test found a bug that wasn't essential to 
the test doesn't mean we should "fix" the test by silencing the part of the 
test that uncovered the bug.

This test puts a breakpoint on a 'puts("")' statement and steps over it.  All 
the variables should still be available at that point.  So this is a real bug.

If really want to get this particular test working, then it would be okay to 
add another test that uncovers the same bug but doesn't test the actual values, 
xfail that and then delete the step here.


http://reviews.llvm.org/D16334



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


[Lldb-commits] [PATCH] D16334: Fix TestSignedTypes.py by removing a bogus step-over

2016-01-19 Thread Adrian McCarthy via lldb-commits
amccarth created this revision.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.

Apparently something changed with `thread step-over`, causing execution to move 
outside the stack frame, and thus the local variables were no longer visible.

Since the step-over is unrelated to the purpose of the test and since the 
comment for that line was just plain wrong (the breakpoint set is already 
beyond the last assignment, so this seems legit), I deleted that step.

Tested on Windows with both Python 2.7 and 3.5.

http://reviews.llvm.org/D16334

Files:
  packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py

Index: packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
===
--- packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
+++ packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
@@ -48,9 +48,6 @@
 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
 substrs = [' resolved, hit count = 1'])
 
-# Execute the assignment statement.
-self.runCmd("thread step-over")
-
 # Test that signed types display correctly.
 self.expect("frame variable --show-types --no-args", 
VARIABLES_DISPLAYED_CORRECTLY,
 patterns = ["\((short int|short)\) the_signed_short = 99",


Index: packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
===
--- packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
+++ packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
@@ -48,9 +48,6 @@
 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
 substrs = [' resolved, hit count = 1'])
 
-# Execute the assignment statement.
-self.runCmd("thread step-over")
-
 # Test that signed types display correctly.
 self.expect("frame variable --show-types --no-args", VARIABLES_DISPLAYED_CORRECTLY,
 patterns = ["\((short int|short)\) the_signed_short = 99",
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r258199 - [Process] Remove dead code. All the switch cases are already covered.

2016-01-19 Thread Joerg Sonnenberger via lldb-commits
On Tue, Jan 19, 2016 at 10:11:48PM +, Zachary Turner via lldb-commits wrote:
> What about this:
> 
> switch (m_private_state.GetValue())
> {
> case eStateConnected:
> case eStateAttaching:
> case eStateLaunching:
> case eStateStopped:
> case eStateRunning:
> case eStateStepping:
> case eStateCrashed:
> case eStateSuspended:
> return true;
> 
> default:
> return false;
> }

The prefered form in LLVM is to have a unreachable after the switch when
it is supposed to be covered, does that work for LLVM here? E.g. do list
the case with false, but drop the default in favor of an
llvm_unreachable after the switch.

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


Re: [Lldb-commits] [PATCH] D16334: Fix TestSignedTypes.py by removing a bogus step-over

2016-01-19 Thread Zachary Turner via lldb-commits
zturner added a comment.

I don't think something has changed within lldb though, because jsut updating 
lldb without updating llvm and clang also don't trigger this problem.  I think 
we should try to figure out what really broke.


http://reviews.llvm.org/D16334



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


Re: [Lldb-commits] [PATCH] D16334: Fix TestSignedTypes.py by removing a bogus step-over

2016-01-19 Thread Zachary Turner via lldb-commits
zturner added a comment.

fwiw, `thread step-over` is *still* broken on Windows (because, well, fixing it 
is kind of hard).  So I'm not surprised that breaks (although I'm a little 
surprised it worked in the first place).  But at the same time this test 
broken, about 15 other tests broke as well, so we need to figure out what the 
underlying cause of the breaks is (and we can always remove this step-over 
later)


http://reviews.llvm.org/D16334



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


Re: [Lldb-commits] [PATCH] D14111: Use "_$" prefix instead of "$" for dynamic checker function inserted by LLDB during expression evaluation

2016-01-19 Thread Bhushan Attarde via lldb-commits
bhushan added a comment.

In http://reviews.llvm.org/D14111#330305, @spyffe wrote:

> That looks fine to me as far as it goes, but it doesn't cover other places 
> where $ is used in function names, e.g. the name of the expression itself, 
> and classes it's placed in.  Could you have a look at 
> ExpressionSourceCode.cpp and see if there is anything there that needs a $ as 
> well?


The other function names in ExpressionSourceCode.cpp e.g. `$__lldb_expr` does 
not require to be prefixed with an additional underscore like `_$__lldb_expr`.
This is because these names get mangled by the compiler to something like 
`_Z12$__lldb_exprPv`, so they does not start with "$" and hence not marked as 
‘temporary’ symbols.

The additional `_` prefix is only needed for "$__lldb_valid_pointer_check" 
since this name does not get mangled by compiler (may be because it has C 
Language linkage).


Repository:
  rL LLVM

http://reviews.llvm.org/D14111



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


[Lldb-commits] [lldb] r258289 - Some 32-bit arm corefiles on darwin may have their general purpose

2016-01-19 Thread Jason Molenda via lldb-commits
Author: jmolenda
Date: Tue Jan 19 23:17:13 2016
New Revision: 258289

URL: http://llvm.org/viewvc/llvm-project?rev=258289=rev
Log:
Some 32-bit arm corefiles on darwin may have their general purpose
register set indicated by ARM_THREAD_STATE32 (value 9) instead of
the old ARM_THREAD_STATE (value 1); this patch changes lldb to
accept either register set flavor code.



Modified:
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=258289=258288=258289=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Tue Jan 19 
23:17:13 2016
@@ -541,6 +541,7 @@ public:
 lldb::offset_t next_thread_state = offset + (count * 4);
 switch (flavor)
 {
+case GPRAltRegSet:
 case GPRRegSet:
 for (uint32_t i=0; i

[Lldb-commits] [lldb] r258122 - Fix for Bug 25338

2016-01-19 Thread Ravitheja Addepally via lldb-commits
Author: ravitheja
Date: Tue Jan 19 06:55:21 2016
New Revision: 258122

URL: http://llvm.org/viewvc/llvm-project?rev=258122=rev
Log:
Fix for Bug 25338

Summary:
The issue arises because LLDB is not
able to read the vdso library correctly.
The fix adds memory allocation callbacks
to allocate sufficient memory in case the
requested offsets don't fit in the memory
buffer allocated for the ELF.

Reviewers: lldb-commits, clayborg, deepak2427, ovyalov, labath, tberghammer

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

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py

lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py?rev=258122=258121=258122=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
 Tue Jan 19 06:55:21 2016
@@ -15,8 +15,7 @@ class AssertingInferiorTestCase(TestBase
 mydir = TestBase.compute_mydir(__file__)
 
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
-@expectedFailurei386("llvm.org/pr25338")
-@expectedFailureLinux("llvm.org/pr25338", archs=['arm', 'i386'])
+@expectedFailureLinux("llvm.org/pr25338", archs=['arm'])
 def test_inferior_asserting(self):
 """Test that lldb reliably catches the inferior asserting (command)."""
 self.build()
@@ -30,8 +29,7 @@ class AssertingInferiorTestCase(TestBase
 self.inferior_asserting_registers()
 
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
-@expectedFailurei386("llvm.org/pr25338")
-@expectedFailureLinux("llvm.org/pr25338", archs=['arm', 'i386'])
+@expectedFailureLinux("llvm.org/pr25338", archs=['arm'])
 def test_inferior_asserting_disassemble(self):
 """Test that lldb reliably disassembles frames after asserting 
(command)."""
 self.build()
@@ -45,16 +43,14 @@ class AssertingInferiorTestCase(TestBase
 self.inferior_asserting_python()
 
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
-@expectedFailurei386("llvm.org/pr25338")
-@expectedFailureLinux("llvm.org/pr25338", archs=['arm', 'i386'])
+@expectedFailureLinux("llvm.org/pr25338", archs=['arm'])
 def test_inferior_asserting_expr(self):
 """Test that the lldb expression interpreter can read from the 
inferior after asserting (command)."""
 self.build()
 self.inferior_asserting_expr()
 
 @expectedFailureWindows("llvm.org/pr21793: need to implement support for 
detecting assertion / abort on Windows")
-@expectedFailurei386("llvm.org/pr25338")
-@expectedFailureLinux("llvm.org/pr25338", archs=['arm', 'i386'])
+@expectedFailureLinux("llvm.org/pr25338", archs=['arm'])
 def test_inferior_asserting_step(self):
 """Test that lldb functions correctly after stepping through a call to 
assert()."""
 self.build()

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py?rev=258122=258121=258122=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
 Tue Jan 19 06:55:21 2016
@@ -14,7 +14,6 @@ import lldbsuite.test.lldbutil as lldbut
 class NoreturnUnwind(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailurei386("llvm.org/pr25338")
 @skipIfWindows # clang-cl does not support gcc style attributes.
 def test (self):
 """Test that we can backtrace correctly with 'noreturn' functions on 
the stack"""

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py?rev=258122=258121=258122=diff

Re: [Lldb-commits] [PATCH] D16107: Fix for Bug 25338

2016-01-19 Thread Tamas Berghammer via lldb-commits
tberghammer accepted this revision.
tberghammer added a comment.
This revision is now accepted and ready to land.

Looks good


http://reviews.llvm.org/D16107



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


Re: [Lldb-commits] [PATCH] D16293: [cmake] Make dependencies of lldb libraries private

2016-01-19 Thread Todd Fiala via lldb-commits
tfiala added a subscriber: tfiala.
tfiala added a comment.

> Setting the dependencies as private required a fixup of the argdumper link 
> command, as it was not


actually linking to liblldb (it was referring to symbols from the lldb_private 
namespace, which
are not exposed in liblldb),

At some point lldb-argdumper is planned to be reworked just slightly so it had 
no dependencies on the lldb core.  (That would have avoided this I suspect.)


http://reviews.llvm.org/D16293



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


Re: [Lldb-commits] [PATCH] D16334: Fix TestSignedTypes.py by removing a bogus step-over

2016-01-19 Thread Adrian McCarthy via lldb-commits
amccarth abandoned this revision.
amccarth added a comment.

Interestingly, the test_step_over_dwarf test is now getting an UNEXPECTED 
SUCCESS on Windows.

The TestUnsignedTypes.py test (from which this one was apparently copied--see 
the class name) doesn't have the step-over.


http://reviews.llvm.org/D16334



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


Re: [Lldb-commits] [PATCH] D16284: Fix Makefile build

2016-01-19 Thread Hans Wennborg via lldb-commits
hans added a comment.

In http://reviews.llvm.org/D16284#329161, @loladiro wrote:

> The Makefile system will be removed from trunk very soon, so it might not 
> necessarily make sense there, but I think it would be good to get this 
> applied to release-38. @clayborg @hans how would you like to handle that? 
> Apply this to trunk and backport?


Yes, exactly.


http://reviews.llvm.org/D16284



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


[Lldb-commits] [PATCH] D16322: Enable test log collection from remote debug servers

2016-01-19 Thread Pavel Labath via lldb-commits
labath created this revision.
labath added a reviewer: tfiala.
labath added a subscriber: lldb-commits.

We already have the ability to collect the server logs when doing local 
debugging. This enables
the collection of remote logs as well. This relies on specifying a relative 
path "server.log" for
LLDB_DEBUGSERVER_LOG_FILE when starting remote platform. Since we always set 
the platform working
directory to a fresh folder to avoid conflicts, the actual file path will 
always be different and
we can pick the logs up from there.

http://reviews.llvm.org/D16322

Files:
  packages/Python/lldbsuite/test/lldbtest.py

Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -1345,21 +1345,24 @@
 else:
 categories = "default"
 
-if channel == "gdb-remote":
+if channel == "gdb-remote" and lldb.remote_platform is None:
 # communicate gdb-remote categories to debugserver
 os.environ["LLDB_DEBUGSERVER_LOG_FLAGS"] = categories
 
 self.ci.HandleCommand(log_enable + channel_with_categories, 
self.res)
 if not self.res.Succeeded():
 raise Exception('log enable failed (check LLDB_LOG_OPTION env 
variable)')
 
 # Communicate log path name to debugserver & lldb-server
-server_log_path = "{}-server.log".format(log_basename)
-open(server_log_path, 'w').close()
-os.environ["LLDB_DEBUGSERVER_LOG_FILE"] = server_log_path
+# For remote debugging, these variables need to be set when starting 
the platform
+# instance.
+if lldb.remote_platform is None:
+server_log_path = "{}-server.log".format(log_basename)
+open(server_log_path, 'w').close()
+os.environ["LLDB_DEBUGSERVER_LOG_FILE"] = server_log_path
 
-# Communicate channels to lldb-server
-os.environ["LLDB_SERVER_LOG_CHANNELS"] = 
":".join(lldbtest_config.channels)
+# Communicate channels to lldb-server
+os.environ["LLDB_SERVER_LOG_CHANNELS"] = 
":".join(lldbtest_config.channels)
 
 if len(lldbtest_config.channels) == 0:
 return
@@ -1373,6 +1376,15 @@
 if not self.res.Succeeded():
 raise Exception('log disable failed (check LLDB_LOG_OPTION env 
variable)')
 
+# Retrieve the server log (if any) from the remote system. It is 
assumed the server log
+# is writting to the "server.log" file in the current test directory. 
This can be
+# achieved by setting LLDB_DEBUGSERVER_LOG_FILE="server.log" when 
starting remote
+# platform.
+if lldb.remote_platform:
+# This is executed on a best-effort basis. If the file is not 
there, so be it.
+lldb.remote_platform.Get(lldb.SBFileSpec("server.log"),
+
lldb.SBFileSpec(self.getLogBasenameForCurrentTest()+"-server.log"))
+
 def setUp(self):
 """Fixture for unittest test case setup.
 


Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -1345,21 +1345,24 @@
 else:
 categories = "default"
 
-if channel == "gdb-remote":
+if channel == "gdb-remote" and lldb.remote_platform is None:
 # communicate gdb-remote categories to debugserver
 os.environ["LLDB_DEBUGSERVER_LOG_FLAGS"] = categories
 
 self.ci.HandleCommand(log_enable + channel_with_categories, self.res)
 if not self.res.Succeeded():
 raise Exception('log enable failed (check LLDB_LOG_OPTION env variable)')
 
 # Communicate log path name to debugserver & lldb-server
-server_log_path = "{}-server.log".format(log_basename)
-open(server_log_path, 'w').close()
-os.environ["LLDB_DEBUGSERVER_LOG_FILE"] = server_log_path
+# For remote debugging, these variables need to be set when starting the platform
+# instance.
+if lldb.remote_platform is None:
+server_log_path = "{}-server.log".format(log_basename)
+open(server_log_path, 'w').close()
+os.environ["LLDB_DEBUGSERVER_LOG_FILE"] = server_log_path
 
-# Communicate channels to lldb-server
-os.environ["LLDB_SERVER_LOG_CHANNELS"] = ":".join(lldbtest_config.channels)
+# Communicate channels to lldb-server
+os.environ["LLDB_SERVER_LOG_CHANNELS"] = ":".join(lldbtest_config.channels)
 
 if len(lldbtest_config.channels) == 0:
 return
@@ -1373,6 +1376,15 @@
 if not self.res.Succeeded():
 raise Exception('log disable failed (check LLDB_LOG_OPTION env