Re: [Lldb-commits] [PATCH] D14920: [LLDB][MIPS] Provide actual number of watchpoints supported
mohit.bhakkad updated this revision to Diff 41014. Repository: rL LLVM http://reviews.llvm.org/D14920 Files: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h === --- source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h +++ source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h @@ -89,6 +89,9 @@ uint32_t NumSupportedHardwareWatchpoints () override; +uint32_t +NumHardwareWatchRegisters (); + protected: Error DoReadRegisterValue(uint32_t offset, Index: source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp === --- source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp +++ source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp @@ -76,6 +76,7 @@ #define I (1 << 2) #define IRW (I | R | W) +#define RW (R | W) struct pt_watch_regs default_watch_regs; @@ -1117,7 +1118,7 @@ Error NativeRegisterContextLinux_mips64::IsWatchpointHit (uint32_t wp_index, bool &is_hit) { -if (wp_index >= NumSupportedHardwareWatchpoints()) +if (wp_index >= NumHardwareWatchRegisters()) return Error("Watchpoint index out of range"); // reading the current state of watch regs @@ -1139,7 +1140,7 @@ Error NativeRegisterContextLinux_mips64::GetWatchpointHitIndex(uint32_t &wp_index, lldb::addr_t trap_addr) { -uint32_t num_hw_wps = NumSupportedHardwareWatchpoints(); +uint32_t num_hw_wps = NumHardwareWatchRegisters(); for (wp_index = 0; wp_index < num_hw_wps; ++wp_index) { bool is_hit; @@ -1164,7 +1165,7 @@ bool NativeRegisterContextLinux_mips64::ClearHardwareWatchpoint(uint32_t wp_index) { -if (wp_index >= NumSupportedHardwareWatchpoints()) +if (wp_index >= NumHardwareWatchRegisters()) return false; struct pt_watch_regs regs; @@ -1218,7 +1219,7 @@ DoReadWatchPointRegisterValue(m_thread.GetID(), static_cast(®s)); // Try if a new watch point fits in this state -int index = GetVacantWatchIndex (®s, addr, size, watch_flags, NumSupportedHardwareWatchpoints()); +int index = GetVacantWatchIndex (®s, addr, size, watch_flags, NumHardwareWatchRegisters()); // New watchpoint doesn't fit if (index == LLDB_INVALID_INDEX32) @@ -1236,7 +1237,7 @@ lldb::addr_t NativeRegisterContextLinux_mips64::GetWatchpointAddress (uint32_t wp_index) { -if (wp_index >= NumSupportedHardwareWatchpoints()) +if (wp_index >= NumHardwareWatchRegisters()) return LLDB_INVALID_ADDRESS; return hw_addr_map[wp_index]; @@ -1315,7 +1316,7 @@ lldb::addr_t NativeRegisterContextLinux_mips64::GetWatchpointHitAddress (uint32_t wp_index) { -if (wp_index >= NumSupportedHardwareWatchpoints()) +if (wp_index >= NumHardwareWatchRegisters()) return LLDB_INVALID_ADDRESS; lldb_private::ArchSpec arch; @@ -1343,6 +1344,32 @@ } uint32_t +NativeRegisterContextLinux_mips64::NumHardwareWatchRegisters () +{ +Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS)); +struct pt_watch_regs regs; +static int num_valid = 0; +if (!num_valid) +{ +DoReadWatchPointRegisterValue(m_thread.GetID(), static_cast(®s)); +switch (regs.style) +{ +case pt_watch_style_mips32: +num_valid = regs.mips32.num_valid; // Using num_valid as cache +return num_valid; +case pt_watch_style_mips64: +num_valid = regs.mips64.num_valid; +return num_valid; +default: +if(log) +log->Printf("NativeRegisterContextLinux_mips64::%s Error: Unrecognized watch register style", __FUNCTION__); +} +return 0; +} +return num_valid; +} + +uint32_t NativeRegisterContextLinux_mips64::NumSupportedHardwareWatchpoints () { Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS)); @@ -1356,9 +1383,19 @@ { case pt_watch_style_mips32: num_valid = regs.mips32.num_valid; // Using num_valid as cache +for (int index = 0; index < num_valid; index++) +{ +if ((regs.mips32.watch_masks[index] & RW)== 0) // check last 2 bits of mask(read, write) +num_valid--; +} return num_valid; case pt_watch_style_mips64: num_valid = regs.mips64.num_valid; +for (int index = 0; index < num_valid; index++) +{ +if ((regs.mips64.watch_masks[index] & RW) == 0) +num_valid--; +} return num_valid; default:
[Lldb-commits] [lldb] r253973 - Disable forcing -marm (A32 instruction set) while running testsuite on arm targets.
Author: omjavaid Date: Tue Nov 24 04:35:03 2015 New Revision: 253973 URL: http://llvm.org/viewvc/llvm-project?rev=253973&view=rev Log: Disable forcing -marm (A32 instruction set) while running testsuite on arm targets. Differential revision: http://reviews.llvm.org/D14823 Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules?rev=253973&r1=253972&r2=253973&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules (original) +++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Tue Nov 24 04:35:03 2015 @@ -164,6 +164,10 @@ else override ARCH := override ARCHFLAG := endif + ifeq "$(ARCH)" "arm" + override ARCH := + override ARCHFLAG := + endif ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES" DSYM = $(EXE).debug ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14823: Disable forcing -marm (A32 instruction set) while running testsuite on arm targets.
This revision was automatically updated to reflect the committed changes. Closed by commit rL253973: Disable forcing -marm (A32 instruction set) while running testsuite on arm… (authored by omjavaid). Changed prior to commit: http://reviews.llvm.org/D14823?vs=40652&id=41017#toc Repository: rL LLVM http://reviews.llvm.org/D14823 Files: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Index: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules === --- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules +++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules @@ -164,6 +164,10 @@ override ARCH := override ARCHFLAG := endif + ifeq "$(ARCH)" "arm" + override ARCH := + override ARCHFLAG := + endif ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES" DSYM = $(EXE).debug Index: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules === --- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules +++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules @@ -164,6 +164,10 @@ override ARCH := override ARCHFLAG := endif + ifeq "$(ARCH)" "arm" + override ARCH := + override ARCHFLAG := + endif ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES" DSYM = $(EXE).debug ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14944: [LLDB][MIPS] Marking some expected failures
mohit.bhakkad created this revision. mohit.bhakkad added reviewers: clayborg, zturner. mohit.bhakkad added subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. mohit.bhakkad set the repository for this revision to rL LLVM. Herald added subscribers: srhines, danalbert, tberghammer. Most of the MIPS boards provide only one watchpoint register, so tests with more than one watchpoints will fail, as software watchpoints are not supported for MIPS yet. Providing an alternate test for TestStepOverWatchpoint.py, in which checking one watchpoint, deleting it, then testing another watchpoint. Repository: rL LLVM http://reviews.llvm.org/D14944 Files: packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpointMips.py Index: packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpointMips.py === --- /dev/null +++ packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpointMips.py @@ -0,0 +1,110 @@ +"""Test stepping over watchpoints.""" + +from __future__ import print_function + + + +import lldb +import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.lldbtest import * + + +class TestStepOverWatchpoint(TestBase): + +mydir = TestBase.compute_mydir(__file__) + +def getCategories(self): +return ['basic_process'] + +@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported +@expectedFailureWindows("llvm.org/pr24446") +def test(self): +"""Test stepping over watchpoints.""" +self.build() +exe = os.path.join(os.getcwd(), 'a.out') + +target = self.dbg.CreateTarget(exe) +self.assertTrue(self.target, VALID_TARGET) + +lldbutil.run_break_set_by_symbol(self, 'main') + +process = target.LaunchSimple(None, None, + self.get_process_working_directory()) +self.assertTrue(process.IsValid(), PROCESS_IS_VALID) +self.assertTrue(process.GetState() == lldb.eStateStopped, +PROCESS_STOPPED) + +thread = lldbutil.get_stopped_thread(process, + lldb.eStopReasonBreakpoint) +self.assertTrue(thread.IsValid(), "Failed to get thread.") + +frame = thread.GetFrameAtIndex(0) +self.assertTrue(frame.IsValid(), "Failed to get frame.") + +read_value = frame.FindValue('g_watch_me_read', + lldb.eValueTypeVariableGlobal) +self.assertTrue(read_value.IsValid(), "Failed to find read value.") + +error = lldb.SBError() + +# resolve_location=True, read=True, write=False +read_watchpoint = read_value.Watch(True, True, False, error) +self.assertTrue(error.Success(), +"Error while setting watchpoint: %s" % +error.GetCString()) +self.assertTrue(read_watchpoint, "Failed to set read watchpoint.") + +thread.StepOver() +self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint, +STOPPED_DUE_TO_WATCHPOINT) +self.assertTrue(thread.GetStopDescription(20) == 'watchpoint 1') + +process.Continue() +self.assertTrue(process.GetState() == lldb.eStateStopped, +PROCESS_STOPPED) +self.assertTrue(thread.GetStopDescription(20) == 'step over') + +self.step_inst_for_watchpoint(1) + +write_value = frame.FindValue('g_watch_me_write', + lldb.eValueTypeVariableGlobal) +self.assertTrue(write_value, "Failed to find write value.") + +self.runCmd("watchpoint delete 1") + +# resolve_location=True, read=False, write=True +write_watchpoint = write_value.Watch(True, False, True, error) +self.assertTrue(read_watchpoint, "Failed to set write watchpoint.") +self.assertTrue(error.Success(), +"Error while setting watchpoint: %s" % +error.GetCString()) + +thread.StepOver() +self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint, +STOPPED_DUE_TO_WATCHPOINT) +self.assertTrue(thread.GetStopDescription(20) == 'watchpoint 2') + +process.Continue() +self.assertTrue(process.GetState() == lldb.eStateStopped, +PROCESS_STOPPED) +self.assertTrue(thread.GetStopDescription(20) == 'step over') + +self.step_inst_for_watchpoint(2) + +def step_inst_for_watchpoint(self, wp_id): +watchpoint_hit = False +current_line = self.frame
Re: [Lldb-commits] [PATCH] D14944: [LLDB][MIPS] Marking some expected failures
tberghammer added a comment. Instead of duplicating the test can you just change the existing one to remove the watchpoint in case we are running on mips? Repository: rL LLVM http://reviews.llvm.org/D14944 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D14952: Create new "platform process connect" command
tberghammer created this revision. tberghammer added reviewers: labath, clayborg. tberghammer added a subscriber: lldb-commits. Herald added subscribers: srhines, danalbert, tberghammer, emaste. Create new "platform process connect" command The standard remote debugging workflow with gdb is to start the application on the remote host under gdbserver (e.g.: gdbserver :5039 a.out) and then connect to it with gdb. The same workflow is supported by debugserver/lldb-gdbserver with a very similar syntax but to access all features of lldb we need to be connected also to an lldb-platform instance running on the target. Before this change this had to be done manually with starting a separate lldb-platform on the target machine and then connecting to it with lldb before connecting to the process. This change add a new command to lldb called "lldb platform connect" what makes it possible to connect to a platform and a process instance with a single command with specifying only a single connection port. With this command replacing gdbserver in a gdb based worflow is usually as simple as replacing the command to execute gdbserver with executing lldb-platform. Example for the new workflow: * On the target: lldb-server platform --listen localhost:5432 -- a.out arg1 arg2 * On the host: (lldb) platform select remote-android (lldb) platform process connect connect://localhost:5432 http://reviews.llvm.org/D14952 Files: include/lldb/Target/Platform.h source/Commands/CommandObjectPlatform.cpp source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h source/Plugins/Platform/POSIX/PlatformPOSIX.cpp source/Plugins/Platform/POSIX/PlatformPOSIX.h source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h tools/lldb-server/lldb-platform.cpp Index: tools/lldb-server/lldb-platform.cpp === --- tools/lldb-server/lldb-platform.cpp +++ tools/lldb-server/lldb-platform.cpp @@ -285,6 +285,12 @@ exit(option_error); } +// Skip any options we consumed with getopt_long_only. +argc -= optind; +argv += optind; +lldb_private::Args inferior_arguments; +inferior_arguments.SetArguments(argc, const_cast(argv)); + const bool children_inherit_listen_socket = false; // the test suite makes many connections in parallel, let's not miss any. // The highest this should get reasonably is a function of the number @@ -317,7 +323,9 @@ do { GDBRemoteCommunicationServerPlatform platform(acceptor_up->GetSocketProtocol(), acceptor_up->GetSocketScheme()); - +if (inferior_arguments.GetArgumentCount() > 0) +platform.SetInferiorArguments(inferior_arguments); + if (port_offset > 0) platform.SetPortOffset(port_offset); Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h @@ -66,6 +66,9 @@ void SetPortOffset (uint16_t port_offset); +void +SetInferiorArguments (const lldb_private::Args& args); + protected: const Socket::SocketProtocol m_socket_protocol; const std::string m_socket_scheme; @@ -75,6 +78,7 @@ PortMap m_port_map; uint16_t m_port_offset; +lldb_private::Args m_inferior_arguments; PacketResult Handle_qLaunchGDBServer (StringExtractorGDBRemote &packet); Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp === --- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp +++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp @@ -165,7 +165,8 @@ Error error = StartDebugserverProcess (url.str().c_str(), nullptr, debugserver_launch_info, - port_ptr); + port_ptr, + m_inferior_arguments); lldb::pid_t debugserver_pid = debugserver_launch_info.GetProcessID(); @@ -553,7 +554,13 @@ } void -GDBRemoteCommunicationServerPlatform::SetPortOffset (uint16_t port_offset) +GDBRemoteCommunicationServerPlatform::SetPortOffset(uint16_t port_offset) {
Re: [Lldb-commits] [PATCH] D14633: [LLDB][MIPS] Clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS
tberghammer accepted this revision. tberghammer added a comment. If you want to get this in with using SetBytes I am fine with it but we should keep an eye on it as I won't be surprised if it will break when somebody try to read out the data from the RegisterValue object with GetUInt() Repository: rL LLVM http://reviews.llvm.org/D14633 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14952: Create new "platform process connect" command
labath added a comment. Seems like a reasonable thing to do. However, we should first add a test for the new functionality. Comment at: source/Commands/CommandObjectPlatform.cpp:2041 @@ -1969,3 +2040,3 @@ "A set of commands to query, launch and attach to platform processes", "platform process [attach|launch|list] ...") { Please update this as well. With this many suboptions, we can go for something like `platform process []`, as other commands do. http://reviews.llvm.org/D14952 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r253998 - Add expectedFailureFreeBSD decorators for new Python fd leak
Author: emaste Date: Tue Nov 24 12:05:56 2015 New Revision: 253998 URL: http://llvm.org/viewvc/llvm-project?rev=253998&view=rev Log: Add expectedFailureFreeBSD decorators for new Python fd leak llvm.org/pr25624 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py?rev=253998&r1=253997&r2=253998&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py Tue Nov 24 12:05:56 2015 @@ -23,12 +23,14 @@ class AvoidsFdLeakTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376") +@expectedFailureFreeBSD("llvm.org/pr25624 still failing with Python 2.7.10") @skipIfWindows # The check for descriptor leakage needs to be implemented differently here. @skipIfTargetAndroid() # Android have some other file descriptors open by the shell def test_fd_leak_basic (self): self.do_test([]) @expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376") +@expectedFailureFreeBSD("llvm.org/pr25624 still failing with Python 2.7.10") @skipIfWindows # The check for descriptor leakage needs to be implemented differently here. @skipIfTargetAndroid() # Android have some other file descriptors open by the shell def test_fd_leak_log (self): @@ -51,6 +53,7 @@ class AvoidsFdLeakTestCase(TestBase): "Process returned non-zero status. Were incorrect file descriptors passed?") @expectedFailure(python_leaky_fd_version, "bugs.freebsd.org/197376") +@expectedFailureFreeBSD("llvm.org/pr25624 still failing with Python 2.7.10") @expectedFlakeyLinux @skipIfWindows # The check for descriptor leakage needs to be implemented differently here. @skipIfTargetAndroid() # Android have some other file descriptors open by the shell ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254000 - Remove expectedFailureFreeBSD from passing ThreadExitTestCase::test_with_dwarf
Author: emaste Date: Tue Nov 24 12:22:37 2015 New Revision: 254000 URL: http://llvm.org/viewvc/llvm-project?rev=254000&view=rev Log: Remove expectedFailureFreeBSD from passing ThreadExitTestCase::test_with_dwarf This passes on my FreeBSD stable/10 desktop and my new FreeBSD 11-current buildbot (which is not yet hooked up to the buildmaster). llvm.org/pr18190 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py?rev=254000&r1=253999&r2=254000&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py Tue Nov 24 12:22:37 2015 @@ -24,7 +24,6 @@ class ThreadExitTestCase(TestBase): self.break_3 = line_number('main.cpp', '// Set third breakpoint here') self.break_4 = line_number('main.cpp', '// Set fourth breakpoint here') -@expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained @expectedFailureWindows("llvm.org/pr24681") def test(self): """Test thread exit handling.""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254001 - Remove expectedFailureFreeBSD decorator from now-passing tests
Author: emaste Date: Tue Nov 24 12:30:19 2015 New Revision: 254001 URL: http://llvm.org/viewvc/llvm-project?rev=254001&view=rev Log: Remove expectedFailureFreeBSD decorator from now-passing tests These pass on my FreeBSD stable/10 desktop and my (not-yet-connected) FreeBSD 11-CURRENT buildbot llvm.org/pr20548 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py?rev=254001&r1=254000&r2=254001&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py Tue Nov 24 12:30:19 2015 @@ -22,7 +22,6 @@ class StdIteratorDataFormatterTestCase(T self.line = line_number('main.cpp', '// Set break point at this line.') @skipIfWindows # libstdcpp not ported to Windows -@expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot @expectedFailureIcc # llvm.org/pr15301 LLDB prints incorrect sizes of STL containers def test_with_run_command(self): """Test that libstdcpp iterators format properly.""" Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py?rev=254001&r1=254000&r2=254001&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py Tue Nov 24 12:30:19 2015 @@ -24,7 +24,6 @@ class StdListDataFormatterTestCase(TestB self.final_line = line_number('main.cpp', '// Set final break point at this line.') @skipIfWindows # libstdcpp not ported to Windows -@expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py?rev=254001&r1=254000&r2=254001&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py Tue Nov 24 12:30:19 2015 @@ -22,7 +22,6 @@ class StdStringDataFormatterTestCase(Tes # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') -@expectedFailureFreeBSD("llvm.org/pr20548") # fails to build on lab.llvm.org buildbot @skipIfWindows # libstdcpp not ported to Windows def test_with_run_command(self): """Test that that file and class static variables display correctly.""" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254002 - Add expectedFlakeyFreeBSD to TestBatchMode failing on buildbot
Author: emaste Date: Tue Nov 24 12:34:17 2015 New Revision: 254002 URL: http://llvm.org/viewvc/llvm-project?rev=254002&view=rev Log: Add expectedFlakeyFreeBSD to TestBatchMode failing on buildbot This test was already expectedFlakeyLinux for occasional failures on the Linux buildbot. It seems the new FreeBSD buildbot fails the same way on occasion. llvm.org/pr25172 Modified: lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py Modified: lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py?rev=254002&r1=254001&r2=254002&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py Tue Nov 24 12:34:17 2015 @@ -15,6 +15,7 @@ class DriverBatchModeTest (TestBase): mydir = TestBase.compute_mydir(__file__) @skipIfRemote # test not remote-ready llvm.org/pr24813 +@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot") @expectedFlakeyLinux("llvm.org/pr25172") @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows") def test_driver_batch_mode(self): ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254006 - Temporarily add expectedFailureFreeBSD to tests that fail to detect Clang on FreeBSD
Author: emaste Date: Tue Nov 24 12:59:51 2015 New Revision: 254006 URL: http://llvm.org/viewvc/llvm-project?rev=254006&view=rev Log: Temporarily add expectedFailureFreeBSD to tests that fail to detect Clang on FreeBSD On FreeBSD we may get Clang via CC=cc or CC=/usr/bin/cc. llvm.org/pr25626 Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py?rev=254006&r1=254005&r2=254006&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py Tue Nov 24 12:59:51 2015 @@ -23,6 +23,7 @@ class TypedefTestCase(TestBase): @dwarf_test @expectedFailureClang("llvm.org/pr19238") +@expectedFailureFreeBSD("llvm.org/pr25626 expectedFailureClang fails on FreeBSD") def test_with_dwarf(self): """Test 'image lookup -t a' and check for correct display at different scopes.""" self.buildDwarf() Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py?rev=254006&r1=254005&r2=254006&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py Tue Nov 24 12:59:51 2015 @@ -6,6 +6,7 @@ class TestCppIncompleteTypes(TestBase): mydir = TestBase.compute_mydir(__file__) +@expectedFailureFreeBSD("llvm.org/pr25626 test executable not built correctly on FreeBSD") @skipIfGcc def test_limit_debug_info(self): self.build() ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r254006 - Temporarily add expectedFailureFreeBSD to tests that fail to detect Clang on FreeBSD
On 24 November 2015 at 13:59, Ed Maste via lldb-commits wrote: > Author: emaste > Date: Tue Nov 24 12:59:51 2015 > New Revision: 254006 > > URL: http://llvm.org/viewvc/llvm-project?rev=254006&view=rev > Log: > Temporarily add expectedFailureFreeBSD to tests that fail to detect Clang on > FreeBSD > > On FreeBSD we may get Clang via CC=cc or CC=/usr/bin/cc. I'd rather just fix this than marking it with a decorator, but I want to have the FreeBSD 11 buildbot added to the buildmaster as soon as possible. With my last few decorator updates the buildbot should be green as soon as it's added. There are four unexpected passes that will still need further investigation. [1/1] Testing LLDB (parallel execution, with a separate subprocess per test) Testing: 412 test suites, 4 threads 412 out of 412 test suites processed - TestSetWatchlocation.py Ran 412 test suites (0 failed) (0.00%) Ran 537 test cases (0 failed) (0.00%) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254022 - First implementation of swig_bot.py
Author: zturner Date: Tue Nov 24 15:35:17 2015 New Revision: 254022 URL: http://llvm.org/viewvc/llvm-project?rev=254022&view=rev Log: First implementation of swig_bot.py This version supports local generation only. It's intentionally stupid, and does not support any kind of dependency checking. If you run the script, it's going to call SWIG. While this is a slow process, we are going to combine the use of the swig bot with checked in static bindings, meaning that it won't be terribly important to only regenerate the bindings when the input files have actually changed. A side benefit of this is that the implementation is drastically simpler. This is all experimental at the moment, but it duplicates a lot of the logic currently found in prepare_bindings.py. There was not a good way to reuse some of the logic without invasive changes on that script, and since this script is still experimental, it makes sense to just copy them over, and if / when this becomes more mature, we can get rid of the other ones. Added: lldb/trunk/scripts/swig_bot.py lldb/trunk/scripts/swig_bot_lib/ lldb/trunk/scripts/swig_bot_lib/__init__.py lldb/trunk/scripts/swig_bot_lib/client.py lldb/trunk/scripts/swig_bot_lib/local.py lldb/trunk/scripts/swig_bot_lib/server.py Added: lldb/trunk/scripts/swig_bot.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot.py?rev=254022&view=auto == --- lldb/trunk/scripts/swig_bot.py (added) +++ lldb/trunk/scripts/swig_bot.py Tue Nov 24 15:35:17 2015 @@ -0,0 +1,11 @@ +#!/usr/bin/env python + +# Python modules +import sys + +# LLDB modules +import use_lldb_suite + +if __name__ == "__main__": +from swig_bot_lib import client +client.run(sys.argv[1:]) Added: lldb/trunk/scripts/swig_bot_lib/__init__.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/__init__.py?rev=254022&view=auto == (empty) Added: lldb/trunk/scripts/swig_bot_lib/client.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/client.py?rev=254022&view=auto == --- lldb/trunk/scripts/swig_bot_lib/client.py (added) +++ lldb/trunk/scripts/swig_bot_lib/client.py Tue Nov 24 15:35:17 2015 @@ -0,0 +1,108 @@ +#!/usr/bin/env python + +# Future imports +from __future__ import absolute_import +from __future__ import print_function + +# Python modules +import argparse +import logging +import os +import sys + +# LLDB modules +import use_lldb_suite +from lldbsuite.support import fs + +def process_args(args): +"""Returns options processed from the provided command line. + +@param args the command line to process. +""" + +class FindLocalSwigAction(argparse.Action): +def __init__(self, option_strings, dest, **kwargs): +super(FindLocalSwigAction, self).__init__(option_strings, dest, nargs='?', **kwargs) +def __call__(self, parser, namespace, values, option_string=None): +swig_exe = None +if values is None: +swig_exe = fs.find_executable('swig') +else: +swig_exe = values +setattr(namespace, self.dest, os.path.normpath(swig_exe)) + +# Setup the parser arguments that are accepted. +parser = argparse.ArgumentParser( +description='Generate SWIG bindings.') + +# Arguments to control logging verbosity. +parser.add_argument( +"--verbose", "-v", +action="store_true", +default=False, +help="Increase logging verbosity level.") + +parser.add_argument( +"--local", +action=FindLocalSwigAction, +dest="swig_executable", +help=( +"Run the copy of swig at the specified location, or search PATH" +"if the location is omitted")) + +parser.add_argument( +"--remote", +action="store", +help=( +"Use the given connection string to connect to a remote " +"generation service")) + +parser.add_argument( +"--src-root", +required=True, +help="The root folder of the LLDB source tree.") + +parser.add_argument( +"--target-dir", +default=os.getcwd(), +help=( +"Specifies the build dir where the language binding " +"should be placed")) + +parser.add_argument( +"--language", +dest="languages", +action="append", +help="Specifies the language to generate bindings for") + +# Process args. +options = parser.parse_args(args) + +if options.languages is None: +options.languages = ['python'] + +if options.remote is None and options.swig_executable is None: +logging.error("Must specify either --local or --remote") +sys.exit(-3) + +
[Lldb-commits] [lldb] r254024 - Make swig_bot server support Ctrl+C
Author: zturner Date: Tue Nov 24 15:35:40 2015 New Revision: 254024 URL: http://llvm.org/viewvc/llvm-project?rev=254024&view=rev Log: Make swig_bot server support Ctrl+C Modified: lldb/trunk/scripts/swig_bot.py lldb/trunk/scripts/swig_bot_lib/server.py Modified: lldb/trunk/scripts/swig_bot.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot.py?rev=254024&r1=254023&r2=254024&view=diff == --- lldb/trunk/scripts/swig_bot.py (original) +++ lldb/trunk/scripts/swig_bot.py Tue Nov 24 15:35:40 2015 @@ -57,6 +57,9 @@ if __name__ == "__main__": else: logging.error("Unknown mode specified. Expected client or server.") sys.exit(-1) +except KeyboardInterrupt as e: +logging.info("Ctrl+C received. Shutting down...") +sys.exit(-1) except Exception as e: error = traceback.format_exc() logging.error("An error occurred running swig-bot.") Modified: lldb/trunk/scripts/swig_bot_lib/server.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/server.py?rev=254024&r1=254023&r2=254024&view=diff == --- lldb/trunk/scripts/swig_bot_lib/server.py (original) +++ lldb/trunk/scripts/swig_bot_lib/server.py Tue Nov 24 15:35:40 2015 @@ -13,6 +13,7 @@ from __future__ import print_function import argparse import logging import os +import select import socket import struct import sys @@ -53,16 +54,23 @@ def initialize_listening_socket(options) def accept_once(sock, options): logging.debug("Waiting for connection...") -client, addr = sock.accept() -logging.info("Received connection from {}".format(addr)) -data_size = struct.unpack("!I", sockutil.recvall(client, 4))[0] -logging.debug("Expecting {} bytes of data from client".format(data_size)) -data = sockutil.recvall(client, data_size) -logging.info("Received {} bytes of data from client".format(len(data))) - -logging.info("Sending {} byte response".format(len(data))) -client.sendall(struct.pack("!I", len(data))) -client.sendall(data) +while True: +rlist, wlist, xlist = select.select([sock], [], [], 0.5) +if not rlist: +continue + +client, addr = sock.accept() +logging.info("Received connection from {}".format(addr)) +data_size = struct.unpack("!I", sockutil.recvall(client, 4))[0] +logging.debug("Expecting {} bytes of data from client" + .format(data_size)) +data = sockutil.recvall(client, data_size) +logging.info("Received {} bytes of data from client" + .format(len(data))) + +logging.info("Sending {} byte response".format(len(data))) +client.sendall(struct.pack("!I", len(data))) +client.sendall(data) def accept_loop(sock, options): while True: ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254026 - swig-bot - Close the socket when shutting down.
Author: zturner Date: Tue Nov 24 15:35:58 2015 New Revision: 254026 URL: http://llvm.org/viewvc/llvm-project?rev=254026&view=rev Log: swig-bot - Close the socket when shutting down. Modified: lldb/trunk/scripts/swig_bot_lib/client.py Modified: lldb/trunk/scripts/swig_bot_lib/client.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/client.py?rev=254026&r1=254025&r2=254026&view=diff == --- lldb/trunk/scripts/swig_bot_lib/client.py (original) +++ lldb/trunk/scripts/swig_bot_lib/client.py Tue Nov 24 15:35:58 2015 @@ -161,8 +161,13 @@ def run(args): else: logging.info("swig bot client using remote generation with server '{}'" .format(options.remote)) -config_json = config.generate_config_json(options) -packed_input = local.pack_archive(config_json, options) -connection = establish_remote_connection(options.remote) -response = transmit_data(connection, packed_input) -logging.debug("Received {} byte response.".format(len(response))) +connection = None +try: +config_json = config.generate_config_json(options) +packed_input = local.pack_archive(config_json, options) +connection = establish_remote_connection(options.remote) +response = transmit_data(connection, packed_input) +logging.debug("Received {} byte response.".format(len(response))) +finally: +if connection is not None: +connection.close() \ No newline at end of file ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254025 - Include config settings in the archive, and extract on the remote.
Author: zturner Date: Tue Nov 24 15:35:50 2015 New Revision: 254025 URL: http://llvm.org/viewvc/llvm-project?rev=254025&view=rev Log: Include config settings in the archive, and extract on the remote. Added: lldb/trunk/scripts/swig_bot_lib/config.py Modified: lldb/trunk/scripts/swig_bot_lib/client.py lldb/trunk/scripts/swig_bot_lib/local.py lldb/trunk/scripts/swig_bot_lib/server.py Modified: lldb/trunk/scripts/swig_bot_lib/client.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/client.py?rev=254025&r1=254024&r2=254025&view=diff == --- lldb/trunk/scripts/swig_bot_lib/client.py (original) +++ lldb/trunk/scripts/swig_bot_lib/client.py Tue Nov 24 15:35:50 2015 @@ -23,6 +23,7 @@ from lldbsuite.support import fs from lldbsuite.support import sockutil # package imports +from . import config from . import local default_ip = "127.0.0.1" @@ -151,11 +152,17 @@ def run(args): if not os.path.isfile(options.swig_executable): logging.error("Swig executable '{}' does not exist." .format(options.swig_executable)) -local.generate(options) +gen_options = local.GenOptions() +gen_options.languages = options.languages +gen_options.src_root = options.src_root +gen_options.target_dir = options.target_dir +gen_options.swig_executable = options.swig_executable +local.generate(gen_options) else: logging.info("swig bot client using remote generation with server '{}'" .format(options.remote)) -packed_input = local.pack_input(options) +config_json = config.generate_config_json(options) +packed_input = local.pack_archive(config_json, options) connection = establish_remote_connection(options.remote) response = transmit_data(connection, packed_input) logging.debug("Received {} byte response.".format(len(response))) Added: lldb/trunk/scripts/swig_bot_lib/config.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/config.py?rev=254025&view=auto == --- lldb/trunk/scripts/swig_bot_lib/config.py (added) +++ lldb/trunk/scripts/swig_bot_lib/config.py Tue Nov 24 15:35:50 2015 @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +""" +Shared functionality used by `client` and `server` when dealing with +configuration data +""" + +# Future imports +from __future__ import absolute_import +from __future__ import print_function + +# Python modules +import json +import logging +import os +import socket +import struct +import sys + +# LLDB modules +import use_lldb_suite + +# package imports +from . import local + +def generate_config_json(options): +config = {"languages": options.languages} +return json.dumps(config) + +def parse_config_json(option_json): +return json.loads(option_json) Modified: lldb/trunk/scripts/swig_bot_lib/local.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/local.py?rev=254025&r1=254024&r2=254025&view=diff == --- lldb/trunk/scripts/swig_bot_lib/local.py (original) +++ lldb/trunk/scripts/swig_bot_lib/local.py Tue Nov 24 15:35:50 2015 @@ -17,12 +17,19 @@ import logging import os import subprocess import sys +import tempfile import zipfile # LLDB modules import use_lldb_suite -def pack_input(options): +class GenOptions(object): +src_root = None +target_dir = None +languages = None +swig_executable = None + +def pack_archive(config_json, options): logging.info("Creating input file package...") zip_data = io.BytesIO() zip_file = None @@ -61,8 +68,26 @@ def pack_input(options): os.path.join(options.src_root, relative_path)) logging.info("{} -> {}".format(full_path, relative_path)) zip_file.write(full_path, relative_path) + +logging.info("(null) -> config.json") +zip_file.writestr("config.json", config_json) +zip_file.close() return zip_data.getvalue() +def unpack_archive(subfolder, archive_bytes): +tempfolder = os.path.join(tempfile.gettempdir(), subfolder) +os.makedirs(tempfolder, exist_ok=True) + +tempfolder = tempfile.mkdtemp(dir=tempfolder) +logging.debug("Extracting archive to {}".format(tempfolder)) + +zip_data = io.BytesIO(archive_bytes) +logging.debug("Opening zip archive...") +zip_file = zipfile.ZipFile(zip_data, mode='r') +zip_file.extractall(tempfolder) +zip_file.close() +return tempfolder + def generate(options): include_folder = os.path.join(options.src_root, "include") in_file = os.path.join(options.src_root, "scripts", "lldb.swig") Modified: lldb/trunk/scripts/swig_bot_lib/server.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_
[Lldb-commits] [lldb] r254023 - swig_bot remote path connection / preliminary implementation.
Author: zturner Date: Tue Nov 24 15:35:32 2015 New Revision: 254023 URL: http://llvm.org/viewvc/llvm-project?rev=254023&view=rev Log: swig_bot remote path connection / preliminary implementation. With this patch, the client will package up all the required inputs into a compressed zip file, establish a connection to the server, send the input to the server, and wait for the server to send a response (in this case the response is just echoed back to the client). This gets the network communication in place, and in a subsequent patch I will follow up with the code that actually runs swig on the server and sends back the output instead of echoing back the input. Added: lldb/trunk/packages/Python/lldbsuite/support/sockutil.py Modified: lldb/trunk/scripts/swig_bot.py lldb/trunk/scripts/swig_bot_lib/client.py lldb/trunk/scripts/swig_bot_lib/local.py lldb/trunk/scripts/swig_bot_lib/server.py Added: lldb/trunk/packages/Python/lldbsuite/support/sockutil.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/support/sockutil.py?rev=254023&view=auto == --- lldb/trunk/packages/Python/lldbsuite/support/sockutil.py (added) +++ lldb/trunk/packages/Python/lldbsuite/support/sockutil.py Tue Nov 24 15:35:32 2015 @@ -0,0 +1,23 @@ +""" + The LLVM Compiler Infrastructure + +This file is distributed under the University of Illinois Open Source +License. See LICENSE.TXT for details. + +Helper functions for working with sockets. +""" + +# Python modules: +import io +import socket + +# LLDB modules +import use_lldb_suite + +def recvall(sock, size): +bytes = io.BytesIO() +while size > 0: +this_result = sock.recv(size) +bytes.write(this_result) +size -= len(this_result) +return bytes.getvalue() Modified: lldb/trunk/scripts/swig_bot.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot.py?rev=254023&r1=254022&r2=254023&view=diff == --- lldb/trunk/scripts/swig_bot.py (original) +++ lldb/trunk/scripts/swig_bot.py Tue Nov 24 15:35:32 2015 @@ -1,11 +1,63 @@ #!/usr/bin/env python +""" +SWIG generation top-level script. Supports both local and remote generation +of SWIG bindings for multiple languages. +""" + # Python modules +import argparse +import logging import sys +import traceback # LLDB modules import use_lldb_suite +def process_args(args): +parser = argparse.ArgumentParser( +description='Run swig-bot client or server.') + +# Arguments to control whether swig-bot runs as a client or server. +parser.add_argument( +"--mode", +required=True, +choices=["client", "server"], +help="Run swig_bot in either client or server mode.") + +# Arguments to control logging verbosity. +parser.add_argument( +"--verbose", "-v", +action="store_true", +default=False, +help="Increase logging verbosity level.") + +(options, remaining) = parser.parse_known_args(args) +# Set logging level. +if options.verbose: +log_level = logging.DEBUG +else: +log_level = logging.NOTSET +logging.basicConfig(level=log_level) +logging.info("logging is using level: %d", log_level) + +return (options, remaining) + if __name__ == "__main__": -from swig_bot_lib import client -client.run(sys.argv[1:]) +(options, remaining) = process_args(sys.argv[1:]) +try: +if options.mode == "client": +logging.info("Running swig_bot in client mode") +from swig_bot_lib import client +client.run(remaining) +elif options.mode == "server": +logging.info("Running swig_bot in server mode") +from swig_bot_lib import server +server.run(remaining) +else: +logging.error("Unknown mode specified. Expected client or server.") +sys.exit(-1) +except Exception as e: +error = traceback.format_exc() +logging.error("An error occurred running swig-bot.") +logging.error(error) Modified: lldb/trunk/scripts/swig_bot_lib/client.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/swig_bot_lib/client.py?rev=254023&r1=254022&r2=254023&view=diff == --- lldb/trunk/scripts/swig_bot_lib/client.py (original) +++ lldb/trunk/scripts/swig_bot_lib/client.py Tue Nov 24 15:35:32 2015 @@ -1,5 +1,10 @@ #!/usr/bin/env python +""" +SWIG generation client. Supports both local and remote generation of SWIG +bindings for multiple languages. +""" + # Future imports from __future__ import absolute_import from __future__ import print_function @@ -8,11 +13,20 @@ from __future__ import print_function import argparse import logging import os +import socket +import
[Lldb-commits] [lldb] r254033 - Fix build after swig_bot_lib changes.
Author: zturner Date: Tue Nov 24 16:27:02 2015 New Revision: 254033 URL: http://llvm.org/viewvc/llvm-project?rev=254033&view=rev Log: Fix build after swig_bot_lib changes. Modified: lldb/trunk/scripts/prepare_bindings.py Modified: lldb/trunk/scripts/prepare_bindings.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/prepare_bindings.py?rev=254033&r1=254032&r2=254033&view=diff == --- lldb/trunk/scripts/prepare_bindings.py (original) +++ lldb/trunk/scripts/prepare_bindings.py Tue Nov 24 16:27:02 2015 @@ -77,7 +77,7 @@ def prepare_all_bindings(options): if os.path.isdir(os.path.join(scripts_dir, f))] # Remove directories that do not represent script languages. -for removal_dir in [".svn", "interface", "__pycache__", "sphinx"]: +for removal_dir in [".svn", "interface", "__pycache__", "sphinx", "swig_bot_lib"]: if removal_dir in child_dirs: child_dirs.remove(removal_dir) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r254037 - Another hack to fix the build bot.
Author: zturner Date: Tue Nov 24 17:11:54 2015 New Revision: 254037 URL: http://llvm.org/viewvc/llvm-project?rev=254037&view=rev Log: Another hack to fix the build bot. This script really should not be assuming every subdirectory is a language directory for swig generation. Using a hack to get this working for now, but this should be solved once this script is re-written similar to how prepare_bindings was. Modified: lldb/trunk/scripts/finishSwigWrapperClasses.py Modified: lldb/trunk/scripts/finishSwigWrapperClasses.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/finishSwigWrapperClasses.py?rev=254037&r1=254036&r2=254037&view=diff == --- lldb/trunk/scripts/finishSwigWrapperClasses.py (original) +++ lldb/trunk/scripts/finishSwigWrapperClasses.py Tue Nov 24 17:11:54 2015 @@ -275,7 +275,7 @@ def run_post_process_for_each_script_sup # Iterate script directory find any script language directories for scriptLang in listDirs: # __pycache__ is a magic directory in Python 3 that holds .pyc files -if scriptLang != "__pycache__": +if scriptLang != "__pycache__" and scriptLang != "swig_bot_lib": dbg.dump_text("Executing language script for \'%s\'" % scriptLang) nResult, strStatusMsg = run_post_process(scriptLang, strFinishFileName, vDictArgs) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D14904: Document NetBSD platform support on the webpage
krytarowski removed rL LLVM as the repository for this revision. krytarowski updated this revision to Diff 41102. krytarowski added a comment. Readd accidently removed section. http://reviews.llvm.org/D14904 Files: www/build.html www/download.html www/index.html www/status.html www/test.html Index: www/test.html === --- www/test.html +++ www/test.html @@ -42,6 +42,8 @@ > ninja check-lldb Note that multiple -A and -C flags can be specified to LLDB_TEST_USER_ARGS. +Note that on NetBSD you must export LD_LIBRARY_PATH=$PWD/lib in your environment. This is due to lack of + the $ORIGIN linker feature. In addition to running all the LLDB test suites with the "check-lldb" CMake target above, it is possible to run individual LLDB tests. For example, to run the test cases defined in TestInferiorCrashing.py, run: Index: www/status.html === --- www/status.html +++ www/status.html @@ -48,7 +48,7 @@ The table below shows a summary of the features that are available on several platforms. In addition to Linux and Mac OS X, LLDB is also - known to work on FreeBSD. Windows support is under development. + known to work on FreeBSD. Windows and NetBSD support is under development. Feature Index: www/index.html === --- www/index.html +++ www/index.html @@ -117,6 +117,7 @@ On Mac OS X with Xcode On Linux and FreeBSD (with clang and libstdc++/libc++) +On NetBSD (with GCC and clang and libstdc++/libc++) On Windows with VS 2012 or higher using CMake See the LLDB Build Page for platform-specific build instructions. Index: www/download.html === --- www/download.html +++ www/download.html @@ -25,6 +25,11 @@ Debian and Ubuntu: http://llvm.org/apt/";>llvm.org/apt + The http://pkgsrc.org";>pkgsrc framework offers a package with recent LLDB in the http://pkgsrc.org/wip";>wip repository: + + cd pkgsrc/wip/lldb-git + make install clean + Index: www/build.html === --- www/build.html +++ www/build.html @@ -35,6 +35,8 @@ http://lab.llvm.org:8011/builders/lldb-x86_64-freebsd";>LLDB FreeBSD x86_64 (CMake) + http://lab.llvm.org:8011/builders/lldb-amd64-ninja-netbsd7";>LLDB NetBSD-7.0 amd64 (GCC 4.8.5, Ninja) + @@ -44,7 +46,7 @@ Building LLDB on Windows Building LLDB on Mac OSX -Building LLDB on Linux and FreeBSD +Building LLDB on Linux, FreeBSD and NetBSD @@ -165,9 +167,9 @@ - Building LLDB on Linux and FreeBSD + Building LLDB on Linux, FreeBSD and NetBSD -This document describes the steps needed to compile LLDB on most Linux systems, and FreeBSD. +This document describes the steps needed to compile LLDB on most Linux systems, FreeBSD and NetBSD. Preliminaries @@ -192,6 +194,10 @@ or the GCC port or package. + On NetBSD the base system GCC and libstdc++ are used to build LLDB, + Clang/LLVM and libc++ should also work. + + In addition to any dependencies required by LLVM and Clang, LLDB needs a few development packages that may also need to be installed depending on your system. The current list of dependencies are: @@ -209,6 +215,8 @@ > sudo apt-get build-dep lldb-3.3 # or lldb-3.4 On FreeBSD one might run: > pkg install swig python +On NetBSD one might run: +> pkgin install swig python27 cmake ninja-build If you wish to build the optional reference documentation, additional dependencies are required: Graphviz (for the 'dot' tool). @@ -348,6 +356,11 @@ outside the command line application, the PYTHONPATH environment variable can be used to let the Python interpreter find the lldb module. + + Current stable NetBSD release doesn't ship with libpanel(3), therefore it's required to disable curses(3) support with + the -DLLDB_DISABLE_CURSES:BOOL=TRUE option. To make sure check if /usr/include/panel.h exists in your + system. + The correct path can be obtained
Re: [Lldb-commits] [Diffusion] rL248048: Added support for resolving symbolic links to FileSpec.
dawn accepted this commit. dawn added a comment. Not really an acceptance, but the test that started failing as a result of this commit (LaunchInTerminalTestCase.test_launch_in_terminal) has been XFAILed o OSX in svn.252699 thanks to Todd Fiala. None the less, it would be a good idea to investigate why this commit caused the test to start failing. Users: spyffe (Author) dawn (Auditor) http://reviews.llvm.org/rL248048 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits