[Lldb-commits] [PATCH] D22209: Fix a race on process exit
labath created this revision. labath added a reviewer: clayborg. labath added a subscriber: lldb-commits. Process::SetExitStatus was popping the process io handler and resetting m_process_input_reader shared pointer, which is not a safe thing to do as the function is called asynchronously and other threads may be accessing the member variable. (E.g. if the process terminates really quickly, the private state thread might only be in the process of pushing the handler on the stack. Sometimes, this leads to deadlock, as the shared pointer's state gets corrupted by the concurrent access. Since the IOHandler will be popped anyway in Process:HandleProcessStateChangedEvent when the exited event gets processed, doing the same in SetExitStatus seems to be unnecessary. http://reviews.llvm.org/D22209 Files: source/Target/Process.cpp Index: source/Target/Process.cpp === --- source/Target/Process.cpp +++ source/Target/Process.cpp @@ -1462,14 +1462,6 @@ else m_exit_string.clear(); -// When we exit, we don't need the input reader anymore -if (m_process_input_reader) -{ -m_process_input_reader->SetIsDone(true); -m_process_input_reader->Cancel(); -m_process_input_reader.reset(); -} - // Clear the last natural stop ID since it has a strong // reference to this process m_mod_id.SetStopEventForLastNaturalStopID(EventSP()); Index: source/Target/Process.cpp === --- source/Target/Process.cpp +++ source/Target/Process.cpp @@ -1462,14 +1462,6 @@ else m_exit_string.clear(); -// When we exit, we don't need the input reader anymore -if (m_process_input_reader) -{ -m_process_input_reader->SetIsDone(true); -m_process_input_reader->Cancel(); -m_process_input_reader.reset(); -} - // Clear the last natural stop ID since it has a strong // reference to this process m_mod_id.SetStopEventForLastNaturalStopID(EventSP()); ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22211: Change the /proc//maps to not assert on incorrect input
tberghammer created this revision. tberghammer added a reviewer: labath. tberghammer added a subscriber: lldb-commits. Change the /proc//maps to not assert on incorrect input If LLDB reads some incorrect input form /proc//maps then it should report an error instead of assert-ing as we don't want to crash in case of an incorrect maps file. http://reviews.llvm.org/D22211 Files: source/Plugins/Process/Linux/NativeProcessLinux.cpp Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp === --- source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1907,31 +1907,28 @@ const char read_perm_char = line_extractor.GetChar (); if (read_perm_char == 'r') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (read_perm_char == '-') && "unexpected /proc/{pid}/maps read permission char" ); +else if (read_perm_char == '-') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps read permission char"); // Handle write permission. const char write_perm_char = line_extractor.GetChar (); if (write_perm_char == 'w') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (write_perm_char == '-') && "unexpected /proc/{pid}/maps write permission char" ); +else if (read_perm_char == '-') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps write permission char"); // Handle execute permission. const char exec_perm_char = line_extractor.GetChar (); if (exec_perm_char == 'x') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (exec_perm_char == '-') && "unexpected /proc/{pid}/maps exec permission char" ); +else if (read_perm_char == '-') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps exec permission char"); return Error (); } Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp === --- source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1907,31 +1907,28 @@ const char read_perm_char = line_extractor.GetChar (); if (read_perm_char == 'r') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (read_perm_char == '-') && "unexpected /proc/{pid}/maps read permission char" ); +else if (read_perm_char == '-') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps read permission char"); // Handle write permission. const char write_perm_char = line_extractor.GetChar (); if (write_perm_char == 'w') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (write_perm_char == '-') && "unexpected /proc/{pid}/maps write permission char" ); +else if (read_perm_char == '-') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps write permission char"); // Handle execute permission. const char exec_perm_char = line_extractor.GetChar (); if (exec_perm_char == 'x') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (exec_perm_char == '-') && "unexpected /proc/{pid}/maps exec permission char" ); +else if (read_perm_char == '-') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps exec permission char"); return Error (); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22213: [test] Fix category-based skipping
labath created this revision. labath added a reviewer: tfiala. labath added a subscriber: lldb-commits. LLDBTestResult.hardMarkAsSkipped marked the whole class as skipped when the first class in the test failed the category check. This meant that subsequent tests in the same class did not run even if they were passing the category filter. Fix that. http://reviews.llvm.org/D22213 Files: packages/Python/lldbsuite/test/test_result.py Index: packages/Python/lldbsuite/test/test_result.py === --- packages/Python/lldbsuite/test/test_result.py +++ packages/Python/lldbsuite/test/test_result.py @@ -113,8 +113,6 @@ def hardMarkAsSkipped(self,test): getattr(test, test._testMethodName).__func__.__unittest_skip__ = True getattr(test, test._testMethodName).__func__.__unittest_skip_why__ = "test case does not fall in any category of interest for this run" -test.__class__.__unittest_skip__ = True -test.__class__.__unittest_skip_why__ = "test case does not fall in any category of interest for this run" def startTest(self, test): if configuration.shouldSkipBecauseOfCategories(self.getCategoriesForTest(test)): Index: packages/Python/lldbsuite/test/test_result.py === --- packages/Python/lldbsuite/test/test_result.py +++ packages/Python/lldbsuite/test/test_result.py @@ -113,8 +113,6 @@ def hardMarkAsSkipped(self,test): getattr(test, test._testMethodName).__func__.__unittest_skip__ = True getattr(test, test._testMethodName).__func__.__unittest_skip_why__ = "test case does not fall in any category of interest for this run" -test.__class__.__unittest_skip__ = True -test.__class__.__unittest_skip_why__ = "test case does not fall in any category of interest for this run" def startTest(self, test): if configuration.shouldSkipBecauseOfCategories(self.getCategoriesForTest(test)): ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22213: [test] Fix category-based skipping
labath added a comment. Btw, I tried to make a unit test for this, but I could not get your meta test runner to work -- the existing test was failing for me (it was not getting any events apart from the global "test run started"/"test run finished" events). Do you have any idea what could be wrong? http://reviews.llvm.org/D22213 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22211: Change the /proc//maps to not assert on incorrect input
labath added a comment. Given that this "file" comes straight from the kernel, i don't think asserting here is necessarily a bad thing, but I don't really care either way... http://reviews.llvm.org/D22211 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22218: Dwarf parser: don't lookup void typedefs in the DWO
labath created this revision. labath added a reviewer: clayborg. labath added subscribers: tberghammer, lldb-commits. void typedefs do not have a DW_AT_type attribute, so we end up with an empty encoding_uid variable. These don't need to be looked up and trying to look that will assert in a debug build. http://reviews.llvm.org/D22218 Files: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp === --- source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -328,7 +328,7 @@ } } -if (tag == DW_TAG_typedef) +if (tag == DW_TAG_typedef && encoding_uid.IsValid()) { // Try to parse a typedef from the DWO file first as modules // can contain typedef'ed structures that have no names like: Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp === --- source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -328,7 +328,7 @@ } } -if (tag == DW_TAG_typedef) +if (tag == DW_TAG_typedef && encoding_uid.IsValid()) { // Try to parse a typedef from the DWO file first as modules // can contain typedef'ed structures that have no names like: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275060 - Change the /proc//maps to not assert on incorrect input
Author: tberghammer Date: Mon Jul 11 08:43:27 2016 New Revision: 275060 URL: http://llvm.org/viewvc/llvm-project?rev=275060&view=rev Log: Change the /proc//maps to not assert on incorrect input If LLDB reads some incorrect input form /proc//maps then it should report an error instead of assert-ing as we don't want to crash in case of an incorrect maps file. Differential revision: http://reviews.llvm.org/D22211 Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=275060&r1=275059&r2=275060&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Mon Jul 11 08:43:27 2016 @@ -1919,31 +1919,28 @@ ParseMemoryRegionInfoFromProcMapsLine (c const char read_perm_char = line_extractor.GetChar (); if (read_perm_char == 'r') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (read_perm_char == '-') && "unexpected /proc/{pid}/maps read permission char" ); +else if (read_perm_char == '-') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps read permission char"); // Handle write permission. const char write_perm_char = line_extractor.GetChar (); if (write_perm_char == 'w') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (write_perm_char == '-') && "unexpected /proc/{pid}/maps write permission char" ); +else if (write_perm_char == '-') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps write permission char"); // Handle execute permission. const char exec_perm_char = line_extractor.GetChar (); if (exec_perm_char == 'x') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (exec_perm_char == '-') && "unexpected /proc/{pid}/maps exec permission char" ); +else if (exec_perm_char == '-') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps exec permission char"); return Error (); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22211: Change the /proc//maps to not assert on incorrect input
This revision was automatically updated to reflect the committed changes. Closed by commit rL275060: Change the /proc//maps to not assert on incorrect input (authored by tberghammer). Changed prior to commit: http://reviews.llvm.org/D22211?vs=63485&id=63503#toc Repository: rL LLVM http://reviews.llvm.org/D22211 Files: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Index: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp === --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1919,31 +1919,28 @@ const char read_perm_char = line_extractor.GetChar (); if (read_perm_char == 'r') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (read_perm_char == '-') && "unexpected /proc/{pid}/maps read permission char" ); +else if (read_perm_char == '-') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps read permission char"); // Handle write permission. const char write_perm_char = line_extractor.GetChar (); if (write_perm_char == 'w') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (write_perm_char == '-') && "unexpected /proc/{pid}/maps write permission char" ); +else if (write_perm_char == '-') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps write permission char"); // Handle execute permission. const char exec_perm_char = line_extractor.GetChar (); if (exec_perm_char == 'x') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (exec_perm_char == '-') && "unexpected /proc/{pid}/maps exec permission char" ); +else if (exec_perm_char == '-') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps exec permission char"); return Error (); } Index: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp === --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1919,31 +1919,28 @@ const char read_perm_char = line_extractor.GetChar (); if (read_perm_char == 'r') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (read_perm_char == '-') && "unexpected /proc/{pid}/maps read permission char" ); +else if (read_perm_char == '-') memory_region_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps read permission char"); // Handle write permission. const char write_perm_char = line_extractor.GetChar (); if (write_perm_char == 'w') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (write_perm_char == '-') && "unexpected /proc/{pid}/maps write permission char" ); +else if (write_perm_char == '-') memory_region_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps write permission char"); // Handle execute permission. const char exec_perm_char = line_extractor.GetChar (); if (exec_perm_char == 'x') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eYes); -else -{ -assert ( (exec_perm_char == '-') && "unexpected /proc/{pid}/maps exec permission char" ); +else if (exec_perm_char == '-') memory_region_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo); -} +else +return Error ("unexpected /proc/{pid}/maps exec permission char"); return Error (); } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22219: Support loading files even when incorrect file name specified by the linker
tberghammer created this revision. tberghammer added reviewers: labath, clayborg. tberghammer added a subscriber: lldb-commits. Herald added subscribers: danalbert, tberghammer. Support loading files even when incorrect file name specified by the linker "Incorrect" file name seen on Android whene the main executable is called "app_process32" (or 64) but the linker specifies the package name (e.g. com.android.calculator2). Additionally it can be present in case of some linker bugs. This CL adds logic to try to fetch the correct file name from the proc file system based on the base address sepcified by the linker in case we are failed to load the module by name. http://reviews.llvm.org/D22219 Files: docs/lldb-gdb-remote.txt include/lldb/Target/MemoryRegionInfo.h packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py source/Core/DynamicLoader.cpp source/Plugins/Process/Linux/NativeProcessLinux.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -2224,6 +2224,15 @@ response.PutChar (';'); } + +// Name +ConstString name = region_info.GetName(); +if (name) +{ +response.PutCString("name:"); +response.PutCStringAsRawHex8(name.AsCString()); +response.PutChar(';'); +} } return SendPacketNoLock(response.GetData(), response.GetSize()); Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -2439,6 +2439,13 @@ region_info.SetMapped(MemoryRegionInfo::eNo); } } +else if (name.compare ("name") == 0) +{ +StringExtractorGDBRemote name_extractor; +name_extractor.GetStringRef().swap(value); +name_extractor.GetHexByteString(value); +region_info.SetName(value.c_str()); +} else if (name.compare ("error") == 0) { StringExtractorGDBRemote name_extractor; Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp === --- source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1942,6 +1942,20 @@ else return Error ("unexpected /proc/{pid}/maps exec permission char"); +line_extractor.GetChar(); // Read the private bit +line_extractor.SkipSpaces(); // Skip the separator +line_extractor.GetHexMaxU64(false, 0); // Read the offset +line_extractor.GetHexMaxU64(false, 0); // Read the major device number +line_extractor.GetChar(); // Read the device id separator +line_extractor.GetHexMaxU64(false, 0); // Read the major device number +line_extractor.SkipSpaces(); // Skip the separator +line_extractor.GetU64(0, 10); // Read the inode number + +line_extractor.SkipSpaces(); +const char* name = line_extractor.Peek(); +if (name) +memory_region_info.SetName(name); + return Error (); } Index: source/Core/DynamicLoader.cpp === --- source/Core/DynamicLoader.cpp +++ source/Core/DynamicLoader.cpp @@ -12,13 +12,14 @@ // Other libraries and framework includes // Project includes #include "lldb/lldb-private.h" -#include "lldb/Target/DynamicLoader.h" -#include "lldb/Target/Process.h" -#include "lldb/Target/Target.h" -#include "lldb/Core/PluginManager.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" +#include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" +#include "lldb/Target/DynamicLoader.h" +#include "lldb/Target/MemoryRegionInfo.h" +#include "lldb/Target/Process.h" +#include "lldb/Target/Target.h" using namespace lldb; using namespace lldb_private; @@ -177,37 +178,67 @@ { Target &target = m_process->GetTarget(); ModuleList &modules = target.GetImages(); +ModuleSpec module_spec (file, target.GetArchitecture()); ModuleSP module_sp; -ModuleSpec module_spec (file, target.GetArchitecture()); if ((module_sp = modules.FindFirstModule (module_spec))) { UpdateLoadedSections(module_sp, link_map_addr, base_addr, base_addr_is_offset); +return module_sp; } -else
Re: [Lldb-commits] [PATCH] D22209: Fix a race on process exit
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Looks good. http://reviews.llvm.org/D22209 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22218: Dwarf parser: don't lookup void typedefs in the DWO
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Looks good. http://reviews.llvm.org/D22218 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22219: Support loading files even when incorrect file name specified by the linker
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. Looks good. Please pipe the GetName through the SBMemoryRegionInfo by modifying the SBMemoryRegionInfo.h, SBMemoryRegionInfo.cpp, and SBMemoryRegionInfo.i files. The signature should be: const char * SBMemoryRegionInfo::GetName(); Since m_name is a ConstString, you can just return the m_name.GetCString() since the string is owned by the string pool. http://reviews.llvm.org/D22219 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275080 - Fix an issue where one could not define a Python command with the same name as an existing alias (or rather, one could but the results of invoking the command were far
Author: enrico Date: Mon Jul 11 12:36:55 2016 New Revision: 275080 URL: http://llvm.org/viewvc/llvm-project?rev=275080&view=rev Log: Fix an issue where one could not define a Python command with the same name as an existing alias (or rather, one could but the results of invoking the command were far from satisfactory) Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/ lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/.categories lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/TestCommandScriptAlias.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/tcsacmd.py Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/.categories URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/.categories?rev=275080&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/.categories (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/.categories Mon Jul 11 12:36:55 2016 @@ -0,0 +1 @@ +cmdline Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/TestCommandScriptAlias.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/TestCommandScriptAlias.py?rev=275080&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/TestCommandScriptAlias.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/TestCommandScriptAlias.py Mon Jul 11 12:36:55 2016 @@ -0,0 +1,37 @@ +""" +Test lldb Python commands. +""" + +from __future__ import print_function + + +import os, time +import lldb +from lldbsuite.test.lldbtest import * + +class CommandScriptAliasTestCase(TestBase): + +mydir = TestBase.compute_mydir(__file__) + +def test (self): +self.pycmd_tests () + +def pycmd_tests (self): +self.runCmd("command script import tcsacmd.py") +self.runCmd("command script add -f tcsacmd.some_command_here attach") + +# This is the function to remove the custom commands in order to have a +# clean slate for the next test case. +def cleanup(): +self.runCmd('command script delete attach', check=False) + +# Execute the cleanup function during test case tear down. +self.addTearDownHook(cleanup) + +# We don't want to display the stdout if not in TraceOn() mode. +if not self.TraceOn(): +self.HideStdout() + +self.expect('attach a', substrs = ['Victory is mine']); +self.runCmd("command script delete attach") +self.runCmd('attach noprocessexistswiththisname', check=False) # this can't crash but we don't care whether the actual attach works Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/tcsacmd.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/tcsacmd.py?rev=275080&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/tcsacmd.py (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/command_script_alias/tcsacmd.py Mon Jul 11 12:36:55 2016 @@ -0,0 +1,11 @@ +from __future__ import print_function +import lldb, sys + +def some_command_here(debugger, command, result, d): + if command == "a": +print("Victory is mine", file=result) +return True + else: +print("Sadness for all", file=result) +return False + Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=275080&r1=275079&r2=275080&view=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Jul 11 12:36:55 2016 @@ -3172,8 +3172,12 @@ CommandInterpreter::ResolveCommandImpl(s if (cmd_obj == nullptr) { std::string full_name; -if (GetAliasFullName(next_word.c_str(), full_name)) +bool is_alias = GetAliasFullName(next_word.c_str(), full_name); +cmd_obj = GetCommandObject(next_word.c_str(), &matches); +bool is_real_command = (is_alias == false) || (cmd_obj != nullptr && cmd_obj->IsAlias() == false); +if (!is_real_command) { +
[Lldb-commits] [PATCH] D22230: Make ThreadPlanStepInstruction's constructor public.
sas created this revision. sas added reviewers: clayborg, zturner. sas added a subscriber: lldb-commits. Some thread plans have public contructors, some others have protected constructors with friend classes. Not sure how these were determined, but this thread plan is going to be required to implement trampoline step-through on Windows. http://reviews.llvm.org/D22230 Files: include/lldb/Target/ThreadPlanStepInstruction.h Index: include/lldb/Target/ThreadPlanStepInstruction.h === --- include/lldb/Target/ThreadPlanStepInstruction.h +++ include/lldb/Target/ThreadPlanStepInstruction.h @@ -23,6 +23,12 @@ class ThreadPlanStepInstruction : public ThreadPlan { public: +ThreadPlanStepInstruction (Thread &thread, + bool step_over, + bool stop_others, + Vote stop_vote, + Vote run_vote); + ~ThreadPlanStepInstruction() override; void GetDescription(Stream *s, lldb::DescriptionLevel level) override; @@ -37,11 +43,6 @@ protected: bool DoPlanExplainsStop(Event *event_ptr) override; -ThreadPlanStepInstruction (Thread &thread, - bool step_over, - bool stop_others, - Vote stop_vote, - Vote run_vote); void SetUpState (); private: Index: include/lldb/Target/ThreadPlanStepInstruction.h === --- include/lldb/Target/ThreadPlanStepInstruction.h +++ include/lldb/Target/ThreadPlanStepInstruction.h @@ -23,6 +23,12 @@ class ThreadPlanStepInstruction : public ThreadPlan { public: +ThreadPlanStepInstruction (Thread &thread, + bool step_over, + bool stop_others, + Vote stop_vote, + Vote run_vote); + ~ThreadPlanStepInstruction() override; void GetDescription(Stream *s, lldb::DescriptionLevel level) override; @@ -37,11 +43,6 @@ protected: bool DoPlanExplainsStop(Event *event_ptr) override; -ThreadPlanStepInstruction (Thread &thread, - bool step_over, - bool stop_others, - Vote stop_vote, - Vote run_vote); void SetUpState (); private: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
sas created this revision. sas added reviewers: clayborg, zturner. sas added a subscriber: lldb-commits. This is required to be able to step through calls to external functions that are not properly marked with __declspec(dllimport). When a call like this is emitted, the linker will inject a trampoline to produce an indirect call through the IAT. http://reviews.llvm.org/D22231 Files: source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp Index: source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp === --- source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp +++ source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp @@ -12,6 +12,9 @@ #include "lldb/Core/PluginManager.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Target/RegisterContext.h" +#include "lldb/Target/ExecutionContext.h" +#include "lldb/Target/ThreadPlanStepInstruction.h" #include "llvm/ADT/Triple.h" @@ -100,5 +103,46 @@ ThreadPlanSP DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(Thread &thread, bool stop) { -return ThreadPlanSP(); +auto arch = m_process->GetTarget().GetArchitecture(); +if (arch.GetMachine() != llvm::Triple::x86) +{ +return ThreadPlanSP(); +} + +uint64_t pc = thread.GetRegisterContext()->GetPC(); +// Max size of an instruction in x86 is 15 bytes. +AddressRange range(pc, 2 * 15); + +ExecutionContext exe_ctx(m_process->GetTarget()); +DisassemblerSP disassembler_sp = Disassembler::DisassembleRange(arch, nullptr, nullptr, exe_ctx, range, true); +if (!disassembler_sp) +{ +return ThreadPlanSP(); +} + +InstructionList *insn_list = &disassembler_sp->GetInstructionList(); +if (insn_list == nullptr) +{ +return ThreadPlanSP(); +} + +// First instruction in a x86 Windows trampoline is going to be an indirect +// jump through the IAT and the next one will be a nop (usually there for +// alignment purposes). e.g.: +// 0x70ff4cfc <+956>: jmpl *0x7100c2a8 +// 0x70ff4d02 <+962>: nop + +auto first_insn = insn_list->GetInstructionAtIndex(0); +auto second_insn = insn_list->GetInstructionAtIndex(1); + +if (first_insn == nullptr || second_insn == nullptr || +strcmp(first_insn->GetMnemonic(&exe_ctx), "jmpl") != 0 || +strcmp(second_insn->GetMnemonic(&exe_ctx), "nop") != 0) +{ +return ThreadPlanSP(); +} + +assert(first_insn->DoesBranch() && !second_insn->DoesBranch()); + +return ThreadPlanSP(new ThreadPlanStepInstruction(thread, false, false, eVoteNoOpinion, eVoteNoOpinion)); } Index: source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp === --- source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp +++ source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp @@ -12,6 +12,9 @@ #include "lldb/Core/PluginManager.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Target/RegisterContext.h" +#include "lldb/Target/ExecutionContext.h" +#include "lldb/Target/ThreadPlanStepInstruction.h" #include "llvm/ADT/Triple.h" @@ -100,5 +103,46 @@ ThreadPlanSP DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(Thread &thread, bool stop) { -return ThreadPlanSP(); +auto arch = m_process->GetTarget().GetArchitecture(); +if (arch.GetMachine() != llvm::Triple::x86) +{ +return ThreadPlanSP(); +} + +uint64_t pc = thread.GetRegisterContext()->GetPC(); +// Max size of an instruction in x86 is 15 bytes. +AddressRange range(pc, 2 * 15); + +ExecutionContext exe_ctx(m_process->GetTarget()); +DisassemblerSP disassembler_sp = Disassembler::DisassembleRange(arch, nullptr, nullptr, exe_ctx, range, true); +if (!disassembler_sp) +{ +return ThreadPlanSP(); +} + +InstructionList *insn_list = &disassembler_sp->GetInstructionList(); +if (insn_list == nullptr) +{ +return ThreadPlanSP(); +} + +// First instruction in a x86 Windows trampoline is going to be an indirect +// jump through the IAT and the next one will be a nop (usually there for +// alignment purposes). e.g.: +// 0x70ff4cfc <+956>: jmpl *0x7100c2a8 +// 0x70ff4d02 <+962>: nop + +auto first_insn = insn_list->GetInstructionAtIndex(0); +auto second_insn = insn_list->GetInstructionAtIndex(1); + +if (first_insn == nullptr || second_insn == nullptr || +strcmp(first_insn->GetMnemonic(&exe_ctx), "jmpl") != 0 || +strcmp(second_insn->GetMnemonic(&exe_ctx), "nop") != 0) +{ +return ThreadPlanSP(); +} + +assert(first_insn->DoesBranch() && !second_insn->DoesBranch()); + +return ThreadPlanSP(new ThreadPlanStepInstruction(thread, false, false, eVoteNoOpinion, e
Re: [Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
zturner added a comment. Excited to see this working. I will look at the patch in detail later, do you think you could make a test for it? http://reviews.llvm.org/D22231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19604: Allow ObjectFilePECOFF to initialize with ARM binaries.
sas updated this revision to Diff 63542. sas added a comment. Use arm-pc-windows intead of armv7-pc-windows. http://reviews.llvm.org/D19604 Files: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp === --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -144,6 +144,11 @@ spec.SetTriple("i686-pc-windows"); specs.Append(ModuleSpec(file, spec)); } +else if (coff_header.machine == MachineArmNt) +{ +spec.SetTriple("arm-pc-windows"); +specs.Append(ModuleSpec(file, spec)); +} } } } Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp === --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -144,6 +144,11 @@ spec.SetTriple("i686-pc-windows"); specs.Append(ModuleSpec(file, spec)); } +else if (coff_header.machine == MachineArmNt) +{ +spec.SetTriple("arm-pc-windows"); +specs.Append(ModuleSpec(file, spec)); +} } } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22230: Make ThreadPlanStepInstruction's constructor public.
clayborg resigned from this revision. clayborg edited reviewers, added: jingham; removed: clayborg. clayborg added a comment. Looks good to me, but for any thread plan stuff, I will defer to Jim Ingham. http://reviews.llvm.org/D22230 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D11270: Expr evaluation - Avoid to check when the memory handle is zero
spyffe requested changes to this revision. spyffe added a comment. This revision now requires changes to proceed. This code has been eliminated as -part of a refactoring of the way IRForTarget works. I'm sorry that I didn't get to this review earlier, but at this point the patch probably isn't worth resurrecting. I've hunted around for "equivalent" code after the refactor and I don't think it's there any more. http://reviews.llvm.org/D11270 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15116: Fix for evaluating a function with an ambiguous symbol
spyffe accepted this revision. spyffe added a comment. This revision is now accepted and ready to land. Sorry for getting to this review so late. This looks all right, and pretty conservative. As long as the test suite is okay with it, this looks fine! Thanks for the test case, too. Repository: rL LLVM http://reviews.llvm.org/D15116 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13350: [lldb] Fix evaluation of qualified global variables
spyffe accepted this revision. spyffe added a comment. This revision is now accepted and ready to land. Yes, we should follow the same rules as in regular lookup for these contexts. If the test suite is happy here, I'm happy. http://reviews.llvm.org/D13350 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
jingham added a subscriber: jingham. jingham requested changes to this revision. jingham added a reviewer: jingham. jingham added a comment. This revision now requires changes to proceed. Can't you just call "thread->QueueThreadPlanForStepSingleInstruction"? For the most part, it doesn't make sense to make a thread plan and not queue it right away. So the "Thread::QueueThreadPlanFor..." API's are the public ones. http://reviews.llvm.org/D22231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D17618: Improve looking up functions with equivalent mangled names.
spyffe requested changes to this revision. spyffe added a comment. This revision now requires changes to proceed. I'm concerned about the performance implications here, because `FindBestAlternateMangledName` is invoked for every C++ symbol lookup, not just for ones that would fail unless we did this workaround. We have a `ColectFallbackNames` function in IRExecutionUnit.cpp to try hackier approaches if the simple approaches don't work. Would it be feasible to make this farily heavyweight search part of the fallback names mechanism? http://reviews.llvm.org/D17618 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
sas requested a review of this revision. sas added a comment. @jingham, it looks like the `GetStepThroughTrampolinePlan` functions do not queue the thread plan themselves. See `DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan` for instance that just does `new ThreadPlanRunToAddress(...)`. If I understand correctly, the thread plan is pushed to the stack later on, by the caller. Let me know if I got something wrong there. http://reviews.llvm.org/D22231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22233: Apply local patches when building llvm on Mac.
sas created this revision. sas added reviewers: tfiala, clayborg. sas added a subscriber: lldb-commits. This is already done when building for linux with the CMake build system. This functionality disappeared recently when some of the build scripts used by the xcode build system changed. http://reviews.llvm.org/D22233 Files: scripts/Xcode/build-llvm.py Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -2,6 +2,7 @@ import errno import hashlib +import fnmatch import os import platform import subprocess @@ -166,9 +167,16 @@ CHECKING OUT AND BUILDING LLVM +def apply_patches(spec): +files = os.listdir(os.path.join(lldb_source_path(), 'scripts')) +patches = [f for f in files if fnmatch.fnmatch(f, spec['name'] + '.*.diff')] +for p in patches: +run_in_directory(["patch", "-p0", "-i", os.path.join(lldb_source_path(), 'scripts', p)], spec['root']) + def check_out_if_needed(spec): if not os.path.isdir(spec['root']): vcs(spec).check_out() +apply_patches(spec) def all_check_out_if_needed (): map (check_out_if_needed, XCODE_REPOSITORIES()) Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -2,6 +2,7 @@ import errno import hashlib +import fnmatch import os import platform import subprocess @@ -166,9 +167,16 @@ CHECKING OUT AND BUILDING LLVM +def apply_patches(spec): +files = os.listdir(os.path.join(lldb_source_path(), 'scripts')) +patches = [f for f in files if fnmatch.fnmatch(f, spec['name'] + '.*.diff')] +for p in patches: +run_in_directory(["patch", "-p0", "-i", os.path.join(lldb_source_path(), 'scripts', p)], spec['root']) + def check_out_if_needed(spec): if not os.path.isdir(spec['root']): vcs(spec).check_out() +apply_patches(spec) def all_check_out_if_needed (): map (check_out_if_needed, XCODE_REPOSITORIES()) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22234: Add LLVM build config for BuildAndIntegration.
sas created this revision. sas added reviewers: tfiala, clayborg. sas added a subscriber: lldb-commits. http://reviews.llvm.org/D22234 Files: scripts/Xcode/build-llvm.py Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -117,6 +117,10 @@ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"BuildAndIntegration": [ +"-DCMAKE_BUILD_TYPE=Release", +"-DLLVM_ENABLE_ASSERTIONS=OFF", +], } def CMAKE_ENVIRONMENT (): Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -117,6 +117,10 @@ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"BuildAndIntegration": [ +"-DCMAKE_BUILD_TYPE=Release", +"-DLLVM_ENABLE_ASSERTIONS=OFF", +], } def CMAKE_ENVIRONMENT (): ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22235: Build clang Debug if we build lldb debug.
sas created this revision. sas added reviewers: tfiala, clayborg. sas added a subscriber: lldb-commits. When we build Debug, we might be tracking down bugs in clang/llvm as well, so building it Debug with assertions helps debug the debugger. http://reviews.llvm.org/D22235 Files: lldb.xcodeproj/project.pbxproj scripts/Xcode/build-llvm.py Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -106,17 +106,18 @@ def CMAKE_FLAGS (): return { "Debug": [ -"-DCMAKE_BUILD_TYPE=RelWithDebInfo", -"-DLLVM_ENABLE_ASSERTIONS=ON", -], -"DebugClang": [ "-DCMAKE_BUILD_TYPE=Debug", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"DebugClang": [ + "-DCMAKE_BUILD_TYPE=Debug", + "-DLLVM_ENABLE_ASSERTIONS=ON", + ], "Release": [ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +# osmeta Release+Distribution "BuildAndIntegration": [ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=OFF", Index: lldb.xcodeproj/project.pbxproj === --- lldb.xcodeproj/project.pbxproj +++ lldb.xcodeproj/project.pbxproj @@ -7486,7 +7486,7 @@ LLVM_BUILD_DIR = "$(SRCROOT)/llvm-build/$(LLVM_CONFIGURATION)"; LLVM_BUILD_DIRTREE = "$(SRCROOT)/llvm-build"; LLVM_BUILD_DIR_ARCH = "$(CURRENT_ARCH)/"; - LLVM_CONFIGURATION = "Release+Asserts"; + LLVM_CONFIGURATION = "Debug+Asserts"; LLVM_SOURCE_DIR = "$(SRCROOT)/llvm"; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -106,17 +106,18 @@ def CMAKE_FLAGS (): return { "Debug": [ -"-DCMAKE_BUILD_TYPE=RelWithDebInfo", -"-DLLVM_ENABLE_ASSERTIONS=ON", -], -"DebugClang": [ "-DCMAKE_BUILD_TYPE=Debug", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"DebugClang": [ + "-DCMAKE_BUILD_TYPE=Debug", + "-DLLVM_ENABLE_ASSERTIONS=ON", + ], "Release": [ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +# osmeta Release+Distribution "BuildAndIntegration": [ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=OFF", Index: lldb.xcodeproj/project.pbxproj === --- lldb.xcodeproj/project.pbxproj +++ lldb.xcodeproj/project.pbxproj @@ -7486,7 +7486,7 @@ LLVM_BUILD_DIR = "$(SRCROOT)/llvm-build/$(LLVM_CONFIGURATION)"; LLVM_BUILD_DIRTREE = "$(SRCROOT)/llvm-build"; LLVM_BUILD_DIR_ARCH = "$(CURRENT_ARCH)/"; -LLVM_CONFIGURATION = "Release+Asserts"; +LLVM_CONFIGURATION = "Debug+Asserts"; LLVM_SOURCE_DIR = "$(SRCROOT)/llvm"; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22235: Build clang Debug if we build lldb debug.
sas updated this revision to Diff 63550. sas added a comment. Remove leftover comment. http://reviews.llvm.org/D22235 Files: lldb.xcodeproj/project.pbxproj scripts/Xcode/build-llvm.py Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -106,13 +106,13 @@ def CMAKE_FLAGS (): return { "Debug": [ -"-DCMAKE_BUILD_TYPE=RelWithDebInfo", -"-DLLVM_ENABLE_ASSERTIONS=ON", -], -"DebugClang": [ "-DCMAKE_BUILD_TYPE=Debug", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"DebugClang": [ + "-DCMAKE_BUILD_TYPE=Debug", + "-DLLVM_ENABLE_ASSERTIONS=ON", + ], "Release": [ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", Index: lldb.xcodeproj/project.pbxproj === --- lldb.xcodeproj/project.pbxproj +++ lldb.xcodeproj/project.pbxproj @@ -7486,7 +7486,7 @@ LLVM_BUILD_DIR = "$(SRCROOT)/llvm-build/$(LLVM_CONFIGURATION)"; LLVM_BUILD_DIRTREE = "$(SRCROOT)/llvm-build"; LLVM_BUILD_DIR_ARCH = "$(CURRENT_ARCH)/"; - LLVM_CONFIGURATION = "Release+Asserts"; + LLVM_CONFIGURATION = "Debug+Asserts"; LLVM_SOURCE_DIR = "$(SRCROOT)/llvm"; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; Index: scripts/Xcode/build-llvm.py === --- scripts/Xcode/build-llvm.py +++ scripts/Xcode/build-llvm.py @@ -106,13 +106,13 @@ def CMAKE_FLAGS (): return { "Debug": [ -"-DCMAKE_BUILD_TYPE=RelWithDebInfo", -"-DLLVM_ENABLE_ASSERTIONS=ON", -], -"DebugClang": [ "-DCMAKE_BUILD_TYPE=Debug", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"DebugClang": [ + "-DCMAKE_BUILD_TYPE=Debug", + "-DLLVM_ENABLE_ASSERTIONS=ON", + ], "Release": [ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", Index: lldb.xcodeproj/project.pbxproj === --- lldb.xcodeproj/project.pbxproj +++ lldb.xcodeproj/project.pbxproj @@ -7486,7 +7486,7 @@ LLVM_BUILD_DIR = "$(SRCROOT)/llvm-build/$(LLVM_CONFIGURATION)"; LLVM_BUILD_DIRTREE = "$(SRCROOT)/llvm-build"; LLVM_BUILD_DIR_ARCH = "$(CURRENT_ARCH)/"; -LLVM_CONFIGURATION = "Release+Asserts"; +LLVM_CONFIGURATION = "Debug+Asserts"; LLVM_SOURCE_DIR = "$(SRCROOT)/llvm"; MACOSX_DEPLOYMENT_TARGET = 10.9; ONLY_ACTIVE_ARCH = YES; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
jingham added a comment. Yes, that's sad. It needs to be done that way because the plan that organizes stepping "through" and provides a safety backstop if the step through runs away needs to push the sub-plans after it has been pushed. We could move all the stuff in the ThreadPlanStepThrough constructor to the DidPush method, then let the various GetStepThroughTrampolinePlan methods -> PushStepThroughTrampolinePlans. But it looks like we've already made a bunch of the ThreadPlan constructors public to work around this sort of problem, so we should probably just give in and make all the constructors public, and just document that you should preferentially call QueueThreadPlan if you are in a place where that's possible... http://reviews.llvm.org/D22231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
sas added a subscriber: sas. sas added a comment. Sounds good. I can make a separate patch to make all the constructors public if you think that's better. See http://reviews.llvm.org/D22230 for a patch that makes one of the constructors public. Is this patch good to go in its current form then? http://reviews.llvm.org/D22231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
Sounds good. I can make a separate patch to make all the constructors public if you think that's better. See http://reviews.llvm.org/D22230 for a patch that makes one of the constructors public. Is this patch good to go in its current form then? On Mon, Jul 11, 2016 at 12:21 PM, Jim Ingham wrote: > jingham added a comment. > > Yes, that's sad. It needs to be done that way because the plan that > organizes stepping "through" and provides a safety backstop if the step > through runs away needs to push the sub-plans after it has been pushed. We > could move all the stuff in the ThreadPlanStepThrough constructor to the > DidPush method, then let the various GetStepThroughTrampolinePlan methods -> > PushStepThroughTrampolinePlans. But it looks like we've already made a bunch > of the ThreadPlan constructors public to work around this sort of problem, so > we should probably just give in and make all the constructors public, and > just document that you should preferentially call QueueThreadPlan if you are > in a place where that's possible... > > > http://reviews.llvm.org/D22231 > > > -- Stephane Sezer ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22231: Implement trampoline step-through for Windows-x86.
clayborg resigned from this revision. clayborg removed a reviewer: clayborg. clayborg added a comment. Jim Ingham should OK any changes. If Jim is happy, then I am OK. http://reviews.llvm.org/D22231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22230: Make ThreadPlanStepInstruction's constructor public.
jingham accepted this revision. jingham added a comment. This revision is now accepted and ready to land. Sure, yes. http://reviews.llvm.org/D22230 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275119 - Fixed a threading race condition where we could crash after calling Debugger::Terminate().
Author: gclayton Date: Mon Jul 11 17:50:18 2016 New Revision: 275119 URL: http://llvm.org/viewvc/llvm-project?rev=275119&view=rev Log: Fixed a threading race condition where we could crash after calling Debugger::Terminate(). The issue was we have two global variables: one that contains a DebuggerList pointer and one that contains a std::mutex pointer. These get initialized in Debugger::Initialize(), and everywhere that uses these does: if (g_debugger_list_ptr && g_debugger_list_mutex_ptr) { std::lock_guard guard(*g_debugger_list_mutex_ptr); // do work while mutex is locked } Debugger::Terminate() was deleting and nulling out g_debugger_list_ptr which meant we had a race condition where someone might do the if statement and it evaluates to true, then another thread calls Debugger::Terminate() and deletes and nulls out g_debugger_list_ptr while holding the mutex, and another thread then locks the mutex and tries to use g_debugger_list_ptr. The fix is to just not delete and null out the g_debugger_list_ptr variable. Modified: lldb/trunk/source/Core/Debugger.cpp Modified: lldb/trunk/source/Core/Debugger.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=275119&r1=275118&r2=275119&view=diff == --- lldb/trunk/source/Core/Debugger.cpp (original) +++ lldb/trunk/source/Core/Debugger.cpp Mon Jul 11 17:50:18 2016 @@ -462,8 +462,6 @@ Debugger::Terminate () for (const auto& debugger: *g_debugger_list_ptr) debugger->Clear(); g_debugger_list_ptr->clear(); -delete g_debugger_list_ptr; -g_debugger_list_ptr = nullptr; } } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] Buildbot numbers for the week of 6/26/2016 - 7/02/2016
Hello everyone, Below are some buildbot numbers for the week of 6/26/2016 - 7/02/2016. Please see the same data in attached csv files: The longest time each builder was red during the last week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to red or from red to green); Count of commits by project; Number of completed builds, failed builds and average build time for successful builds per active builder; Average waiting time for a revision to get build result per active builder (response time); Thanks Galina The longest time each builder was red during the last week: buildername | was_red ---+--- sanitizer-windows | 102:23:18 perf-x86_64-penryn-O3 | 91:23:32 lldb-x86_64-ubuntu-14.04-android | 77:28:08 lldb-x86_64-darwin-13.4 | 76:52:52 lldb-windows7-android | 76:19:22 lldb-x86_64-ubuntu-14.04-cmake| 70:35:19 perf-x86_64-penryn-O3-polly | 64:16:46 perf-x86_64-penryn-O3-polly-before-vectorizer-detect-only | 63:07:50 perf-x86_64-penryn-O3-polly-unprofitable | 59:32:27 perf-x86_64-penryn-O3-polly-parallel-fast | 59:19:32 perf-x86_64-penryn-O3-polly-fast | 58:04:34 clang-ppc64be-linux-lnt | 44:22:37 sanitizer-x86_64-linux-bootstrap | 32:25:00 libcxx-libcxxabi-x86_64-linux-ubuntu-asan | 26:27:21 sanitizer-x86_64-linux-fast | 26:05:12 clang-ppc64le-linux-lnt | 25:45:53 clang-x86-win2008-selfhost| 24:36:39 clang-x86_64-linux-selfhost-modules | 23:20:27 clang-3stage-ubuntu | 22:18:49 sanitizer-x86_64-linux| 21:59:30 sanitizer-ppc64le-linux | 21:39:54 sanitizer-ppc64be-linux | 21:28:10 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx03| 15:50:16 libcxx-libcxxabi-x86_64-linux-ubuntu-cxx11| 14:48:42 clang-native-aarch64-full | 14:05:44 clang-ppc64le-linux-multistage| 13:57:56 clang-atom-d525-fedora-rel| 09:43:16 clang-cmake-thumbv7-a15-full-sh | 09:41:34 clang-cmake-armv7-a15-selfhost-neon | 09:25:57 clang-cmake-mipsel| 08:03:44 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast | 07:02:55 lld-x86_64-win7 | 05:56:20 clang-x64-ninja-win7 | 05:44:52 polly-amd64-linux | 05:36:39 llvm-mips-linux | 05:23:38 clang-cmake-armv7-a15-full| 04:54:54 clang-cmake-armv7-a15 | 04:26:13 clang-cmake-thumbv7-a15 | 04:24:56 sanitizer-x86_64-linux-autoconf | 03:04:03 clang-native-arm-lnt | 02:58:23 clang-cmake-armv7-a15-selfhost| 02:58:02 clang-cmake-aarch64-full | 02:55:50 libcxx-libcxxabi-x86_64-linux-ubuntu-gcc49-cxx11 | 02:42:35 sanitizer-x86_64-linux-fuzzer | 02:26:07 lld-x86_64-darwin13 | 02:16:38 clang-s390x-linux | 02:10:19 clang-cuda-build | 02:10:17 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast| 02:10:00 clang-ppc64be-linux | 02:09:16 clang-cmake-aarch64-quick | 02:08:22 clang-ppc64le-linux | 01:59:50 llvm-hexagon-elf | 01:50:28 clang-hexagon-elf | 01:48:56 llvm-clang-lld-x86_64-debian-fast | 01:48:20 clang-x86_64-debian-fast | 01:44:49 clang-ppc64be-linux-multistage| 01:37:06 clang-cmake-aarch64-42vma | 01:28:03 lldb-amd64-ninja-netbsd7 | 01:16:33 clang-cmake-mips | 01:10:59 libcxx-libcxxabi-x86_64-linux-ubuntu-tsan | 01:09:31 lld-x86_64-freebsd
[Lldb-commits] Buildbot numbers for the week of 7/03/2016 - 7/09/2016
Hello everyone, Below are some buildbot numbers for the last week of 7/03/2016 - 7/09/2016. Please see the same data in attached csv files: The longest time each builder was red during the last week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to red or from red to green); Count of commits by project; Number of completed builds, failed builds and average build time for successful builds per active builder; Average waiting time for a revision to get build result per active builder (response time); Thanks Galina The longest time each builder was red during the last week: buildername | was_red ---+--- perf-x86_64-penryn-O3 | 64:00:11 clang-bpf-build | 53:40:58 sanitizer-x86_64-linux-bootstrap | 38:18:34 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast | 34:15:55 clang-x86-win2008-selfhost| 19:28:35 sanitizer-x86_64-linux| 17:41:05 sanitizer-x86_64-linux-fast | 13:42:33 libcxx-libcxxabi-arm-linux| 12:54:51 lldb-windows7-android | 12:24:13 lldb-x86_64-ubuntu-14.04-buildserver | 12:21:03 lldb-x86_64-ubuntu-14.04-cmake| 12:07:26 perf-x86_64-penryn-O3-polly-before-vectorizer-detect-only | 11:45:25 lldb-amd64-ninja-netbsd7 | 11:44:19 clang-cmake-mipsel| 11:29:51 clang-native-aarch64-full | 10:54:43 clang-ppc64le-linux-multistage| 09:53:16 perf-x86_64-penryn-O3-polly | 08:03:34 lldb-x86_64-darwin-13.4 | 07:42:43 clang-ppc64le-linux | 07:26:44 clang-ppc64be-linux-multistage| 07:04:06 clang-ppc64be-linux-lnt | 06:47:26 clang-ppc64be-linux | 06:21:08 clang-ppc64le-linux-lnt | 06:03:08 clang-x86_64-linux-selfhost-modules | 05:59:04 sanitizer-ppc64be-linux | 05:52:14 clang-x64-ninja-win7 | 05:35:04 llvm-clang-lld-x86_64-debian-fast | 05:26:46 clang-cuda-build | 05:07:26 clang-s390x-linux | 04:59:56 clang-3stage-ubuntu | 04:54:06 llvm-mips-linux | 04:50:35 clang-x86_64-debian-fast | 04:37:34 sanitizer-ppc64le-linux | 04:01:52 clang-atom-d525-fedora-rel| 03:12:21 lld-x86_64-freebsd| 01:39:32 lldb-x86_64-ubuntu-14.04-android | 01:39:24 clang-cmake-armv7-a15-full| 01:30:09 perf-x86_64-penryn-O3-polly-fast | 01:15:12 polly-amd64-linux | 01:13:20 perf-x86_64-penryn-O3-polly-parallel-fast | 01:11:10 perf-x86_64-penryn-O3-polly-unprofitable | 01:02:11 sanitizer-x86_64-linux-fuzzer | 00:59:48 clang-native-arm-lnt | 00:58:03 clang-hexagon-elf | 00:53:56 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast| 00:50:42 sanitizer-windows | 00:50:33 clang-cmake-armv7-a15 | 00:43:46 clang-cmake-thumbv7-a15 | 00:43:40 clang-cmake-aarch64-42vma | 00:36:08 clang-cmake-aarch64-quick | 00:35:37 sanitizer-x86_64-linux-autoconf | 00:33:55 lld-x86_64-darwin13 | 00:23:36 clang-x86_64-linux-abi-test | 00:20:55 llvm-hexagon-elf | 00:13:29 lld-x86_64-win7 | 00:12:46 (55 rows) "Status change ratio" by active builder (percent of builds that changed the builder status from greed to red or from red to green): buildername| builds | changes | status change ratio ++-+- perf-x86_64-penr
Re: [Lldb-commits] [PATCH] D22233: Apply local patches when building llvm on Mac.
This revision was automatically updated to reflect the committed changes. Closed by commit rL275134: Apply local patches when building llvm on Mac. (authored by sas). Changed prior to commit: http://reviews.llvm.org/D22233?vs=63547&id=63619#toc Repository: rL LLVM http://reviews.llvm.org/D22233 Files: lldb/trunk/scripts/Xcode/build-llvm.py Index: lldb/trunk/scripts/Xcode/build-llvm.py === --- lldb/trunk/scripts/Xcode/build-llvm.py +++ lldb/trunk/scripts/Xcode/build-llvm.py @@ -2,6 +2,7 @@ import errno import hashlib +import fnmatch import os import platform import subprocess @@ -166,9 +167,16 @@ CHECKING OUT AND BUILDING LLVM +def apply_patches(spec): +files = os.listdir(os.path.join(lldb_source_path(), 'scripts')) +patches = [f for f in files if fnmatch.fnmatch(f, spec['name'] + '.*.diff')] +for p in patches: +run_in_directory(["patch", "-p0", "-i", os.path.join(lldb_source_path(), 'scripts', p)], spec['root']) + def check_out_if_needed(spec): if not os.path.isdir(spec['root']): vcs(spec).check_out() +apply_patches(spec) def all_check_out_if_needed (): map (check_out_if_needed, XCODE_REPOSITORIES()) Index: lldb/trunk/scripts/Xcode/build-llvm.py === --- lldb/trunk/scripts/Xcode/build-llvm.py +++ lldb/trunk/scripts/Xcode/build-llvm.py @@ -2,6 +2,7 @@ import errno import hashlib +import fnmatch import os import platform import subprocess @@ -166,9 +167,16 @@ CHECKING OUT AND BUILDING LLVM +def apply_patches(spec): +files = os.listdir(os.path.join(lldb_source_path(), 'scripts')) +patches = [f for f in files if fnmatch.fnmatch(f, spec['name'] + '.*.diff')] +for p in patches: +run_in_directory(["patch", "-p0", "-i", os.path.join(lldb_source_path(), 'scripts', p)], spec['root']) + def check_out_if_needed(spec): if not os.path.isdir(spec['root']): vcs(spec).check_out() +apply_patches(spec) def all_check_out_if_needed (): map (check_out_if_needed, XCODE_REPOSITORIES()) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275134 - Apply local patches when building llvm on Mac.
Author: sas Date: Mon Jul 11 20:28:59 2016 New Revision: 275134 URL: http://llvm.org/viewvc/llvm-project?rev=275134&view=rev Log: Apply local patches when building llvm on Mac. Summary: This is already done when building for linux with the CMake build system. This functionality disappeared recently when some of the build scripts used by the xcode build system changed. Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22233 Modified: lldb/trunk/scripts/Xcode/build-llvm.py Modified: lldb/trunk/scripts/Xcode/build-llvm.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/build-llvm.py?rev=275134&r1=275133&r2=275134&view=diff == --- lldb/trunk/scripts/Xcode/build-llvm.py (original) +++ lldb/trunk/scripts/Xcode/build-llvm.py Mon Jul 11 20:28:59 2016 @@ -2,6 +2,7 @@ import errno import hashlib +import fnmatch import os import platform import subprocess @@ -166,9 +167,16 @@ def all_source_control_status_md5 (): CHECKING OUT AND BUILDING LLVM +def apply_patches(spec): +files = os.listdir(os.path.join(lldb_source_path(), 'scripts')) +patches = [f for f in files if fnmatch.fnmatch(f, spec['name'] + '.*.diff')] +for p in patches: +run_in_directory(["patch", "-p0", "-i", os.path.join(lldb_source_path(), 'scripts', p)], spec['root']) + def check_out_if_needed(spec): if not os.path.isdir(spec['root']): vcs(spec).check_out() +apply_patches(spec) def all_check_out_if_needed (): map (check_out_if_needed, XCODE_REPOSITORIES()) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22230: Make ThreadPlanStepInstruction's constructor public.
sas updated this revision to Diff 63625. sas added a comment. Rebase. http://reviews.llvm.org/D22230 Files: include/lldb/Target/ThreadPlanStepInstruction.h Index: include/lldb/Target/ThreadPlanStepInstruction.h === --- include/lldb/Target/ThreadPlanStepInstruction.h +++ include/lldb/Target/ThreadPlanStepInstruction.h @@ -23,6 +23,12 @@ class ThreadPlanStepInstruction : public ThreadPlan { public: +ThreadPlanStepInstruction (Thread &thread, + bool step_over, + bool stop_others, + Vote stop_vote, + Vote run_vote); + ~ThreadPlanStepInstruction() override; void GetDescription(Stream *s, lldb::DescriptionLevel level) override; @@ -37,11 +43,6 @@ protected: bool DoPlanExplainsStop(Event *event_ptr) override; -ThreadPlanStepInstruction (Thread &thread, - bool step_over, - bool stop_others, - Vote stop_vote, - Vote run_vote); void SetUpState (); private: Index: include/lldb/Target/ThreadPlanStepInstruction.h === --- include/lldb/Target/ThreadPlanStepInstruction.h +++ include/lldb/Target/ThreadPlanStepInstruction.h @@ -23,6 +23,12 @@ class ThreadPlanStepInstruction : public ThreadPlan { public: +ThreadPlanStepInstruction (Thread &thread, + bool step_over, + bool stop_others, + Vote stop_vote, + Vote run_vote); + ~ThreadPlanStepInstruction() override; void GetDescription(Stream *s, lldb::DescriptionLevel level) override; @@ -37,11 +43,6 @@ protected: bool DoPlanExplainsStop(Event *event_ptr) override; -ThreadPlanStepInstruction (Thread &thread, - bool step_over, - bool stop_others, - Vote stop_vote, - Vote run_vote); void SetUpState (); private: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275139 - Make ThreadPlanStepInstruction's constructor public.
Author: sas Date: Mon Jul 11 20:43:46 2016 New Revision: 275139 URL: http://llvm.org/viewvc/llvm-project?rev=275139&view=rev Log: Make ThreadPlanStepInstruction's constructor public. Summary: Some thread plans have public contructors, some others have protected constructors with friend classes. Not sure how these were determined, but this thread plan is going to be required to implement trampoline step-through on Windows. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22230 Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h Modified: lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h?rev=275139&r1=275138&r2=275139&view=diff == --- lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h (original) +++ lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h Mon Jul 11 20:43:46 2016 @@ -23,6 +23,12 @@ namespace lldb_private { class ThreadPlanStepInstruction : public ThreadPlan { public: +ThreadPlanStepInstruction (Thread &thread, + bool step_over, + bool stop_others, + Vote stop_vote, + Vote run_vote); + ~ThreadPlanStepInstruction() override; void GetDescription(Stream *s, lldb::DescriptionLevel level) override; @@ -37,11 +43,6 @@ public: protected: bool DoPlanExplainsStop(Event *event_ptr) override; -ThreadPlanStepInstruction (Thread &thread, - bool step_over, - bool stop_others, - Vote stop_vote, - Vote run_vote); void SetUpState (); private: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22230: Make ThreadPlanStepInstruction's constructor public.
This revision was automatically updated to reflect the committed changes. Closed by commit rL275139: Make ThreadPlanStepInstruction's constructor public. (authored by sas). Changed prior to commit: http://reviews.llvm.org/D22230?vs=63625&id=63627#toc Repository: rL LLVM http://reviews.llvm.org/D22230 Files: lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h Index: lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h === --- lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h +++ lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h @@ -23,6 +23,12 @@ class ThreadPlanStepInstruction : public ThreadPlan { public: +ThreadPlanStepInstruction (Thread &thread, + bool step_over, + bool stop_others, + Vote stop_vote, + Vote run_vote); + ~ThreadPlanStepInstruction() override; void GetDescription(Stream *s, lldb::DescriptionLevel level) override; @@ -37,11 +43,6 @@ protected: bool DoPlanExplainsStop(Event *event_ptr) override; -ThreadPlanStepInstruction (Thread &thread, - bool step_over, - bool stop_others, - Vote stop_vote, - Vote run_vote); void SetUpState (); private: Index: lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h === --- lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h +++ lldb/trunk/include/lldb/Target/ThreadPlanStepInstruction.h @@ -23,6 +23,12 @@ class ThreadPlanStepInstruction : public ThreadPlan { public: +ThreadPlanStepInstruction (Thread &thread, + bool step_over, + bool stop_others, + Vote stop_vote, + Vote run_vote); + ~ThreadPlanStepInstruction() override; void GetDescription(Stream *s, lldb::DescriptionLevel level) override; @@ -37,11 +43,6 @@ protected: bool DoPlanExplainsStop(Event *event_ptr) override; -ThreadPlanStepInstruction (Thread &thread, - bool step_over, - bool stop_others, - Vote stop_vote, - Vote run_vote); void SetUpState (); private: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22234: Add LLVM build config for BuildAndIntegration.
This revision was automatically updated to reflect the committed changes. Closed by commit rL275140: Add LLVM build config for BuildAndIntegration. (authored by sas). Changed prior to commit: http://reviews.llvm.org/D22234?vs=63548&id=63628#toc Repository: rL LLVM http://reviews.llvm.org/D22234 Files: lldb/trunk/scripts/Xcode/build-llvm.py Index: lldb/trunk/scripts/Xcode/build-llvm.py === --- lldb/trunk/scripts/Xcode/build-llvm.py +++ lldb/trunk/scripts/Xcode/build-llvm.py @@ -118,6 +118,10 @@ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"BuildAndIntegration": [ +"-DCMAKE_BUILD_TYPE=Release", +"-DLLVM_ENABLE_ASSERTIONS=OFF", +], } def CMAKE_ENVIRONMENT (): Index: lldb/trunk/scripts/Xcode/build-llvm.py === --- lldb/trunk/scripts/Xcode/build-llvm.py +++ lldb/trunk/scripts/Xcode/build-llvm.py @@ -118,6 +118,10 @@ "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"BuildAndIntegration": [ +"-DCMAKE_BUILD_TYPE=Release", +"-DLLVM_ENABLE_ASSERTIONS=OFF", +], } def CMAKE_ENVIRONMENT (): ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275140 - Add LLVM build config for BuildAndIntegration.
Author: sas Date: Mon Jul 11 20:44:58 2016 New Revision: 275140 URL: http://llvm.org/viewvc/llvm-project?rev=275140&view=rev Log: Add LLVM build config for BuildAndIntegration. Reviewers: tfiala, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22234 Modified: lldb/trunk/scripts/Xcode/build-llvm.py Modified: lldb/trunk/scripts/Xcode/build-llvm.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/build-llvm.py?rev=275140&r1=275139&r2=275140&view=diff == --- lldb/trunk/scripts/Xcode/build-llvm.py (original) +++ lldb/trunk/scripts/Xcode/build-llvm.py Mon Jul 11 20:44:58 2016 @@ -118,6 +118,10 @@ def CMAKE_FLAGS (): "-DCMAKE_BUILD_TYPE=Release", "-DLLVM_ENABLE_ASSERTIONS=ON", ], +"BuildAndIntegration": [ +"-DCMAKE_BUILD_TYPE=Release", +"-DLLVM_ENABLE_ASSERTIONS=OFF", +], } def CMAKE_ENVIRONMENT (): ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275151 - Add some safety checks to Platform::GetRemoteSharedModule so if it
Author: jmolenda Date: Mon Jul 11 22:25:22 2016 New Revision: 275151 URL: http://llvm.org/viewvc/llvm-project?rev=275151&view=rev Log: Add some safety checks to Platform::GetRemoteSharedModule so if it is passed a ModuleSpec with a UUID, it won't accept a file it finds with a matching FileSpec & ArchSpec, but with a different UUID. Modified: lldb/trunk/source/Target/Platform.cpp Modified: lldb/trunk/source/Target/Platform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=275151&r1=275150&r2=275151&view=diff == --- lldb/trunk/source/Target/Platform.cpp (original) +++ lldb/trunk/source/Target/Platform.cpp Mon Jul 11 22:25:22 2016 @@ -1802,14 +1802,30 @@ Platform::GetRemoteSharedModule (const M { // Try to get module information from the process if (process->GetModuleSpec (module_spec.GetFileSpec (), module_spec.GetArchitecture (), resolved_module_spec)) -got_module_spec = true; +{ +if (module_spec.GetUUID().IsValid() == false || module_spec.GetUUID() == resolved_module_spec.GetUUID()) +{ +got_module_spec = true; +} +} } if (!got_module_spec) { // Get module information from a target. if (!GetModuleSpec (module_spec.GetFileSpec (), module_spec.GetArchitecture (), resolved_module_spec)) -return module_resolver (module_spec); +{ +if (module_spec.GetUUID().IsValid() == false || module_spec.GetUUID() == resolved_module_spec.GetUUID()) +{ +return module_resolver (module_spec); +} +} +} + +// If we are looking for a specific UUID, make sure resolved_module_spec has the same one before we search. +if (module_spec.GetUUID().IsValid()) +{ +resolved_module_spec.GetUUID() = module_spec.GetUUID(); } // Trying to find a module by UUID on local file system. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20357: [LLDB][MIPS] Fix FPU Size Based on Dynamic FR
nitesh.jain added a comment. Hi Greg, Please could you find some time to review this ? Thanks http://reviews.llvm.org/D20357 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits