[Lldb-commits] [lldb] r343598 - Delete /lldb/tmp directory created in r324484.
Author: jyknight Date: Tue Oct 2 08:41:00 2018 New Revision: 343598 URL: http://llvm.org/viewvc/llvm-project?rev=343598&view=rev Log: Delete /lldb/tmp directory created in r324484. Was checked into a wrong place in the depot, and untouched since. Likely created by accident. Removed: lldb/tmp/ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r333032 - Avoid using header from Host/macosx when not testing an apple build.
Author: jyknight Date: Tue May 22 14:49:41 2018 New Revision: 333032 URL: http://llvm.org/viewvc/llvm-project?rev=333032&view=rev Log: Avoid using header from Host/macosx when not testing an apple build. Modified: lldb/trunk/unittests/Host/HostInfoTest.cpp Modified: lldb/trunk/unittests/Host/HostInfoTest.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/HostInfoTest.cpp?rev=333032&r1=333031&r2=333032&view=diff == --- lldb/trunk/unittests/Host/HostInfoTest.cpp (original) +++ lldb/trunk/unittests/Host/HostInfoTest.cpp Tue May 22 14:49:41 2018 @@ -8,11 +8,14 @@ //===--===// #include "lldb/Host/HostInfo.h" -#include "lldb/Host/macosx/HostInfoMacOSX.h" #include "lldb/lldb-defines.h" #include "TestingSupport/TestUtilities.h" #include "gtest/gtest.h" +#ifdef __APPLE__ +#include "lldb/Host/macosx/HostInfoMacOSX.h" +#endif + using namespace lldb_private; using namespace llvm; @@ -47,6 +50,8 @@ TEST_F(HostInfoTest, GetAugmentedArchSpe } +#ifdef __APPLE__ + struct HostInfoMacOSXTest : public HostInfoMacOSX { static std::string ComputeClangDir(std::string lldb_shlib_path, bool verify = false) { @@ -58,7 +63,6 @@ struct HostInfoMacOSXTest : public HostI }; -#ifdef __APPLE__ TEST_F(HostInfoTest, MacOSX) { // This returns whatever the POSIX fallback returns. std::string posix = "/usr/lib/liblldb.dylib"; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r333035 - Normalize some lldb #include statements.
Author: jyknight Date: Tue May 22 15:53:50 2018 New Revision: 333035 URL: http://llvm.org/viewvc/llvm-project?rev=333035&view=rev Log: Normalize some lldb #include statements. Most non-local includes of header files living under lldb/sources/ were specified with the full path starting after sources/. However, in a few instances, other sub-directories were added to include paths, or Normalize those few instances to follow the style used by the rest of the codebase, to make it easier to understand. Modified: lldb/trunk/source/API/SBTarget.cpp lldb/trunk/source/Interpreter/CommandInterpreter.cpp lldb/trunk/source/Plugins/JITLoader/GDB/CMakeLists.txt lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h lldb/trunk/source/Plugins/Process/FreeBSD/CMakeLists.txt lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIX.h lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp lldb/trunk/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h lldb/trunk/source/Plugins/Process/NetBSD/CMakeLists.txt lldb/trunk/source/Plugins/Process/POSIX/CMakeLists.txt lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt lldb/trunk/source/Plugins/Process/Windows/Common/CMakeLists.txt lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp lldb/trunk/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp lldb/trunk/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp lldb/trunk/source/Plugins/Process/elf-core/CMakeLists.txt lldb/trunk/source/Plugins/Process/mach-core/CMakeLists.txt lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp lldb/trunk/source/Plugins/Process/minidump/CMakeLists.txt lldb/trunk/source/Target/CMakeLists.txt Modified: lldb/trunk/source/API/SBTarget.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=333035&r1=333034&r2=333035&view=diff == --- lldb/trunk/source/API/SBTarget.cpp (original) +++ lldb/trunk/source/API/SBTarget.cpp Tue May 22 15:53:50 2018 @@ -64,7 +64,7 @@ #include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" -#include "../source/Commands/CommandObjectBreakpoint.h" +#include "Commands/CommandObjectBreakpoint.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Regex.h" Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=333035&r1=333034&r2=333035&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Tue May 22 15:53:50 2018 @@ -14,31 +14,31 @@ #include "CommandObjectScript.h" #include "lldb/Interpreter/CommandObjectRegexCommand.h" -#include "../Commands/CommandObjectApropos.h" -#include "../Commands/CommandObjectBreakpoint.h" -#include "../Commands/CommandObjectBugreport.h" -#include "../Commands/CommandObjectCommands.h" -#include "../Commands/CommandObjectDisassemble.h" -#include "../Commands/CommandObjectExpression.h" -#include "../Commands/CommandObjectFrame.h" -#include "../Commands/CommandObjectGUI.h" -#include "../Commands/CommandObjectHelp.h" -#include "../Commands/CommandObjectLanguage.h" -#include "../Commands/CommandObjectLog.h" -#include "../Commands/CommandObjectMemory.h" -#include "../Commands/CommandObjectPlatform.h" -#include "../Commands/CommandObjectPlugin.h" -#include "../Commands/CommandObjectProcess.h" -#include "../Commands/CommandObjectQuit.h" -#include "../Commands/CommandObjectRegister.h" -#include "../Commands/CommandObjectSettings.h" -#include "../Commands/CommandObjectSource.h" -#include "../Commands/CommandObjectStats.h" -#include "../Commands/CommandObjectTarget.h" -#include "../Commands/CommandObjectThread.h" -#include "../Commands/CommandObjectType.h" -#include "../Commands/CommandObjectVersion.h" -#include "../Commands/CommandObjectWatchpoint.h" +#include "Commands/CommandObjectApropos.h" +#include "Commands/CommandObjectBreakpoint.h" +#include "Commands/CommandObjectBugreport.h" +#include "Commands/CommandObjectCommands.h" +#include "Commands/CommandObjectDisassemble.h" +#include "Commands/CommandObjectExpression.h" +#include "Commands/CommandObjectFrame.h" +#include "Commands/CommandObjectGUI.h" +#include "Commands/CommandObjectHelp.h" +#include "Commands/CommandObjectLanguage.h" +#include "Commands/CommandObjectLog.h" +#include "Commands/CommandObjectMemory.h" +#include "Commands/CommandObjectPlatform.h" +#include "Commands/Comman
[Lldb-commits] [lldb] r333134 - Remove spurious dependency on Process/elf-core from Process/Utility.
Author: jyknight Date: Wed May 23 15:04:20 2018 New Revision: 333134 URL: http://llvm.org/viewvc/llvm-project?rev=333134&view=rev Log: Remove spurious dependency on Process/elf-core from Process/Utility. These checks do absolutely nothing other than cause a library layering violation in the code. Modified: lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp lldb/trunk/unittests/Symbol/CMakeLists.txt Modified: lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt?rev=333134&r1=333133&r2=333134&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt Wed May 23 15:04:20 2018 @@ -58,7 +58,6 @@ add_lldb_library(lldbPluginProcessUtilit lldbSymbol lldbTarget lldbUtility -lldbPluginProcessElfCore LINK_COMPONENTS Support ) Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp?rev=333134&r1=333133&r2=333134&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp Wed May 23 15:04:20 2018 @@ -13,6 +13,7 @@ #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Scalar.h" +#include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/DataBufferHeap.h" @@ -20,7 +21,6 @@ #include "lldb/Utility/Endian.h" #include "llvm/Support/Compiler.h" -#include "Plugins/Process/elf-core/ProcessElfCore.h" #include "RegisterContextPOSIX_arm.h" using namespace lldb; @@ -107,11 +107,6 @@ RegisterContextPOSIX_arm::RegisterContex } ::memset(&m_fpr, 0, sizeof m_fpr); - - // elf-core yet to support ReadFPR() - lldb::ProcessSP base = CalculateProcess(); - if (base.get()->GetPluginName() == ProcessElfCore::GetPluginNameStatic()) -return; } RegisterContextPOSIX_arm::~RegisterContextPOSIX_arm() {} Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp?rev=333134&r1=333133&r2=333134&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp Wed May 23 15:04:20 2018 @@ -13,6 +13,7 @@ #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Scalar.h" +#include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/DataBufferHeap.h" @@ -20,7 +21,6 @@ #include "lldb/Utility/Endian.h" #include "llvm/Support/Compiler.h" -#include "Plugins/Process/elf-core/ProcessElfCore.h" #include "RegisterContextPOSIX_arm64.h" using namespace lldb; @@ -126,11 +126,6 @@ RegisterContextPOSIX_arm64::RegisterCont } ::memset(&m_fpr, 0, sizeof m_fpr); - - // elf-core yet to support ReadFPR() - lldb::ProcessSP base = CalculateProcess(); - if (base.get()->GetPluginName() == ProcessElfCore::GetPluginNameStatic()) -return; } RegisterContextPOSIX_arm64::~RegisterContextPOSIX_arm64() {} Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp?rev=333134&r1=333133&r2=333134&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp (original) +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp Wed May 23 15:04:20 2018 @@ -13,6 +13,7 @@ #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Scalar.h" +#include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/DataBufferHeap.h" @@ -20,11 +21,10 @@ #include "lldb/Utility/Endian.h" #include "llvm/Support/Compiler.h" -#include "Plugins/Process/elf-core/ProcessElfCore.h" #include "RegisterContextPOSIX_mips64.h" #include "RegisterContextFreeBSD_mips64.
[Lldb-commits] [lldb] r333151 - Remove unused include, and corresponding library dependency.
Author: jyknight Date: Wed May 23 20:42:38 2018 New Revision: 333151 URL: http://llvm.org/viewvc/llvm-project?rev=333151&view=rev Log: Remove unused include, and corresponding library dependency. Modified: lldb/trunk/source/Symbol/CMakeLists.txt lldb/trunk/source/Symbol/ObjectFile.cpp Modified: lldb/trunk/source/Symbol/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CMakeLists.txt?rev=333151&r1=333150&r2=333151&view=diff == --- lldb/trunk/source/Symbol/CMakeLists.txt (original) +++ lldb/trunk/source/Symbol/CMakeLists.txt Wed May 23 20:42:38 2018 @@ -50,7 +50,6 @@ add_lldb_library(lldbSymbol lldbPluginExpressionParserGo lldbPluginSymbolFileDWARF lldbPluginSymbolFilePDB -lldbPluginObjectContainerBSDArchive lldbPluginCPlusPlusLanguage lldbPluginObjCLanguage Modified: lldb/trunk/source/Symbol/ObjectFile.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=333151&r1=333150&r2=333151&view=diff == --- lldb/trunk/source/Symbol/ObjectFile.cpp (original) +++ lldb/trunk/source/Symbol/ObjectFile.cpp Wed May 23 20:42:38 2018 @@ -8,7 +8,6 @@ //===--===// #include "lldb/Symbol/ObjectFile.h" -#include "Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r333813 - Fix support for distinguishing archive members by timestamp on Darwin.
Author: jyknight Date: Fri Jun 1 19:44:10 2018 New Revision: 333813 URL: http://llvm.org/viewvc/llvm-project?rev=333813&view=rev Log: Fix support for distinguishing archive members by timestamp on Darwin. On Darwin, the binary's symbol table points to debug info in object files -- potentially object files within a static library. Such a library may have multiple entries with the same name, distinguished only by timestamp. The code was already _attempting_ to handle this case (see the code in ObjectContainerBSDArchive::Archive::FindObject which disambiguates via timestamp). But, unfortunately, while the timestamp was taken into account on the _first_ lookup, the result was then cached in a map keyed only off of the path. Added the timestamp to the cache, and added a test case. Differential Revision: https://reviews.llvm.org/D47660 Added: lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/ lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/a.c lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/main.c lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/sub1/ lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/sub1/a.c Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h Added: lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile?rev=333813&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile Fri Jun 1 19:44:10 2018 @@ -0,0 +1,22 @@ +LEVEL = ../../make + +C_SOURCES := main.c + +# Make an archive that has two object files with the same name, but +# different timestamps. Do it all in one rule so that the timestamps +# can be controlled without confusing Make. +libfoo.a: a.c sub1/a.c + $(CC) $(CFLAGS) -c $(http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py?rev=333813&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py Fri Jun 1 19:44:10 2018 @@ -0,0 +1,62 @@ +"""Test breaking inside functions defined within a BSD archive file libfoo.a.""" + +from __future__ import print_function + + +import os +import time +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class BSDArchivesTestCase(TestBase): + +mydir = TestBase.compute_mydir(__file__) + +def setUp(self): +# Call super's setUp(). +TestBase.setUp(self) +# Find the line number in a(int) to break at. +self.line = line_number( +'a.c', '// Set file and line breakpoint inside a().') + +@expectedFailureAll( +oslist=["windows"], +bugnumber="llvm.org/pr24527. Makefile.rules doesn't know how to build static libs on Windows") +def test(self): +"""Break inside a() and b() defined within libfoo.a.""" +self.build() + +exe = self.getBuildArtifact("a.out") +self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) + +# Break on a() and b() symbols +lldbutil.run_break_set_by_symbol( +self, "a", sym_exact=True) +lldbutil.run_break_set_by_symbol( +self, "b", sym_exact=True) + +self.runCmd("run", RUN_SUCCEEDED) + +# The stop reason of the thread should be breakpoint. +self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, +substrs=['stopped', + 'stop reason = breakpoint']) + +# Break at a(int) first. +self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY, +substrs=['(int) arg = 1']) +self.expect("frame variable __a_global", VARIABLES_DISPLAYED_CORRECTLY, +substrs=['(int) __a_global = 1']) + +# Continue the program, we should break at b(int) next. +self.runCmd("continue") +self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, +substrs=['stopped', + 'stop reason = breakpoint']) +sel
[Lldb-commits] [lldb] r333816 - Fix silly error introduced after testing in r333813.
Author: jyknight Date: Fri Jun 1 21:00:16 2018 New Revision: 333816 URL: http://llvm.org/viewvc/llvm-project?rev=333816&view=rev Log: Fix silly error introduced after testing in r333813. Oops. Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py?rev=333816&r1=333815&r2=333816&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py Fri Jun 1 21:00:16 2018 @@ -15,13 +15,6 @@ class BSDArchivesTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) -def setUp(self): -# Call super's setUp(). -TestBase.setUp(self) -# Find the line number in a(int) to break at. -self.line = line_number( -'a.c', '// Set file and line breakpoint inside a().') - @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24527. Makefile.rules doesn't know how to build static libs on Windows") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350835 - [opaque pointer types] Remove some calls to generic Type subtype accessors.
Author: jyknight Date: Thu Jan 10 08:07:20 2019 New Revision: 350835 URL: http://llvm.org/viewvc/llvm-project?rev=350835&view=rev Log: [opaque pointer types] Remove some calls to generic Type subtype accessors. That is, remove many of the calls to Type::getNumContainedTypes(), Type::subtypes(), and Type::getContainedType(N). I'm not intending to remove these accessors -- they are useful/necessary in some cases. However, removing the pointee type from pointers would potentially break some uses, and reducing the number of calls makes it easier to audit. Modified: lldb/trunk/source/Expression/IRInterpreter.cpp Modified: lldb/trunk/source/Expression/IRInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=350835&r1=350834&r2=350835&view=diff == --- lldb/trunk/source/Expression/IRInterpreter.cpp (original) +++ lldb/trunk/source/Expression/IRInterpreter.cpp Thu Jan 10 08:07:20 2019 @@ -1592,9 +1592,6 @@ bool IRInterpreter::Interpret(llvm::Modu // Check if this is a string literal or constant string pointer if (arg_ty->isPointerTy()) { - // Pointer to just one type - assert(arg_ty->getNumContainedTypes() == 1); - lldb::addr_t addr = tmp_op.ULongLong(); size_t dataSize = 0; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r352159 - Define the _fltused symbol in one lldb test as well, post-r352076.
Author: jyknight Date: Thu Jan 24 19:21:23 2019 New Revision: 352159 URL: http://llvm.org/viewvc/llvm-project?rev=352159&view=rev Log: Define the _fltused symbol in one lldb test as well, post-r352076. Modified: lldb/trunk/lit/SymbolFile/NativePDB/function-types-builtins.cpp Modified: lldb/trunk/lit/SymbolFile/NativePDB/function-types-builtins.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/NativePDB/function-types-builtins.cpp?rev=352159&r1=352158&r2=352159&view=diff == --- lldb/trunk/lit/SymbolFile/NativePDB/function-types-builtins.cpp (original) +++ lldb/trunk/lit/SymbolFile/NativePDB/function-types-builtins.cpp Thu Jan 24 19:21:23 2019 @@ -11,6 +11,10 @@ // This technique in general allows us to exercise most of LLDB's type // system without a running process. +// Define _fltused, since we're not linking against the MS C runtime, but use +// floats. +extern "C" int _fltused = 0; + template struct MakeResult { static T result() { ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r352514 - Adjust documentation for git migration.
Author: jyknight Date: Tue Jan 29 08:37:27 2019 New Revision: 352514 URL: http://llvm.org/viewvc/llvm-project?rev=352514&view=rev Log: Adjust documentation for git migration. This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.com/llvm-project/ reviews.llvm.org/diffusion/ to instead point to https://github.com/llvm/llvm-project. This is *not* a trivial substitution, because additionally, all the checkout instructions had to be migrated to instruct users on how to use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of checking out various projects into various subdirectories. I've attempted to not change any scripts here, only documentation. The scripts will have to be addressed separately. Additionally, I've deleted one document which appeared to be outdated and unneeded: lldb/docs/building-with-debug-llvm.txt Differential Revision: https://reviews.llvm.org/D57330 Removed: lldb/trunk/docs/building-with-debug-llvm.txt Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_source/TestCommandSource.py lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py lldb/trunk/utils/vim-lldb/doc/lldb.txt lldb/trunk/www/adding-language-support.html lldb/trunk/www/build.html lldb/trunk/www/index.html lldb/trunk/www/python-reference.html lldb/trunk/www/scripting.html lldb/trunk/www/sidebar.incl lldb/trunk/www/source.html lldb/trunk/www/symbolication.html lldb/trunk/www/varformats.html Removed: lldb/trunk/docs/building-with-debug-llvm.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/building-with-debug-llvm.txt?rev=352513&view=auto == --- lldb/trunk/docs/building-with-debug-llvm.txt (original) +++ lldb/trunk/docs/building-with-debug-llvm.txt (removed) @@ -1,51 +0,0 @@ -This document describes how to build a debug version of LLVM for use with -LLDB, and how to make LLDB use it. - -It assumes that you are using the Xcode 3 series (I used 3.2.4) to build -LLDB. It also assumes that your shell is /bin/bash, and that you are -currently at a shell prompt in a checked-out LLDB repository. - -1. Check out LLVM and Clang from their repositories. To determine - the revision to use, consult scripts/build-llvm.pl (this is done - in the first command line below). !!! WARNING Do not use the - name "llvm" for your checkout, for reasons described in part 3 - below. - - $ export CLANG_REVISION=`cat scripts/build-llvm.pl | grep ^our.*llvm_revision | cut -d \' -f 2,2` - $ svn co -r $CLANG_REVISION http://llvm.org/svn/llvm-project/llvm/trunk llvm.checkout - $ svn co -r $CLANG_REVISION http://llvm.org/svn/llvm-project/cfe/trunk llvm.checkout/tools/clang - -2. Configure LLVM/Clang with the proper options and compilers. I use: - - $ cd llvm.checkout - $ CC="cc -g -O0" CXX="c++ -g -O0" ./configure --disable-optimized --enable-assertions --enable-targets=x86_64,arm - $ CC="cc -g -O0" CXX="c++ -g -O0" make -j 2 - $ cd .. - -3. Create a link to the built LLVM. !!! WARNING: Do not rename the - directory! The LLVM builder script that runs as part of the Xcode - build keys off the fact that llvm/ is a symlink to recognize that - we are building with a custom debug build. - - $ ln -sf llvm.checkout llvm - -4. Make sure that your Xcode project is set up correctly. Open - lldb.xcodeproj and do the following: - - Under "Targets" in the Groups & Files navigator, double-click - lldb-tool. In the resulting window, select "Debug" from the - "Configuration:" drop-down. Then, make sure that the setting - "Build Active Architecture Only" is enabled. Close the window. - - Under "Targets" in the Groups & Files navigator, double-click - LLDB. In the resulting window, select "Debug" from the - "Configuration:" drop-down. Then, make sure that the setting - "Build Active Architecture Only" is enabled. Close the window. - -5. Ensure that Xcode is building the lldb-tool target in Debug - configuration for your architecture (typically x86_64). You - can usually pick these options from the Overview drop-down at - the top left of the Xcode window. - -6. Build lldb.xcodeproj. - Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_source/TestCommandSource.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_source/TestCommandSource.py?rev=352514&r1=352513&r2=352514&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_source/TestCommandSource.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/
[Lldb-commits] [lldb] r353549 - [opaque pointer types] Update calls to CreateCall to pass the function
Author: jyknight Date: Fri Feb 8 11:30:46 2019 New Revision: 353549 URL: http://llvm.org/viewvc/llvm-project?rev=353549&view=rev Log: [opaque pointer types] Update calls to CreateCall to pass the function type in lldb and polly. Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.h lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRDynamicChecks.cpp?rev=353549&r1=353548&r2=353549&view=diff == --- lldb/trunk/source/Expression/IRDynamicChecks.cpp (original) +++ lldb/trunk/source/Expression/IRDynamicChecks.cpp Fri Feb 8 11:30:46 2019 @@ -254,7 +254,7 @@ protected: /// @return /// The function pointer, for use in a CallInst. //-- - llvm::Value *BuildPointerValidatorFunc(lldb::addr_t start_address) { + llvm::FunctionCallee BuildPointerValidatorFunc(lldb::addr_t start_address) { llvm::Type *param_array[1]; param_array[0] = const_cast(GetI8PtrTy()); @@ -266,7 +266,7 @@ protected: PointerType *fun_ptr_ty = PointerType::getUnqual(fun_ty); Constant *fun_addr_int = ConstantInt::get(GetIntptrTy(), start_address, false); -return ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty); +return {fun_ty, ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty)}; } //-- @@ -279,7 +279,7 @@ protected: /// @return /// The function pointer, for use in a CallInst. //-- - llvm::Value *BuildObjectCheckerFunc(lldb::addr_t start_address) { + llvm::FunctionCallee BuildObjectCheckerFunc(lldb::addr_t start_address) { llvm::Type *param_array[2]; param_array[0] = const_cast(GetI8PtrTy()); @@ -292,7 +292,7 @@ protected: PointerType *fun_ptr_ty = PointerType::getUnqual(fun_ty); Constant *fun_addr_int = ConstantInt::get(GetIntptrTy(), start_address, false); -return ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty); +return {fun_ty, ConstantExpr::getIntToPtr(fun_addr_int, fun_ptr_ty)}; } PointerType *GetI8PtrTy() { @@ -382,7 +382,7 @@ protected: } private: - llvm::Value *m_valid_pointer_check_func; + llvm::FunctionCallee m_valid_pointer_check_func; }; class ObjcObjectChecker : public Instrumenter { @@ -544,7 +544,7 @@ protected: } private: - llvm::Value *m_objc_object_check_func; + llvm::FunctionCallee m_objc_object_check_func; }; IRDynamicChecks::IRDynamicChecks(DynamicCheckerFunctions &checker_functions, Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=353549&r1=353548&r2=353549&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Fri Feb 8 11:30:46 2019 @@ -477,15 +477,15 @@ bool IRForTarget::RewriteObjCConstString ArrayRef CFSCWB_arg_types(arg_type_array, 5); -llvm::Type *CFSCWB_ty = +llvm::FunctionType *CFSCWB_ty = FunctionType::get(ns_str_ty, CFSCWB_arg_types, false); // Build the constant containing the pointer to the function PointerType *CFSCWB_ptr_ty = PointerType::getUnqual(CFSCWB_ty); Constant *CFSCWB_addr_int = ConstantInt::get(m_intptr_ty, CFStringCreateWithBytes_addr, false); -m_CFStringCreateWithBytes = -ConstantExpr::getIntToPtr(CFSCWB_addr_int, CFSCWB_ptr_ty); +m_CFStringCreateWithBytes = { +CFSCWB_ty, ConstantExpr::getIntToPtr(CFSCWB_addr_int, CFSCWB_ptr_ty)}; } ConstantDataSequential *string_array = NULL; @@ -880,14 +880,15 @@ bool IRForTarget::RewriteObjCSelector(In ArrayRef srN_arg_types(type_array, 1); -llvm::Type *srN_type = +llvm::FunctionType *srN_type = FunctionType::get(sel_ptr_type, srN_arg_types, false); // Build the constant containing the pointer to the function PointerType *srN_ptr_ty = PointerType::getUnqual(srN_type); Constant *srN_addr_int = ConstantInt::get(m_intptr_ty, sel_registerName_addr, false); -m_sel_registerName = ConstantExpr::getIntToPtr(srN_addr_int, srN_ptr_ty); +m_sel_registerName = {srN_type, + ConstantExpr::getIntToPtr(srN_addr_int, srN_ptr_ty)}; } Value *argument_array[1]; @@ -1042,14 +1043,15 @@ bool IRForTarget::RewriteObjCClassRefere ArrayRef ogC_arg_
Re: [Lldb-commits] [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!
jyknight added a subscriber: jyknight. Comment at: docs/Proposals/GitHub.rst:209 @@ +208,3 @@ + well as a webhook to update the umbrella project (see below). +3. Make sure we have an llvm-project (with submodules) setup in the official + account, with all necessary hooks (history, update, merges). mehdi_amini wrote: > rengolin wrote: > > mehdi_amini wrote: > > > > Pre-commit hooks > > > > > > Won't handle the update of the umbrella. > > > > > > > Post-commit hooks > > > > > > Can't handle the update of the umbrella *because of GitHub*, this could > > > be possible with our own hosting of git for instance. > > > > > Pre-commit hooks are not designed to update the umbrella. Webhooks will be > > able to update the umbrella with a small external service, as proposed in > > the IRC. > That's why I asked it to be clearly mentioned somewhere else that on top of > "hooks" hosted by github, we will need to maintain our own webservice on our > own server to answer updates from theses hooks and update the umbrella, > because that's a non-negligible drawback in face of the motivation exposed in > the "Why move at all?" section. > Right now the document does not acknowledge that AFAICT. The maintenance of that service will be negligible compared to running a subversion installation. I expect that we could set up the webhook as an AppEngine app, using Github's "Git Data" API to generate the new commit, and then to the first approximation never have to touch it again. https://reviews.llvm.org/D22463 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r262739 - Update after r262737 in clang changed the accessor.
Author: jyknight Date: Fri Mar 4 13:30:53 2016 New Revision: 262739 URL: http://llvm.org/viewvc/llvm-project?rev=262739&view=rev Log: Update after r262737 in clang changed the accessor. Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=262739&r1=262738&r2=262739&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Fri Mar 4 13:30:53 2016 @@ -254,7 +254,7 @@ ClangExpressionParser::ClangExpressionPa if (log) { log->Printf("Using SIMD alignment: %d", target_info->getSimdDefaultAlign()); -log->Printf("Target datalayout string: '%s'", target_info->getDataLayoutString()); +log->Printf("Target datalayout string: '%s'", target_info->getDataLayout().getStringRepresentation().c_str()); log->Printf("Target ABI: '%s'", target_info->getABI().str().c_str()); log->Printf("Target vector alignment: %d", target_info->getMaxVectorAlign()); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [compiler-rt] [libc] [clang-tools-extra] [libcxx] [llvm] [lldb] [flang] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)
jyknight wrote: I'm somewhat concerned about the default for `-E` being to explode `#embed` into the comma-separated raw integers. Even with moderately-sized embeds, I think it'll generate unusably-bloated output. The human-readability of a big list of integers is not better than embedded base64 -- and actually, seems more of a pain to decode. I think the most user-friendly behavior would be: - `-E`: convert `#embed "file"` into `#embed_base64 "base64-file-contents"`. This preserves the property of the output not depending on other files, but doesn't make it hugely-bloated. - `-E -dE`: preserve any `#embed` directive as-is, referring to the external file. - Potentially another `-d?` mode to explode `#embed` into the raw integers (like you had proposed for the default behavior) -- though I'm not sure that's really going to be useful. https://github.com/llvm/llvm-project/pull/68620 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [libc] [clang] [libcxx] [flang] [compiler-rt] [lldb] [llvm] [clang-tools-extra] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)
jyknight wrote: I guess I'd consider the "mental model" here to be that (notionally) `#embed` is preprocessed by expanding to `#embed_base64`, which is handled by the compiler proper, not the preprocessor. Yes, that's not entirely true in the implementation, but it seems like a reasonable way to think about it. (similar in feel to `#pragma` which is also not purely preprocessor, despite starting with `#`.) https://github.com/llvm/llvm-project/pull/68620 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [clang] [libc] [clang-tools-extra] [libcxx] [lldb] [llvm] [compiler-rt] [lld] [flang] Fix clang to recognize new C23 modifiers %w and %wf when printing (PR #71771)
@@ -286,7 +286,33 @@ clang::analyze_format_string::ParseLengthModifier(FormatSpecifier &FS, lmKind = LengthModifier::AsInt3264; break; case 'w': - lmKind = LengthModifier::AsWide; ++I; break; + ++I; + if (I == E) return false; + if (*I == 'f') { +lmKind = LengthModifier::AsWideFast; +++I; + } else { +lmKind = LengthModifier::AsWide; + } + + if (I == E) return false; + int s = 0; + while (unsigned(*I - '0') <= 9) { +s = 10 * s + unsigned(*I - '0'); +++I; + } + + // s == 0 is MSVCRT case, like l but only for c, C, s, S, or Z on windows + // s != 0 for b, d, i, o, u, x, or X when a size followed(like 8, 16, 32 or 64) + if (s != 0) { +std::set supported_list {8, 16, 32, 64}; jyknight wrote: No objection from my side for removing the weird sizes from Clang's stdint.h. I also doubt anyone's using it at all, but if they are, they can request a revert. https://github.com/llvm/llvm-project/pull/71771 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [compiler-rt] [lldb] [llvm] [clang-tools-extra] [libc] [libcxx] [clang] [lld] [flang] Fix clang to recognize new C23 modifiers %w and %wf when printing (PR #71771)
@@ -484,6 +484,26 @@ bool clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers( return false; } +ArgType clang::analyze_format_string::wToArgType( +int size, bool fast, ASTContext &C) { + ArgType fastType = C.getTargetInfo().getTriple().isArch64Bit() ? C.LongLongTy : C.IntTy; jyknight wrote: It's actually quite a mess right now... We currently have TargetInfo getIntTypeByWidth/getLeastIntTypeByWidth, but, no getFastIntTypeByWidth. And this is a real problem...e.g. clang's stdint.h builtin-header goes through a ton of complexity to obfuscate that in fact it just ends up defining int_leastN_t and int_fastN_t as aliases to intN_t, on all platforms we support (which have all of 8/16/32/64-bit types available.) But, clang's stdint.h defers to the libc's stdint.h if that exists, and e.g. on glibc, int_fast{16|32}_t are instead defined as int (32bit) or long (64bit). OK, fine...Except -- we ALSO define a bunch of preprocessor macros for the fast types in InitPreprocessor (e.g. `__INT_FAST16_TYPE__`. Which assume that fast == least. And, of course, these don't match the libc stdint.h's definitions... And then there's the problem of which of 'long' vs 'long long' is used on various platforms, when both are 64-bit types. I think we need to fix all that as a prerequisite. At that point, this code simply calls getFastIntTypeByWidth. https://github.com/llvm/llvm-project/pull/71771 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r362510 - [lldb] Fix out-of-bounds read after c3ea7c66fec021867e005ad1b02f3c7e80feaa85
Author: jyknight Date: Tue Jun 4 08:27:19 2019 New Revision: 362510 URL: http://llvm.org/viewvc/llvm-project?rev=362510&view=rev Log: [lldb] Fix out-of-bounds read after c3ea7c66fec021867e005ad1b02f3c7e80feaa85 "Add support for mid-function epilogues on x86 that end in a non-local jump." Detected by asan. Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp?rev=362510&r1=362509&r2=362510&view=diff == --- lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp (original) +++ lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp Tue Jun 4 08:27:19 2019 @@ -736,7 +736,6 @@ bool x86AssemblyInspectionEngine::pc_rel int opcode_size = 0; uint8_t b1 = m_cur_insn[0]; - uint8_t b2 = m_cur_insn[1]; switch (b1) { case 0x77: // JA/JNBE rel8 @@ -764,6 +763,7 @@ bool x86AssemblyInspectionEngine::pc_rel break; } if (b1 == 0x0f && opcode_size == 0) { +uint8_t b2 = m_cur_insn[1]; switch (b2) { case 0x87: // JA/JNBE rel16/rel32 case 0x86: // JBE/JNA rel16/rel32 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] Free buffer to fix memory leak on test (PR #137979)
https://github.com/jyknight edited https://github.com/llvm/llvm-project/pull/137979 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] [lldb][test] Free buffer to fix memory leak on test (PR #137979)
https://github.com/jyknight approved this pull request. Looks obvious enough, thanks! https://github.com/llvm/llvm-project/pull/137979 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits