Re: [Lldb-commits] [lldb] r291198 - Make lldb -Werror clean for -Wstring-conversion

2017-01-05 Thread David Blaikie via lldb-commits
Ah, thanks - r291204 should hopefully do it, otherwise I might need some
help. I'm assuming I'm not actually building this code - think I just ended
up touching it after doing a bunch of manual cleanup then resorting to sed
- so possibly ended up touching code that isn't building in my
configuration.

On Thu, Jan 5, 2017 at 5:02 PM Tim Hammerquist  wrote:

> Green Dragon build <
> http://lab.llvm.org:8080/green/job/lldb_build_test/23854/> failed with
> this commit with the error:
>
> CompileC
> build/debugserver.build/Release/debugserver.build/Objects-normal/x86_64/DNBDataRef.o
> source/DNBDataRef.cpp normal x86_64 c++
> com.apple.compilers.llvm.clang.1_0.compiler cd
> "/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver"
> export LANG=en_US.US-ASCII
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
> -x c++ -arch x86_64 -fmessage-length=0
> -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11
> -stdlib=libc++ -Wno-trigraphs -fpascal-strings -Os -fno-common
> -Wno-missing-field-initializers -Wno-missing-prototypes -Wunreachable-code
> -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors
> -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function
> -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value
> -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow
> -Wno-four-char-constants -Wno-conversion -Wconstant-conversion
> -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32
> -Wno-newline-eof -Wno-c++11-extensions -DLLDB_DEBUGSERVER_RELEASE -isysroot
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
> -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof
> -mmacosx-version-min=10.9 -g -fvisibility=hidden
> -fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion
> -Wno-move 
> -I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/debugserver.hmap
> -Isource -I../../source 
> -I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/DerivedSources
> -I../../include 
> -I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/Release/include
> -I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/DerivedSources/x86_64
> -I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/DerivedSources
> -F/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/Release
> -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/PrivateFrameworks
> -Wparentheses -DDT_VARIANT_ -DHAVE_LIBZ=1 -DLLDB_USE_OS_LOG=0 -MMD -MT
> dependencies -MF 
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/Objects-normal/x86_64/DNBDataRef.d
> --serialize-diagnostics 
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/Objects-normal/x86_64/DNBDataRef.dia
> -c 
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/source/DNBDataRef.cpp
> -o 
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/Objects-normal/x86_64/DNBDataRef.o
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/source/DNBDataRef.cpp:123:5:
> error: use of undeclared identifier 'llvm_unreachable' 
> llvm_unreachable("GetMax32
> unhandled case!"); ^ 
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/source/DNBDataRef.cpp:144:5:
> error: use of undeclared identifier 'llvm_unreachable'
> llvm_unreachable("GetMax64 unhandled case!"); ^ 2 errors generated.
>
> On Thu, Jan 5, 2017 at 4:38 PM, David Blaikie via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
> Author: dblaikie
> Date: Thu Jan  5 18:38:06 2017
> New Revision: 291198
>
> URL: http://llvm.org/viewvc/llvm-project?rev=291198=rev
> Log:
> Make lldb -Werror clean for -Wstring-conversion
>
> Also found/fixed one bug identified by this warning in
> RenderScriptx86ABIFixups.cpp where a string literal was being used in an
> effort to provide a name for an instruction/register, but was instead
> being passed as the bool 'isVolatile' parameter.
>
> Modified:
> lldb/trunk/include/lldb/Core/MappedHash.h
> lldb/trunk/source/Core/DataEncoder.cpp
> lldb/trunk/source/Core/ValueObjectMemory.cpp
> lldb/trunk/source/Expression/IRInterpreter.cpp
> lldb/trunk/source/Host/windows/EditLineWin.cpp
> lldb/trunk/source/Interpreter/OptionValueProperties.cpp
>
> 

[Lldb-commits] [lldb] r291204 - Revert part of cleanup to fix a build break

2017-01-05 Thread David Blaikie via lldb-commits
Author: dblaikie
Date: Thu Jan  5 19:42:56 2017
New Revision: 291204

URL: http://llvm.org/viewvc/llvm-project?rev=291204=rev
Log:
Revert part of cleanup to fix a build break

Wasn't sure I could include ErrorHandling.h here, and evidently I wasn't
building this part (must've made the change using sed after getting
tired of fixing each compilation error individually).

Modified:
lldb/trunk/tools/debugserver/source/DNBDataRef.cpp

Modified: lldb/trunk/tools/debugserver/source/DNBDataRef.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBDataRef.cpp?rev=291204=291203=291204=diff
==
--- lldb/trunk/tools/debugserver/source/DNBDataRef.cpp (original)
+++ lldb/trunk/tools/debugserver/source/DNBDataRef.cpp Thu Jan  5 19:42:56 2017
@@ -115,13 +115,18 @@ uint32_t DNBDataRef::GetMax32(offset_t *
   switch (byte_size) {
   case 1:
 return Get8(offset_ptr);
+break;
   case 2:
 return Get16(offset_ptr);
+break;
   case 4:
 return Get32(offset_ptr);
+break;
   default:
-llvm_unreachable("GetMax32 unhandled case!");
+assert(!"GetMax32 unhandled case!");
+break;
   }
+  return 0;
 }
 
 //--
@@ -134,15 +139,21 @@ uint64_t DNBDataRef::GetMax64(offset_t *
   switch (size) {
   case 1:
 return Get8(offset_ptr);
+break;
   case 2:
 return Get16(offset_ptr);
+break;
   case 4:
 return Get32(offset_ptr);
+break;
   case 8:
 return Get64(offset_ptr);
+break;
   default:
-llvm_unreachable("GetMax64 unhandled case!");
+assert(!"GetMax64 unhandled case!");
+break;
   }
+  return 0;
 }
 
 //--


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


Re: [Lldb-commits] [lldb] r291198 - Make lldb -Werror clean for -Wstring-conversion

2017-01-05 Thread Tim Hammerquist via lldb-commits
Green Dragon build <
http://lab.llvm.org:8080/green/job/lldb_build_test/23854/> failed with this
commit with the error:

CompileC
build/debugserver.build/Release/debugserver.build/Objects-normal/x86_64/DNBDataRef.o
source/DNBDataRef.cpp normal x86_64 c++
com.apple.compilers.llvm.clang.1_0.compiler cd
"/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver"
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-x c++ -arch x86_64 -fmessage-length=0
-fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11
-stdlib=libc++ -Wno-trigraphs -fpascal-strings -Os -fno-common
-Wno-missing-field-initializers -Wno-missing-prototypes -Wunreachable-code
-Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors
-Wno-missing-braces -Wparentheses -Wswitch -Wunused-function
-Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value
-Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow
-Wno-four-char-constants -Wno-conversion -Wconstant-conversion
-Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32
-Wno-newline-eof -Wno-c++11-extensions -DLLDB_DEBUGSERVER_RELEASE -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
-fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof
-mmacosx-version-min=10.9 -g -fvisibility=hidden
-fvisibility-inlines-hidden -Wno-sign-conversion -Wno-infinite-recursion
-Wno-move 
-I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/debugserver.hmap
-Isource -I../../source
-I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/DerivedSources
-I../../include
-I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/Release/include
-I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/DerivedSources/x86_64
-I/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/DerivedSources
-F/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/Release
-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/PrivateFrameworks
-Wparentheses -DDT_VARIANT_ -DHAVE_LIBZ=1 -DLLDB_USE_OS_LOG=0 -MMD -MT
dependencies -MF
/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/Objects-normal/x86_64/DNBDataRef.d
--serialize-diagnostics
/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/Objects-normal/x86_64/DNBDataRef.dia
-c 
/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/source/DNBDataRef.cpp
-o 
/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/build/debugserver.build/Release/debugserver.build/Objects-normal/x86_64/DNBDataRef.o
/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/source/DNBDataRef.cpp:123:5:
error: use of undeclared identifier 'llvm_unreachable'
llvm_unreachable("GetMax32
unhandled case!"); ^
/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/tools/debugserver/source/DNBDataRef.cpp:144:5:
error: use of undeclared identifier 'llvm_unreachable'
llvm_unreachable("GetMax64 unhandled case!"); ^ 2 errors generated.

On Thu, Jan 5, 2017 at 4:38 PM, David Blaikie via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: dblaikie
> Date: Thu Jan  5 18:38:06 2017
> New Revision: 291198
>
> URL: http://llvm.org/viewvc/llvm-project?rev=291198=rev
> Log:
> Make lldb -Werror clean for -Wstring-conversion
>
> Also found/fixed one bug identified by this warning in
> RenderScriptx86ABIFixups.cpp where a string literal was being used in an
> effort to provide a name for an instruction/register, but was instead
> being passed as the bool 'isVolatile' parameter.
>
> Modified:
> lldb/trunk/include/lldb/Core/MappedHash.h
> lldb/trunk/source/Core/DataEncoder.cpp
> lldb/trunk/source/Core/ValueObjectMemory.cpp
> lldb/trunk/source/Expression/IRInterpreter.cpp
> lldb/trunk/source/Host/windows/EditLineWin.cpp
> lldb/trunk/source/Interpreter/OptionValueProperties.cpp
> lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/
> RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
> lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
> lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
> lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
> lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
> lldb/trunk/source/Plugins/Process/gdb-remote/
> GDBRemoteCommunicationClient.cpp
> lldb/trunk/source/Plugins/ScriptInterpreter/Python/
> ScriptInterpreterPython.cpp
> 

[Lldb-commits] [lldb] r291199 - Fix -Wunused-function warning by preprocessor conditionalizing the function the same way as the caller

2017-01-05 Thread David Blaikie via lldb-commits
Author: dblaikie
Date: Thu Jan  5 18:38:10 2017
New Revision: 291199

URL: http://llvm.org/viewvc/llvm-project?rev=291199=rev
Log:
Fix -Wunused-function warning by preprocessor conditionalizing the function the 
same way as the caller

Modified:
lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp

Modified: lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp?rev=291199=291198=291199=diff
==
--- lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/CrashReason.cpp Thu Jan  5 18:38:10 
2017
@@ -21,6 +21,7 @@ void AppendFaultAddr(std::string , l
   str += ss.str();
 }
 
+#if defined(si_lower) && defined(si_upper)
 void AppendBounds(std::string , lldb::addr_t lower_bound,
   lldb::addr_t upper_bound, lldb::addr_t addr) {
   llvm::raw_string_ostream stream(str);
@@ -37,6 +38,7 @@ void AppendBounds(std::string , lldb
   stream << ")";
   stream.flush();
 }
+#endif
 
 CrashReason GetCrashReasonForSIGSEGV(const siginfo_t ) {
   assert(info.si_signo == SIGSEGV);


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


[Lldb-commits] [lldb] r291198 - Make lldb -Werror clean for -Wstring-conversion

2017-01-05 Thread David Blaikie via lldb-commits
Author: dblaikie
Date: Thu Jan  5 18:38:06 2017
New Revision: 291198

URL: http://llvm.org/viewvc/llvm-project?rev=291198=rev
Log:
Make lldb -Werror clean for -Wstring-conversion

Also found/fixed one bug identified by this warning in
RenderScriptx86ABIFixups.cpp where a string literal was being used in an
effort to provide a name for an instruction/register, but was instead
being passed as the bool 'isVolatile' parameter.

Modified:
lldb/trunk/include/lldb/Core/MappedHash.h
lldb/trunk/source/Core/DataEncoder.cpp
lldb/trunk/source/Core/ValueObjectMemory.cpp
lldb/trunk/source/Expression/IRInterpreter.cpp
lldb/trunk/source/Host/windows/EditLineWin.cpp
lldb/trunk/source/Interpreter/OptionValueProperties.cpp

lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp

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

lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp

lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/Type.cpp
lldb/trunk/source/Target/ABI.cpp
lldb/trunk/source/Target/Platform.cpp
lldb/trunk/source/Target/StackFrameList.cpp
lldb/trunk/tools/debugserver/source/DNBDataRef.cpp
lldb/trunk/tools/driver/Platform.cpp
lldb/trunk/tools/lldb-perf/lib/Results.cpp

Modified: lldb/trunk/include/lldb/Core/MappedHash.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/MappedHash.h?rev=291198=291197=291198=diff
==
--- lldb/trunk/include/lldb/Core/MappedHash.h (original)
+++ lldb/trunk/include/lldb/Core/MappedHash.h Thu Jan  5 18:38:06 2017
@@ -52,8 +52,7 @@ public:
 default:
   break;
 }
-assert(!"Invalid hash function index");
-return 0;
+llvm_unreachable("Invalid hash function index");
   }
 
   static const uint32_t HASH_MAGIC = 0x48415348u;

Modified: lldb/trunk/source/Core/DataEncoder.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataEncoder.cpp?rev=291198=291197=291198=diff
==
--- lldb/trunk/source/Core/DataEncoder.cpp (original)
+++ lldb/trunk/source/Core/DataEncoder.cpp Thu Jan  5 18:38:06 2017
@@ -258,8 +258,7 @@ uint32_t DataEncoder::PutMaxU64(uint32_t
   case 8:
 return PutU64(offset, value);
   default:
-assert(!"GetMax64 unhandled case!");
-break;
+llvm_unreachable("GetMax64 unhandled case!");
   }
   return UINT32_MAX;
 }

Modified: lldb/trunk/source/Core/ValueObjectMemory.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectMemory.cpp?rev=291198=291197=291198=diff
==
--- lldb/trunk/source/Core/ValueObjectMemory.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectMemory.cpp Thu Jan  5 18:38:06 2017
@@ -165,8 +165,7 @@ bool ValueObjectMemory::UpdateValue() {
 
 switch (value_type) {
 default:
-  assert(!"Unhandled expression result value kind...");
-  break;
+  llvm_unreachable("Unhandled expression result value kind...");
 
 case Value::eValueTypeScalar:
   // The variable value is in the Scalar value inside the m_value.

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=291198=291197=291198=diff
==
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Thu Jan  5 18:38:06 2017
@@ -1602,25 +1602,23 @@ bool IRInterpreter::Interpret(llvm::Modu
   lldb::addr_t addr = tmp_op.ULongLong();
   size_t dataSize = 0;
 
-  if (execution_unit.GetAllocSize(addr, dataSize)) {
-// Create the required buffer
-rawArgs[i].size = dataSize;
-rawArgs[i].data_ap.reset(new uint8_t[dataSize + 1]);
+  bool Success = execution_unit.GetAllocSize(addr, dataSize);
+  (void)Success;
+  assert(Success &&
+ "unable to locate host data for transfer to device");
+  // Create the required buffer
+  

Re: [Lldb-commits] [PATCH] D19603: Fix entry point lookup for ObjectFilePECOFF.

2017-01-05 Thread Stephane Sezer via lldb-commits
I'm currently busy with other stuff but I'll get back to this soon. I
think we have a different version of this internally which seems to
work properly, so I'll make sure everything is clean and re-upload a
better version.

On Tue, Dec 20, 2016 at 11:34 AM, Greg Clayton via Phabricator
 wrote:
> clayborg added a comment.
>
> Any progress on this? Read the previous comments and see if what I said makes 
> sense.
>
>
> https://reviews.llvm.org/D19603
>
>
>



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


[Lldb-commits] [PATCH] D28305: [Host] Handle short reads and writes, take 3

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

I've done a bit of investigation, and there is still a lot of `FILE*` usage in 
random places. I believe most of them would be pretty easy to get rid of 
(https://reviews.llvm.org/D28356 is one of the more complicated cases).

However, the main problem I see is the SB API, which uses FILE* in a couple of 
places (SBDebugger, SBCommandReturnObject, and a couple others).  While we can 
make sure that we use a single api consistently for all the FILE* that are 
passed to us, we cannot guarantee anything if the user expects to be able to 
access the FILE* objects while we are using them.

With that in mind I still think we should go ahead with the standardization, as 
we are not very consistent to begin with. This way we can be at least 
internally consistent in our usage, and the API boundary problem can be 
resolved in SBv2.

Let me know what you think.


https://reviews.llvm.org/D28305



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


[Lldb-commits] [PATCH] D28356: Consolidate file handle usage in Editline.cpp

2017-01-05 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision.
labath added reviewers: clayborg, zturner.
labath added a subscriber: lldb-commits.

To implement wide character reading, editline was mixing FILE*-based access with
a Connection-based one (plus it did some selects on the raw FD), which is very
fragile. Here, I replace it with one which uses only a Connection-based reads.
The code is somewhat longer as I had to read characters one by one to detect the
end of the multibyte sequence.

I've verified that international characters still work in lldb command line on
OSX.


https://reviews.llvm.org/D28356

Files:
  include/lldb/Host/Editline.h
  source/Host/common/Editline.cpp


Index: source/Host/common/Editline.cpp
===
--- source/Host/common/Editline.cpp
+++ source/Host/common/Editline.cpp
@@ -526,17 +526,8 @@
 }
 
 if (read_count) {
-#if LLDB_EDITLINE_USE_WCHAR
-  // After the initial interruptible read, this is guaranteed not to block
-  ungetc(ch, m_input_file);
-  *c = fgetwc(m_input_file);
-  if (*c != WEOF)
-return 1;
-#else
-  *c = ch;
-  if (ch != (char)EOF)
+  if (CompleteCharacter(ch, *c))
 return 1;
-#endif
 } else {
   switch (status) {
   case lldb::eConnectionStatusSuccess: // Success
@@ -1367,3 +1358,39 @@
 MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingCursor);
   }
 }
+
+bool Editline::CompleteCharacter(char ch, EditLineCharType ) {
+#if !LLDB_EDITLINE_USE_WCHAR
+  if (ch == (char)EOF)
+return false;
+
+  out = ch;
+  return true;
+#else
+  std::codecvt_utf8 cvt;
+  llvm::SmallString<4> input;
+  for (;;) {
+const char *from_next;
+wchar_t *to_next;
+std::mbstate_t state = std::mbstate_t();
+input.push_back(ch);
+switch (cvt.in(state, input.begin(), input.end(), from_next, ,  + 
1,
+   to_next)) {
+case std::codecvt_base::ok:
+  return out != WEOF;
+
+case std::codecvt_base::error:
+case std::codecvt_base::noconv:
+  return false;
+
+case std::codecvt_base::partial:
+  lldb::ConnectionStatus status;
+  size_t read_count = m_input_connection.Read(
+  , 1, std::chrono::seconds(0), status, nullptr);
+  if (read_count == 0)
+return false;
+  break;
+}
+  }
+#endif
+}
Index: include/lldb/Host/Editline.h
===
--- include/lldb/Host/Editline.h
+++ include/lldb/Host/Editline.h
@@ -322,6 +322,8 @@
   /// single or multi-line editing.
   void ConfigureEditor(bool multiline);
 
+  bool CompleteCharacter(char ch, EditLineCharType );
+
 private:
 #if LLDB_EDITLINE_USE_WCHAR
   std::wstring_convert m_utf8conv;


Index: source/Host/common/Editline.cpp
===
--- source/Host/common/Editline.cpp
+++ source/Host/common/Editline.cpp
@@ -526,17 +526,8 @@
 }
 
 if (read_count) {
-#if LLDB_EDITLINE_USE_WCHAR
-  // After the initial interruptible read, this is guaranteed not to block
-  ungetc(ch, m_input_file);
-  *c = fgetwc(m_input_file);
-  if (*c != WEOF)
-return 1;
-#else
-  *c = ch;
-  if (ch != (char)EOF)
+  if (CompleteCharacter(ch, *c))
 return 1;
-#endif
 } else {
   switch (status) {
   case lldb::eConnectionStatusSuccess: // Success
@@ -1367,3 +1358,39 @@
 MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingCursor);
   }
 }
+
+bool Editline::CompleteCharacter(char ch, EditLineCharType ) {
+#if !LLDB_EDITLINE_USE_WCHAR
+  if (ch == (char)EOF)
+return false;
+
+  out = ch;
+  return true;
+#else
+  std::codecvt_utf8 cvt;
+  llvm::SmallString<4> input;
+  for (;;) {
+const char *from_next;
+wchar_t *to_next;
+std::mbstate_t state = std::mbstate_t();
+input.push_back(ch);
+switch (cvt.in(state, input.begin(), input.end(), from_next, ,  + 1,
+   to_next)) {
+case std::codecvt_base::ok:
+  return out != WEOF;
+
+case std::codecvt_base::error:
+case std::codecvt_base::noconv:
+  return false;
+
+case std::codecvt_base::partial:
+  lldb::ConnectionStatus status;
+  size_t read_count = m_input_connection.Read(
+  , 1, std::chrono::seconds(0), status, nullptr);
+  if (read_count == 0)
+return false;
+  break;
+}
+  }
+#endif
+}
Index: include/lldb/Host/Editline.h
===
--- include/lldb/Host/Editline.h
+++ include/lldb/Host/Editline.h
@@ -322,6 +322,8 @@
   /// single or multi-line editing.
   void ConfigureEditor(bool multiline);
 
+  bool CompleteCharacter(char ch, EditLineCharType );
+
 private:
 #if LLDB_EDITLINE_USE_WCHAR
   std::wstring_convert m_utf8conv;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org

[Lldb-commits] [lldb] r291118 - Skip a test on darwin.

2017-01-05 Thread Hafiz Abid Qadeer via lldb-commits
Author: abidh
Date: Thu Jan  5 09:09:07 2017
New Revision: 291118

URL: http://llvm.org/viewvc/llvm-project?rev=291118=rev
Log:
Skip a test on darwin.

My earlier commit today seem to cause a failure on a darwin buildbot.
I am skipping the test while I investigate the failure.


Modified:

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

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py?rev=291118=291117=291118=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py 
Thu Jan  5 09:09:07 2017
@@ -17,6 +17,7 @@ class MiEnvironmentCdTestCase(lldbmi_tes
 
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+@skipIfDarwin   # Disabled while I investigate the failure on buildbot.
 def test_lldbmi_environment_cd(self):
 """Test that 'lldb-mi --interpreter' changes working directory for 
inferior."""
 


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


[Lldb-commits] [PATCH] D24711: [lldb-mi] Fix implementation for a few mi commands

2017-01-05 Thread Hafiz Abid Qadeer via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL291104: [lldb-mi] Fix implementation for a few mi commands 
(authored by abidh).

Changed prior to commit:
  https://reviews.llvm.org/D24711?vs=82654=83225#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24711

Files:
  lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
  lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py
  lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py
  lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
  lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py
  lldb/trunk/tools/lldb-mi/MICmdCmdEnviro.cpp
  lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
  lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h
  lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.cpp
  lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.h
  lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp
  lldb/trunk/tools/lldb-mi/MICmdCmdTarget.cpp
  lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
  lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.h

Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
===
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
@@ -9,11 +9,25 @@
 
 #include 
 
+#ifdef _WIN32
+#include 
+#define getcwd _getcwd // suppress "deprecation" warning
+#else
+#include 
+#endif
+
 int
 main(int argc, char const *argv[])
 {
-int a  = 10;
+int a = 10;
+
+char buf[512];
+char *ans = getcwd(buf, sizeof(buf));
+if (ans) {
+printf("cwd: %s\n", ans);
+}
 
 printf("argc=%d\n", argc); // BP_printf
+
 return 0;
 }
Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
@@ -0,0 +1,36 @@
+"""
+Test lldb-mi -environment-cd command.
+"""
+
+from __future__ import print_function
+
+
+import lldbmi_testcase
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class MiEnvironmentCdTestCase(lldbmi_testcase.MiTestCaseBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+@skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
+@skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
+def test_lldbmi_environment_cd(self):
+"""Test that 'lldb-mi --interpreter' changes working directory for inferior."""
+
+self.spawnLldbMi(args=None)
+
+# Load executable
+self.runCmd("-file-exec-and-symbols %s" % self.myexe)
+self.expect("\^done")
+
+# cd to a different directory
+self.runCmd("-environment-cd /tmp")
+self.expect("\^done")
+
+# Run to the end
+self.runCmd("-exec-run")
+self.expect("\^running")
+self.expect("@\"cwd: /tmp\\r\\n\"", exactly=True)
Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py
@@ -208,3 +208,44 @@
 self.expect("\^done")
 self.runCmd("-var-evaluate-expression var_a")
 self.expect("\^done,value=\"10\"")
+
+@skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
+@skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
+@expectedFailureAll(
+bugnumber="llvm.org/pr31485: data-disassemble doesn't follow flavor settings")
+def test_lldbmi_gdb_set_disassembly_flavor(self):
+"""Test that 'lldb-mi --interpreter' works for -gdb-set disassembly-flavor."""
+
+self.spawnLldbMi(args=None)
+
+# Load executable
+self.runCmd("-file-exec-and-symbols %s" % self.myexe)
+self.expect("\^done")
+
+# Run to BP_printf
+line = line_number('main.cpp', '// BP_printf')
+self.runCmd("-break-insert main.cpp:%d" % line)
+self.expect("\^done,bkpt={number=\"1\"")
+self.runCmd("-exec-run")
+self.expect("\^running")
+self.expect("\*stopped,reason=\"breakpoint-hit\".+addr=\"(0x[0-9a-f]+)\"")
+
+# Get starting and ending address from $pc
+pc = int(self.child.match.group(1), base=16)
+s_addr, e_addr = pc, pc + 1
+
+# Test default output (att)
+self.runCmd("-data-disassemble -s %d -e %d -- 0" % (s_addr, e_addr))
+self.expect("movl ")
+
+# Test intel style
+

[Lldb-commits] [lldb] r291104 - [lldb-mi] Fix implementation for a few mi commands

2017-01-05 Thread Hafiz Abid Qadeer via lldb-commits
Author: abidh
Date: Thu Jan  5 07:23:47 2017
New Revision: 291104

URL: http://llvm.org/viewvc/llvm-project?rev=291104=rev
Log:
[lldb-mi] Fix implementation for a few mi commands

Summary:
Some of the mi commands implemented in lldb-mi are incomplete/not confirming to 
the spec.
- `gdb-show` and `gdb-set` doesn't support getting/setting `disassembly-flavor`
- `environment-cd` should also change the working directory for inferior
- debugger CLI output should be printed as console-stream-output record, rather 
than being dumped directly
to stdout
- `target-select` should provide inner error message in mi response

Related bug report:
- https://llvm.org/bugs/show_bug.cgi?id=28026
- https://llvm.org/bugs/show_bug.cgi?id=28718
- https://llvm.org/bugs/show_bug.cgi?id=30265

Reviewers: ki.stfu, abidh

Subscribers: abidh, ki.stfu, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D24711

Added:

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
Modified:
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py
lldb/trunk/tools/lldb-mi/MICmdCmdEnviro.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h
lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.h
lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdTarget.cpp
lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.h

Added: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py?rev=291104=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py 
(added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py 
Thu Jan  5 07:23:47 2017
@@ -0,0 +1,36 @@
+"""
+Test lldb-mi -environment-cd command.
+"""
+
+from __future__ import print_function
+
+
+import lldbmi_testcase
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class MiEnvironmentCdTestCase(lldbmi_testcase.MiTestCaseBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+@skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
+@skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+def test_lldbmi_environment_cd(self):
+"""Test that 'lldb-mi --interpreter' changes working directory for 
inferior."""
+
+self.spawnLldbMi(args=None)
+
+# Load executable
+self.runCmd("-file-exec-and-symbols %s" % self.myexe)
+self.expect("\^done")
+
+# cd to a different directory
+self.runCmd("-environment-cd /tmp")
+self.expect("\^done")
+
+# Run to the end
+self.runCmd("-exec-run")
+self.expect("\^running")
+self.expect("@\"cwd: /tmp\\r\\n\"", exactly=True)

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py?rev=291104=291103=291104=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py 
Thu Jan  5 07:23:47 2017
@@ -208,3 +208,44 @@ class MiGdbSetShowTestCase(lldbmi_testca
 self.expect("\^done")
 self.runCmd("-var-evaluate-expression var_a")
 self.expect("\^done,value=\"10\"")
+
+@skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
+@skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+@expectedFailureAll(
+bugnumber="llvm.org/pr31485: data-disassemble doesn't follow flavor 
settings")
+def test_lldbmi_gdb_set_disassembly_flavor(self):
+"""Test that 'lldb-mi --interpreter' works for -gdb-set 
disassembly-flavor."""
+
+self.spawnLldbMi(args=None)
+
+# Load executable
+self.runCmd("-file-exec-and-symbols %s" % self.myexe)
+self.expect("\^done")
+
+# Run to BP_printf
+line = line_number('main.cpp', '// BP_printf')
+self.runCmd("-break-insert main.cpp:%d" % line)
+self.expect("\^done,bkpt={number=\"1\"")
+self.runCmd("-exec-run")
+self.expect("\^running")
+

[Lldb-commits] [lldb] r291103 - Fix jModulesInfo handling for cross-path syntax debugging

2017-01-05 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Jan  5 07:18:46 2017
New Revision: 291103

URL: http://llvm.org/viewvc/llvm-project?rev=291103=rev
Log:
Fix jModulesInfo handling for cross-path syntax debugging

We were sending paths with the host path separator, which meant the remote
target did not understand our packets correctly.

Modified:

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

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=291103=291102=291103=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
Thu Jan  5 07:18:46 2017
@@ -3246,7 +3246,7 @@ GDBRemoteCommunicationClient::GetModules
 JSONObject::SP module_sp = std::make_shared();
 module_array_sp->AppendObject(module_sp);
 module_sp->SetObject(
-"file", std::make_shared(module_file_spec.GetPath()));
+"file", std::make_shared(module_file_spec.GetPath(false)));
 module_sp->SetObject("triple",
  std::make_shared(triple.getTriple()));
   }

Modified: 
lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp?rev=291103=291102=291103=diff
==
--- 
lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp 
(original)
+++ 
lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp 
Thu Jan  5 07:18:46 2017
@@ -199,14 +199,22 @@ TEST_F(GDBRemoteCommunicationClientTest,
 
   FileSpec file_specs[] = {
   FileSpec("/foo/bar.so", false, FileSpec::ePathSyntaxPosix),
-  FileSpec("/foo/baz.so", false, FileSpec::ePathSyntaxPosix)};
+  FileSpec("/foo/baz.so", false, FileSpec::ePathSyntaxPosix),
+
+  // This is a bit dodgy but we currently depend on GetModulesInfo not
+  // performing denormalization. It can go away once the users
+  // (DynamicLoaderPOSIXDYLD, at least) correctly set the path syntax for
+  // the FileSpecs they create.
+  FileSpec("/foo/baw.so", false, FileSpec::ePathSyntaxWindows),
+  };
   std::future> async_result =
   std::async(std::launch::async,
  [&] { return client.GetModulesInfo(file_specs, triple); });
   HandlePacket(
   server, "jModulesInfo:["
   R"({"file":"/foo/bar.so","triple":"i386-pc-linux"},)"
-  R"({"file":"/foo/baz.so","triple":"i386-pc-linux"}])",
+  R"({"file":"/foo/baz.so","triple":"i386-pc-linux"},)"
+  R"({"file":"/foo/baw.so","triple":"i386-pc-linux"}])",
   
R"([{"uuid":"404142434445464748494a4b4c4d4e4f","triple":"i386-pc-linux",)"
   R"("file_path":"/foo/bar.so","file_offset":0,"file_size":1234}]])");
 


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


[Lldb-commits] [lldb] r291102 - Silence some -Wstring-conversion warnings

2017-01-05 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Jan  5 07:18:42 2017
New Revision: 291102

URL: http://llvm.org/viewvc/llvm-project?rev=291102=rev
Log:
Silence some -Wstring-conversion warnings

lldbassert(!"foo") -> lldbassert(0 && "foo")

In one case, this actually detected a logic error in the assertion (missing !).

Modified:
lldb/trunk/source/Expression/IRMemoryMap.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Expression/IRMemoryMap.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRMemoryMap.cpp?rev=291102=291101=291102=diff
==
--- lldb/trunk/source/Expression/IRMemoryMap.cpp (original)
+++ lldb/trunk/source/Expression/IRMemoryMap.cpp Thu Jan  5 07:18:42 2017
@@ -126,7 +126,7 @@ lldb::addr_t IRMemoryMap::FindSpace(size
 err = process_sp->GetMemoryRegionInfo(
 region_info.GetRange().GetRangeEnd(), region_info);
 if (err.Fail()) {
-  lldbassert(!"GetMemoryRegionInfo() succeeded, then failed");
+  lldbassert(0 && "GetMemoryRegionInfo() succeeded, then failed");
   ret = LLDB_INVALID_ADDRESS;
   break;
 }

Modified: 
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp?rev=291102=291101=291102=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp 
(original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp 
Thu Jan  5 07:18:42 2017
@@ -498,7 +498,7 @@ void ClangModulesDeclVendorImpl::ForEach
   ti->getLocation(), );
 
   if (invalid) {
-lldbassert(!"Unhandled token kind");
+lldbassert(0 && "Unhandled token kind");
 macro_expansion.append("");
   } else {
 macro_expansion.append(

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=291102=291101=291102=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Jan  5 07:18:42 2017
@@ -2119,7 +2119,7 @@ CompilerType ClangASTContext::CreateStru
   if (!type_name.IsEmpty() &&
   (type = GetTypeForIdentifier(type_name))
   .IsValid()) {
-lldbassert("Trying to create a type for an existing name");
+lldbassert(0 && "Trying to create a type for an existing name");
 return type;
   }
 


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


[Lldb-commits] [lldb] r291100 - XFAIL an lldb-mi test

2017-01-05 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Jan  5 06:03:49 2017
New Revision: 291100

URL: http://llvm.org/viewvc/llvm-project?rev=291100=rev
Log:
XFAIL an lldb-mi test

the test fails due to a bug in ToT clang

Modified:
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py?rev=291100=291099=291100=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py 
Thu Jan  5 06:03:49 2017
@@ -243,6 +243,8 @@ class MiStackTestCase(lldbmi_testcase.Mi
 
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+@expectedFailureAll(bugnumber="llvm.org/pr31545", compiler="clang",
+compiler_version=['>=', '4.0'], archs="i386")
 def test_lldbmi_stack_list_variables(self):
 """Test that 'lldb-mi --interpreter' can shows local variables and 
arguments."""
 


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