[Lldb-commits] [lldb] r269598 - Fix a few -Wformat-pedantic warnings
Author: compnerd Date: Sun May 15 13:18:13 2016 New Revision: 269598 URL: http://llvm.org/viewvc/llvm-project?rev=269598&view=rev Log: Fix a few -Wformat-pedantic warnings Clean up some newly introduced -Wformat-pedantic warnings (%p expects a void *). Modified: lldb/trunk/source/Core/Listener.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Modified: lldb/trunk/source/Core/Listener.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Listener.cpp?rev=269598&r1=269597&r2=269598&view=diff == --- lldb/trunk/source/Core/Listener.cpp (original) +++ lldb/trunk/source/Core/Listener.cpp Sun May 15 13:18:13 2016 @@ -60,7 +60,7 @@ Listener::~Listener() Clear(); if (log) -log->Printf("%p Listener::%s('%s')", this, __FUNCTION__, m_name.c_str()); +log->Printf("%p Listener::%s('%s')", static_cast(this), __FUNCTION__, m_name.c_str()); } void @@ -89,7 +89,7 @@ Listener::Clear() } if (log) -log->Printf("%p Listener::%s('%s')", this, __FUNCTION__, m_name.c_str()); +log->Printf("%p Listener::%s('%s')", static_cast(this), __FUNCTION__, m_name.c_str()); } uint32_t Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=269598&r1=269597&r2=269598&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Sun May 15 13:18:13 2016 @@ -3678,7 +3678,7 @@ ProcessGDBRemote::MonitorDebugserverProc std::shared_ptr process_sp = process_wp.lock(); if (log) -log->Printf("ProcessGDBRemote::%s(process = %p)", __FUNCTION__, process_sp.get()); +log->Printf("ProcessGDBRemote::%s(process = %p)", __FUNCTION__, static_cast(process_sp.get())); if (!process_sp || process_sp->m_debugserver_pid != debugserver_pid) return handled; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r269599 - Symbol: fix -Wcovered-switch warning
Author: compnerd Date: Sun May 15 13:18:16 2016 New Revision: 269599 URL: http://llvm.org/viewvc/llvm-project?rev=269599&view=rev Log: Symbol: fix -Wcovered-switch warning Add the Float128 type to the enumeration. Float128 is covered under IEEE754 as a quad precision floating point value. Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=269599&r1=269598&r2=269599&view=diff == --- lldb/trunk/source/Symbol/ClangASTContext.cpp (original) +++ lldb/trunk/source/Symbol/ClangASTContext.cpp Sun May 15 13:18:16 2016 @@ -4803,121 +4803,127 @@ ClangASTContext::GetEncoding (lldb::opaq { if (!type) return lldb::eEncodingInvalid; - + count = 1; clang::QualType qual_type(GetCanonicalQualType(type)); - + switch (qual_type->getTypeClass()) { case clang::Type::UnaryTransform: break; - + case clang::Type::FunctionNoProto: case clang::Type::FunctionProto: break; - + case clang::Type::IncompleteArray: case clang::Type::VariableArray: break; - + case clang::Type::ConstantArray: break; - + case clang::Type::ExtVector: case clang::Type::Vector: // TODO: Set this to more than one??? break; - + case clang::Type::Builtin: switch (llvm::cast(qual_type)->getKind()) -{ -case clang::BuiltinType::Void: -break; - -case clang::BuiltinType::Bool: -case clang::BuiltinType::Char_S: -case clang::BuiltinType::SChar: -case clang::BuiltinType::WChar_S: -case clang::BuiltinType::Char16: -case clang::BuiltinType::Char32: -case clang::BuiltinType::Short: -case clang::BuiltinType::Int: -case clang::BuiltinType::Long: -case clang::BuiltinType::LongLong: -case clang::BuiltinType::Int128:return lldb::eEncodingSint; - -case clang::BuiltinType::Char_U: -case clang::BuiltinType::UChar: -case clang::BuiltinType::WChar_U: -case clang::BuiltinType::UShort: -case clang::BuiltinType::UInt: -case clang::BuiltinType::ULong: -case clang::BuiltinType::ULongLong: -case clang::BuiltinType::UInt128: return lldb::eEncodingUint; - -case clang::BuiltinType::Half: -case clang::BuiltinType::Float: -case clang::BuiltinType::Double: -case clang::BuiltinType::LongDouble:return lldb::eEncodingIEEE754; - -case clang::BuiltinType::ObjCClass: -case clang::BuiltinType::ObjCId: -case clang::BuiltinType::ObjCSel: return lldb::eEncodingUint; - -case clang::BuiltinType::NullPtr: return lldb::eEncodingUint; - -case clang::BuiltinType::Kind::ARCUnbridgedCast: -case clang::BuiltinType::Kind::BoundMember: -case clang::BuiltinType::Kind::BuiltinFn: -case clang::BuiltinType::Kind::Dependent: -case clang::BuiltinType::Kind::OCLClkEvent: -case clang::BuiltinType::Kind::OCLEvent: -case clang::BuiltinType::Kind::OCLImage1dRO: -case clang::BuiltinType::Kind::OCLImage1dWO: -case clang::BuiltinType::Kind::OCLImage1dRW: -case clang::BuiltinType::Kind::OCLImage1dArrayRO: -case clang::BuiltinType::Kind::OCLImage1dArrayWO: -case clang::BuiltinType::Kind::OCLImage1dArrayRW: -case clang::BuiltinType::Kind::OCLImage1dBufferRO: -case clang::BuiltinType::Kind::OCLImage1dBufferWO: -case clang::BuiltinType::Kind::OCLImage1dBufferRW: -case clang::BuiltinType::Kind::OCLImage2dRO: -case clang::BuiltinType::Kind::OCLImage2dWO: -case clang::BuiltinType::Kind::OCLImage2dRW: -case clang::BuiltinType::Kind::OCLImage2dArrayRO: -case clang::BuiltinType::Kind::OCLImage2dArrayWO: -case clang::BuiltinType::Kind::OCLImage2dArrayRW: -case clang::BuiltinType::Kind::OCLImage2dArrayDepthRO: -case clang::BuiltinType::Kind::OCLImage2dArrayDepthWO: -case clang::BuiltinType::Kind::OCLImage2dArrayDepthRW: -case clang::BuiltinType::Kind::OCLImage2dArrayMSAARO: -case clang::BuiltinType::Kind::OCLImage2dArrayMSAAWO: -case clang::BuiltinType::Kind::OCLImage2dArrayMSAARW: -case clang::BuiltinType::Kind::OCLImage2dArrayMSAADept
Re: [Lldb-commits] [PATCH] D20278: first pass for removing Mutex for std::{, recursive_}mutex
Personally I'm strongly in favor of standardizing on builtin language constructs. We already use std mutex in some places, and llvm does too, so i see no issue with compiler support. I can't review the patch at the moment, but please do make sure it's clang formatted On Sun, May 15, 2016 at 6:10 PM Saleem Abdulrasool wrote: > compnerd created this revision. > compnerd added reviewers: clayborg, zturner. > compnerd added a subscriber: lldb-commits. > Herald added a subscriber: emaste. > > This is a pretty straightforward first pass over removing a number of uses > of Mutex in favor of std::mutex or std::recursive_mutex. The problem is > that there are interfaces which take `Mutex::Locker &` to lock internal > locks. This patch cleans up most of the easy cases. The only non-trivial > change is in `CommandObjectTarget.cpp` where a `Mutex::Locker` was split > into two. > > Although the patch is trivial, the question that I have is whether we > should go ahead with this change and if doing it in multiple passes is > reasonable. > > http://reviews.llvm.org/D20278 > > Files: > include/lldb/Breakpoint/BreakpointLocationList.h > include/lldb/Breakpoint/BreakpointSite.h > include/lldb/Breakpoint/BreakpointSiteList.h > include/lldb/Core/Broadcaster.h > include/lldb/Core/Communication.h > include/lldb/Core/History.h > include/lldb/Core/IOHandler.h > include/lldb/Core/Listener.h > include/lldb/Core/Module.h > include/lldb/Core/ModuleSpec.h > include/lldb/Core/StreamTee.h > include/lldb/Core/ThreadSafeSTLMap.h > include/lldb/Core/ThreadSafeValue.h > include/lldb/Core/ValueObject.h > include/lldb/DataFormatters/FormatCache.h > include/lldb/DataFormatters/FormatManager.h > include/lldb/DataFormatters/FormattersContainer.h > include/lldb/DataFormatters/TypeCategory.h > include/lldb/DataFormatters/TypeCategoryMap.h > include/lldb/Host/Editline.h > include/lldb/Host/common/NativeBreakpointList.h > include/lldb/Host/common/NativeProcessProtocol.h > include/lldb/Host/posix/ConnectionFileDescriptorPosix.h > include/lldb/Initialization/SystemLifetimeManager.h > include/lldb/Interpreter/CommandHistory.h > include/lldb/Symbol/FuncUnwinders.h > include/lldb/Target/JITLoaderList.h > include/lldb/Target/Platform.h > include/lldb/Target/SectionLoadHistory.h > include/lldb/Target/SectionLoadList.h > include/lldb/Target/TargetList.h > include/lldb/Target/Thread.h > include/lldb/Target/ThreadPlan.h > include/lldb/Target/Unwind.h > include/lldb/Utility/SharedCluster.h > source/API/SBDebugger.cpp > source/Breakpoint/BreakpointLocationList.cpp > source/Breakpoint/BreakpointSite.cpp > source/Breakpoint/BreakpointSiteList.cpp > source/Commands/CommandObjectTarget.cpp > source/Core/Broadcaster.cpp > source/Core/Communication.cpp > source/Core/Debugger.cpp > source/Core/IOHandler.cpp > source/Core/Listener.cpp > source/Core/Log.cpp > source/Core/Module.cpp > source/Core/PluginManager.cpp > source/Core/Timer.cpp > source/DataFormatters/FormatCache.cpp > source/DataFormatters/FormatManager.cpp > source/DataFormatters/TypeCategory.cpp > source/DataFormatters/TypeCategoryMap.cpp > source/Expression/IRExecutionUnit.cpp > source/Host/common/Editline.cpp > source/Host/common/NativeBreakpointList.cpp > source/Host/common/NativeProcessProtocol.cpp > source/Host/posix/ConnectionFileDescriptorPosix.cpp > source/Initialization/SystemLifetimeManager.cpp > source/Interpreter/CommandHistory.cpp > source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp > source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h > source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp > source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h > > source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp > > source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h > > source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp > source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h > source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp > source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h > source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp > source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp > source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp > source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp > source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp > source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp > source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp > source/Plugins/Platform/MacOSX/PlatformDarwin.cpp > source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp > source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp > source/Plugins/Process/FreeBSD/ProcessFreeBSD.h > source/Plugins/Process/MacOSX-Kernel/CommunicationKD
Re: [Lldb-commits] [PATCH] D20278: first pass for removing Mutex for std::{, recursive_}mutex
compnerd added a comment. I don't think I can write code without clang-format anymore (so, yes, it is clang-formatted). http://reviews.llvm.org/D20278 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r269627 - test: add missing splat
Author: compnerd Date: Sun May 15 22:13:08 2016 New Revision: 269627 URL: http://llvm.org/viewvc/llvm-project?rev=269627&view=rev Log: test: add missing splat The parameter here is a list, not a string. Ensure that the we splat the list into arguments prior to invoke os.path.join. This would previously fail with a `startswith` is not a member of `list`. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=269627&r1=269626&r2=269627&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Sun May 15 22:13:08 2016 @@ -640,7 +640,7 @@ def setupSysPath(): python_resource_dir = ['LLDB.framework', 'Resources', 'Python'] outputPaths = getXcodeOutputPaths(lldbRootDirectory) for outputPath in outputPaths: -candidatePath = os.path.join(outputPath, python_resource_dir) +candidatePath = os.path.join(outputPath, *python_resource_dir) if os.path.isfile(os.path.join(candidatePath, init_in_python_dir)): lldbPythonDir = candidatePath break ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r269628 - test: remove use of undefined variables
Author: compnerd Date: Sun May 15 22:13:12 2016 New Revision: 269628 URL: http://llvm.org/viewvc/llvm-project?rev=269628&view=rev Log: test: remove use of undefined variables The variables referenced in the print message are not defined. Simply state that the requisite script is not found. Correct grammar to indicate that the tests are rather likely to fail rather than unlikely to fail. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=269628&r1=269627&r2=269628&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Sun May 15 22:13:12 2016 @@ -646,8 +646,7 @@ def setupSysPath(): break if not lldbPythonDir: -print('This script requires lldb.py to be in either ' + dbgPath + ',', end=' ') -print(relPath + ', or ' + baiPath + '. Some tests might fail.') +print("lldb.py is not found, some tests may fail.") else: print("Unable to load lldb extension module. Possible reasons for this include:") print(" 1) LLDB was built with LLDB_DISABLE_PYTHON=1") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r269626 - test: add missing parameter
Author: compnerd Date: Sun May 15 22:13:05 2016 New Revision: 269626 URL: http://llvm.org/viewvc/llvm-project?rev=269626&view=rev Log: test: add missing parameter Add the missing required parameter to the function. This permits tests to get a bit further before failing. Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=269626&r1=269625&r2=269626&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Sun May 15 22:13:05 2016 @@ -638,7 +638,7 @@ def setupSysPath(): if not lldbPythonDir: if platform.system() == "Darwin": python_resource_dir = ['LLDB.framework', 'Resources', 'Python'] -outputPaths = getXcodeOutputPaths() +outputPaths = getXcodeOutputPaths(lldbRootDirectory) for outputPath in outputPaths: candidatePath = os.path.join(outputPath, python_resource_dir) if os.path.isfile(os.path.join(candidatePath, init_in_python_dir)): ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20278: first pass for removing Mutex for std::{, recursive_}mutex
Figured as much, just making sure. What platforms did you run the test suite on to confirm no breakages? On Sun, May 15, 2016 at 8:11 PM Saleem Abdulrasool wrote: > compnerd added a comment. > > I don't think I can write code without clang-format anymore (so, yes, it > is clang-formatted). > > > http://reviews.llvm.org/D20278 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits