Re: [Lldb-commits] [lldb] r283849 - Add a second, more complicated, arm64 example program to
On Mon, Oct 10, 2016 at 8:53 PM Jason Molenda via lldb-commits < lldb-commits@lists.llvm.org> wrote: > Author: jmolenda > > Date: Mon Oct 10 22:44:48 2016 > > New Revision: 283849 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=283849&view=rev > > Log: > > Add a second, more complicated, arm64 example program to > > the arm64 assembly unwind tests. > > > > Modified: > > > lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp > > > > Modified: > lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp > > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp?rev=283849&r1=283848&r2=283849&view=diff > > > == > > --- > lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp > (original) > > +++ > lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp > Mon Oct 10 22:44:48 2016 > > @@ -56,7 +56,7 @@ static void terminate() { > >EmulateInstructionARM64::Terminate(); > > } > > > > -TEST_F(TestArm64InstEmulation, TestSimpleFunction) { > > +TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) { > > > >init(); > > > > @@ -64,16 +64,14 @@ TEST_F(TestArm64InstEmulation, TestSimpl > >UnwindAssemblyInstEmulation *engine = > >static_cast( > >UnwindAssemblyInstEmulation::CreateInstance(arch)); > > - EXPECT_TRUE(engine != nullptr); > > - if (engine == nullptr) > > -return; > > + ASSERT_NE(engine, nullptr); > I know I'm annoying, but nullptr should come first for the error message. :) BTW don't feel obligated to fix everything I point out, just throwing these things out there as minor nits. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283849 - Add a second, more complicated, arm64 example program to
Author: jmolenda Date: Mon Oct 10 22:44:48 2016 New Revision: 283849 URL: http://llvm.org/viewvc/llvm-project?rev=283849&view=rev Log: Add a second, more complicated, arm64 example program to the arm64 assembly unwind tests. Modified: lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp Modified: lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp?rev=283849&r1=283848&r2=283849&view=diff == --- lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp (original) +++ lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp Mon Oct 10 22:44:48 2016 @@ -56,7 +56,7 @@ static void terminate() { EmulateInstructionARM64::Terminate(); } -TEST_F(TestArm64InstEmulation, TestSimpleFunction) { +TEST_F(TestArm64InstEmulation, TestSimpleDarwinFunction) { init(); @@ -64,16 +64,14 @@ TEST_F(TestArm64InstEmulation, TestSimpl UnwindAssemblyInstEmulation *engine = static_cast( UnwindAssemblyInstEmulation::CreateInstance(arch)); - EXPECT_TRUE(engine != nullptr); - if (engine == nullptr) -return; + ASSERT_NE(engine, nullptr); UnwindPlan::RowSP row_sp; AddressRange sample_range; UnwindPlan unwind_plan(eRegisterKindLLDB); UnwindPlan::Row::RegisterLocation regloc; - // 'int main() { }' compiled for arm64-apple-macosx with clang + // 'int main() { }' compiled for arm64-apple-ios with clang uint8_t data[] = { 0xfd, 0x7b, 0xbf, 0xa9, // 0xa9bf7bfd : stp x29, x30, [sp, #-0x10]! 0xfd, 0x03, 0x00, 0x91, // 0x910003fd : mov x29, sp @@ -92,12 +90,6 @@ TEST_F(TestArm64InstEmulation, TestSimpl // row[2]: 16: CFA=sp+16 => fp=[CFA-16] lr=[CFA-8] // row[3]: 20: CFA=sp +0 => fp= lr= - // But this is missing the setup of the frame pointer register (x29) and - // restore of the same. This is a bug in the instruction profiler -- - // it won't work if we have a stack frame with a variable length array, or - // an alloca style call where the stack frame size is not fixed. We need - // to recognize the setup of the frame pointer register. - sample_range = AddressRange(0x1000, sizeof(data)); EXPECT_TRUE(engine->GetNonCallSiteUnwindPlanFromAssembly( @@ -164,3 +156,169 @@ TEST_F(TestArm64InstEmulation, TestSimpl terminate(); } + +TEST_F(TestArm64InstEmulation, TestMediumDarwinFunction) { + init(); + + ArchSpec arch("arm64-apple-ios10", nullptr); + UnwindAssemblyInstEmulation *engine = + static_cast( + UnwindAssemblyInstEmulation::CreateInstance(arch)); + ASSERT_NE(engine, nullptr); + + UnwindPlan::RowSP row_sp; + AddressRange sample_range; + UnwindPlan unwind_plan(eRegisterKindLLDB); + UnwindPlan::Row::RegisterLocation regloc; + + // disassembly of -[NSPlaceholderString initWithBytes:length:encoding:] + // from Foundation for iOS. + uint8_t data[] = { + 0xf6, 0x57, 0xbd, 0xa9, // 0: 0xa9bd57f6 stp x22, x21, [sp, #-48]! + 0xf4, 0x4f, 0x01, 0xa9, // 4: 0xa9014ff4 stp x20, x19, [sp, #16] + 0xfd, 0x7b, 0x02, 0xa9, // 8: 0xa9027bfd stp x29, x30, [sp, #32] + 0xfd, 0x83, 0x00, 0x91, // 12: 0x910083fd add x29, sp, #32 + 0xff, 0x43, 0x00, 0xd1, // 16: 0xd10043ff sub sp, sp, #16 + + // [... function body ...] + 0x1f, 0x20, 0x03, 0xd5, // 20: 0xd503201f nop + + 0xbf, 0x83, 0x00, 0xd1, // 24: 0xd10083bf sub sp, x29, #32 + 0xfd, 0x7b, 0x42, 0xa9, // 28: 0xa9427bfd ldp x29, x30, [sp, #32] + 0xf4, 0x4f, 0x41, 0xa9, // 32: 0xa9414ff4 ldp x20, x19, [sp, #16] + 0xf6, 0x57, 0xc3, 0xa8, // 36: 0xa8c357f6 ldp x22, x21, [sp], #48 + 0x01, 0x16, 0x09, 0x14, // 40: 0x14091601 b 0x18f640524 ; symbol stub + // for: CFStringCreateWithBytes + }; + + // UnwindPlan we expect: + // 0: CFA=sp +0 => + // 4: CFA=sp+48 => x21=[CFA-40] x22=[CFA-48] + // 8: CFA=sp+48 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48] + // 12: CFA=sp+48 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48] + // fp=[CFA-16] lr=[CFA-8] + // 16: CFA=fp+16 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48] + // fp=[CFA-16] lr=[CFA-8] + + // [... function body ...] + + // 28: CFA=sp+48 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48] + // fp=[CFA-16] lr=[CFA-8] + // 32: CFA=sp+48 => x19=[CFA-24] x20=[CFA-32] x21=[CFA-40] x22=[CFA-48] fp= + // lr= + // 36: CFA=sp+48 => x19= x20= x21=[CFA-40] x22=[CFA-48] fp= + // lr= + // 40: CFA=sp +0 => x19= x20= x21= x22= fp= + // lr= + + sample_range = AddressRange(0x1000, sizeof(data)); + + EXPECT_TRUE(engine->GetNonCallSiteUnwindPlanFromAssembly( + sample_range, data, sizeof(data), unwind_plan)); + + // 0: CFA=sp +0 => + row_sp = unwind_plan.GetRowForFunctionOffset(0); + EXPECT_EQ(0, row_sp->GetOffs
Re: [Lldb-commits] [lldb] r283847 - Add a first unit test for the arm64 instruction profiled unwind
On Mon, Oct 10, 2016 at 7:33 PM Jason Molenda via lldb-commits < lldb-commits@lists.llvm.org> wrote: > > +if (process_sp->GetTarget().ReadMemory( > > +range.GetBaseAddress(), prefer_file_cache, > function_text.data(), > > +range.GetByteSize(), error) != range.GetByteSize()) { > > + return false; > > +} > > + } > > + return GetNonCallSiteUnwindPlanFromAssembly( > > + range, function_text.data(), function_text.size(), unwind_plan); > > +} > > + > > +bool UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly( > > +AddressRange &range, uint8_t *opcode_data, size_t opcode_size, > > +UnwindPlan &unwind_plan) { > If you pass a MutableArrayRef the code is a bit safer, since llvm will assert if you try to index out of bounds, rather than allowing you to silently access the invalid memory. > > > >bool > > + GetNonCallSiteUnwindPlanFromAssembly(lldb_private::AddressRange &func, > > + uint8_t *opcode_data, size_t > opcode_size, > > + lldb_private::UnwindPlan > &unwind_plan); > > + > > + bool > Same here. > >AugmentUnwindPlanFromCallSite(lldb_private::AddressRange &func, > > lldb_private::Thread &thread, > > lldb_private::UnwindPlan &unwind_plan) > override; > > @@ -67,8 +72,8 @@ private: > >UnwindAssemblyInstEmulation(const lldb_private::ArchSpec &arch, > >lldb_private::EmulateInstruction > *inst_emulator) > >: UnwindAssembly(arch), m_inst_emulator_ap(inst_emulator), > > -m_range_ptr(NULL), m_thread_ptr(NULL), m_unwind_plan_ptr(NULL), > > -m_curr_row(), m_cfa_reg_info(), m_fp_is_cfa(false), > m_register_values(), > > +m_range_ptr(NULL), m_unwind_plan_ptr(NULL), m_curr_row(), > > +m_cfa_reg_info(), m_fp_is_cfa(false), m_register_values(), > > m_pushed_regs(), m_curr_row_modified(false), > > m_forward_branch_offset(0) { > Should we initialize these inline at the point of declaration rather than in the initializer list? It makes the constructor code a little less verbose. > > +TEST_F(TestArm64InstEmulation, TestSimpleFunction) { > > + > > + init(); > > + > > + ArchSpec arch("arm64-apple-ios10", nullptr); > > + UnwindAssemblyInstEmulation *engine = > > + static_cast( > > + UnwindAssemblyInstEmulation::CreateInstance(arch)); > > + EXPECT_TRUE(engine != nullptr); > > + if (engine == nullptr) > > +return; > Use ASSERT_NE(nullptr, engine); If it is nullptr, the macro will return automatically for you. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283847 - Add a first unit test for the arm64 instruction profiled unwind
Author: jmolenda Date: Mon Oct 10 21:24:00 2016 New Revision: 283847 URL: http://llvm.org/viewvc/llvm-project?rev=283847&view=rev Log: Add a first unit test for the arm64 instruction profiled unwind plan generator. Fix a small bug in EmulateInstructionARM64::GetFramePointerRegister which was returning the stack pointer reg instead of fp, prevented the unwinder from recognizing the switch to using the fp in a function. () Add a new eContextRestoreStackPointer context hint so that the arm64 emulator can flag when the frame pointer value is copied back in to the stack pointer and that should be used to compute the canonical frame address again in an epilogue sequence. () Small changes to UnwindAssemblyInstEmulation to have a method we can call without a live process/thread/etc for unit tests. Added: lldb/trunk/unittests/UnwindAssembly/InstEmulation/ lldb/trunk/unittests/UnwindAssembly/InstEmulation/CMakeLists.txt lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp Modified: lldb/trunk/include/lldb/Core/EmulateInstruction.h lldb/trunk/lldb.xcodeproj/project.pbxproj lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h lldb/trunk/unittests/UnwindAssembly/CMakeLists.txt Modified: lldb/trunk/include/lldb/Core/EmulateInstruction.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/EmulateInstruction.h?rev=283847&r1=283846&r2=283847&view=diff == --- lldb/trunk/include/lldb/Core/EmulateInstruction.h (original) +++ lldb/trunk/include/lldb/Core/EmulateInstruction.h Mon Oct 10 21:24:00 2016 @@ -111,6 +111,10 @@ public: // Adjust the frame pointer for the current frame eContextSetFramePointer, +// Typically in an epilogue sequence. Copy the frame pointer back +// into the stack pointer, use SP for CFA calculations again. +eContextRestoreStackPointer, + // Add or subtract a value from a base address register (other than SP) eContextAdjustBaseRegister, Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=283847&r1=283846&r2=283847&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Mon Oct 10 21:24:00 2016 @@ -916,6 +916,7 @@ AF20F76A1AF18F9000751A6E /* ABISysV_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F7681AF18F9000751A6E /* ABISysV_arm64.cpp */; }; AF20F7701AF1902900751A6E /* RegisterContextLinux_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F76E1AF1902900751A6E /* RegisterContextLinux_arm64.cpp */; }; AF23B4DB19009C66003E2A58 /* FreeBSDSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */; }; + AF248A4D1DA71C77000B814D /* TestArm64InstEmulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF248A4C1DA71C77000B814D /* TestArm64InstEmulation.cpp */; }; AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */; }; AF25AB26188F685C0030DEC3 /* AppleGetQueuesHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF25AB24188F685C0030DEC3 /* AppleGetQueuesHandler.cpp */; }; AF26703A1852D01E00B6CC36 /* Queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2670381852D01E00B6CC36 /* Queue.cpp */; }; @@ -2922,6 +2923,7 @@ AF20F76F1AF1902900751A6E /* RegisterContextLinux_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_arm64.h; path = Utility/RegisterContextLinux_arm64.h; sourceTree = ""; }; AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FreeBSDSignals.cpp; path = Utility/FreeBSDSignals.cpp; sourceTree = ""; }; AF23B4DA19009C66003E2A58 /* FreeBSDSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FreeBSDSignals.h; path = Utility/FreeBSDSignals.h; sourceTree = ""; }; + AF248A4C1DA71C77000B814D /* TestArm64InstEmulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestArm64InstEmulation.cpp; path = UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp; sourceTree = ""; }; AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */ = {isa = PBXFileRe
[Lldb-commits] [lldb] r283843 - Fixing the bug number for darwin on this failure.
Author: jingham Date: Mon Oct 10 20:53:43 2016 New Revision: 283843 URL: http://llvm.org/viewvc/llvm-project?rev=283843&view=rev Log: Fixing the bug number for darwin on this failure. Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py?rev=283843&r1=283842&r2=283843&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py Mon Oct 10 20:53:43 2016 @@ -56,7 +56,9 @@ class StaticVariableTestCase(TestBase): VARIABLES_DISPLAYED_CORRECTLY, startstr="(int) A::g_points[1].x = 11") -@expectedFailureDarwin(9980907) +@expectedFailureAll( +oslist=lldbplatformutil.getDarwinOSTriples(), +bugnumber="") @expectedFailureAll( compiler=[ "clang", ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283835 - This test was failing because /bin/ls is no longer debuggable on OS X.
Author: jingham Date: Mon Oct 10 19:35:41 2016 New Revision: 283835 URL: http://llvm.org/viewvc/llvm-project?rev=283835&view=rev Log: This test was failing because /bin/ls is no longer debuggable on OS X. Add an executable that we can debug. Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile?rev=283835&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/Makefile Mon Oct 10 19:35:41 2016 @@ -0,0 +1,5 @@ +LEVEL = ../../make + +C_SOURCES := main.c + +include $(LEVEL)/Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py?rev=283835&r1=283834&r2=283835&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py Mon Oct 10 19:35:41 2016 @@ -22,7 +22,6 @@ class LaunchInTerminalTestCase(TestBase) # a program in a separate terminal window. It would be great if other platforms # added support for this. @skipUnlessDarwin -@expectedFailureDarwin("llvm.org/pr25484") # If the test is being run under sudo, the spawned terminal won't retain that elevated # privilege so it can't open the socket to talk back to the test case @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid() @@ -35,13 +34,16 @@ class LaunchInTerminalTestCase(TestBase) "test must be run on local system") @no_debug_info_test def test_launch_in_terminal(self): -exe = "/bin/ls" +self.build() +exe = os.path.join(os.getcwd(), "a.out") + target = self.dbg.CreateTarget(exe) launch_info = lldb.SBLaunchInfo(["-lAF", "/tmp/"]) launch_info.SetLaunchFlags( lldb.eLaunchFlagLaunchInTTY | lldb.eLaunchFlagCloseTTYOnExit) error = lldb.SBError() process = target.Launch(launch_info, error) +print("Error was: %s."%(error.GetCString())) self.assertTrue( error.Success(), "Make sure launch happened successfully in a terminal window") Added: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c?rev=283835&view=auto == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c (added) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/main.c Mon Oct 10 19:35:41 2016 @@ -0,0 +1,10 @@ +#include + +int +main(int argc, char** argv) +{ + for (int i = 0; i < argc; i++) { +printf("%d: %s.\n", i, argv[i]); + } + return 0; +} ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283821 - Adding radar number on our end for llvm.org/pr15824.
Author: jingham Date: Mon Oct 10 18:31:36 2016 New Revision: 283821 URL: http://llvm.org/viewvc/llvm-project?rev=283821&view=rev Log: Adding radar number on our end for llvm.org/pr15824. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py?rev=283821&r1=283820&r2=283821&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py Mon Oct 10 18:31:36 2016 @@ -23,7 +23,7 @@ class ThreadStateTestCase(TestBase): bugnumber="llvm.org/pr15824 thread states not properly maintained") @expectedFailureAll( oslist=lldbplatformutil.getDarwinOSTriples(), -bugnumber="llvm.org/pr15824 thread states not properly maintained") +bugnumber="llvm.org/pr15824 thread states not properly maintained and ") @expectedFailureAll( oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained") @@ -64,7 +64,7 @@ class ThreadStateTestCase(TestBase): self.process_interrupt_test() # thread states not properly maintained -@unittest2.expectedFailure("llvm.org/pr15824") +@unittest2.expectedFailure("llvm.org/pr15824 and ") @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283820 - Add the related radar on our end for llvm.org/pr15824.
Author: jingham Date: Mon Oct 10 18:29:01 2016 New Revision: 283820 URL: http://llvm.org/viewvc/llvm-project?rev=283820&view=rev Log: Add the related radar on our end for llvm.org/pr15824. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py?rev=283820&r1=283819&r2=283820&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py Mon Oct 10 18:29:01 2016 @@ -28,7 +28,7 @@ class MultipleBreakpointTestCase(TestBas bugnumber="llvm.org/pr15824 thread states not properly maintained") @expectedFailureAll( oslist=lldbplatformutil.getDarwinOSTriples(), -bugnumber="llvm.org/pr15824 thread states not properly maintained") +bugnumber="llvm.org/pr15824 thread states not properly maintained and ") @expectedFailureAll( oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283813 - Add the radar number on our end.
Author: jingham Date: Mon Oct 10 17:21:47 2016 New Revision: 283813 URL: http://llvm.org/viewvc/llvm-project?rev=283813&view=rev Log: Add the radar number on our end. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py?rev=283813&r1=283812&r2=283813&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py Mon Oct 10 17:21:47 2016 @@ -110,7 +110,7 @@ class WatchpointPythonCommandTestCase(Te @skipIfFreeBSD # timing out on buildbot @expectedFailureAll( -bugnumber="llvm.org/pr28055: continue in watchpoint commands disables the watchpoint") +bugnumber="llvm.org/pr28055: continue in watchpoint commands disables the watchpoint, ") @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D24603: [LLDB][MIPS] fix Floating point register read/write for big endian
clayborg added a comment. Commit anytime. https://reviews.llvm.org/D24603 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] LLVM buildmaster will be updated and restarted tonight
Hello everyone, LLVM buildmaster will be updated and restarted after 6 PM Pacific time today. Thanks Galina ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25179: [lldb] Improve identification of Linux core dumps. Fix for bug #30485.
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. Use "llvm::StringRef::contains". See inline comment. Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1408-1409 llvm::StringRef path(cstr); - if (path.startswith("/lib/x86_64-linux-gnu") || - path.startswith("/lib/i386-linux-gnu")) { + if (path.find("/lib/x86_64-linux-gnu") != llvm::StringRef::npos || + path.find("/lib/i386-linux-gnu") != llvm::StringRef::npos) { arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux); I believe Zach Turner added a "contains" function to StringRef which we should use here: ``` if (path.contains("/lib/x86_64-linux-gnu") || path.contains("/lib/i386-linux-gnu")) { ``` https://reviews.llvm.org/D25179 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283739 - [LLDB][MIPS] All tests get errors in dotest after this test.
Author: nitesh.jain Date: Mon Oct 10 05:47:53 2016 New Revision: 283739 URL: http://llvm.org/viewvc/llvm-project?rev=283739&view=rev Log: [LLDB][MIPS] All tests get errors in dotest after this test. Subscribers: jaydeep, bhushan, slthakur, llvm-commits Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py?rev=283739&r1=283738&r2=283739&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py Mon Oct 10 05:47:53 2016 @@ -27,11 +27,13 @@ class LinuxCoreTestCase(TestBase): _s390x_regions = 2 @skipIf(oslist=['windows']) +@skipIf(triple='^mips') def test_i386(self): """Test that lldb can read the process information from an i386 linux core file.""" self.do_test("i386", self._i386_pid, self._i386_regions) @skipIf(oslist=['windows']) +@skipIf(triple='^mips') def test_x86_64(self): """Test that lldb can read the process information from an x86_64 linux core file.""" self.do_test("x86_64", self._x86_64_pid, self._x86_64_regions) @@ -39,11 +41,13 @@ class LinuxCoreTestCase(TestBase): # This seems to hang on non-s390x platforms for some reason. Disabling # for now. @skipIf(archs=no_match(['s390x'])) +@skipIf(triple='^mips') def test_s390x(self): """Test that lldb can read the process information from an s390x linux core file.""" self.do_test("s390x", self._s390x_pid, self._s390x_regions) @skipIf(oslist=['windows']) +@skipIf(triple='^mips') def test_same_pid_running(self): """Test that we read the information from the core correctly even if we have a running process with the same PID around""" @@ -72,6 +76,7 @@ class LinuxCoreTestCase(TestBase): self.RemoveTempFile("x86_64-pid.core") @skipIf(oslist=['windows']) +@skipIf(triple='^mips') def test_two_cores_same_pid(self): """Test that we handle the situation if we have two core files with the same PID around""" Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py?rev=283739&r1=283738&r2=283739&view=diff == --- lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py Mon Oct 10 05:47:53 2016 @@ -23,6 +23,7 @@ class Disassemble_VST1_64(TestBase): "llvm.org/pr24575: all tests get ERRORs in dotest.py after this") @add_test_categories(['pyapi']) @no_debug_info_test +@skipIf(triple='^mips') def test_disassemble_invalid_vst_1_64_raw_data(self): """Test disassembling invalid vst1.64 raw bytes with the API.""" # Create a target from the debugger. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283732 - [LLDB][MIPS] Skip some test case which were causing LLDB to go into infinite loop
Author: nitesh.jain Date: Mon Oct 10 05:02:09 2016 New Revision: 283732 URL: http://llvm.org/viewvc/llvm-project?rev=283732&view=rev Log: [LLDB][MIPS] Skip some test case which were causing LLDB to go into infinite loop Reviewers: clayborg, labath Subscribers: jaydeep, bhushan, slthakur, llvm-commits Differential Revision: https://reviews.llvm.org/D24549 Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/TestConcurrentBreakpointDelayBreakpointOneSignal.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/TestConcurrentBreakpointOneDelayBreakpointThreads.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/TestConcurrentCrashWithBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/TestConcurrentCrashWithSignal.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/TestConcurrentDelaySignalBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/TestConcurrentDelayedCrashWithBreakpointSignal.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/TestConcurrentManyBreakpoints.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/TestConcurrentManyCrash.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/TestConcurrentManySignals.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/TestConcurrentSignalBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/TestConcurrentSignalDelayBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/TestConcurrentTwoBreakpointThreads.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/TestConcurrentTwoBreakpointsOneDelaySignal.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/TestConcurrentTwoBreakpointsOneSignal.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/
[Lldb-commits] [PATCH] D25021: [LLDB][MIPS] Fix qProcessInfo to return correct pointer size based on ELF ABI
nitesh.jain added a comment. Hi Greg, Please could you find some time to review this ? Thanks https://reviews.llvm.org/D25021 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D24603: [LLDB][MIPS] fix Floating point register read/write for big endian
nitesh.jain added a comment. Hi Greg, The diff is update as per suggestion so should I commit this ? Thanks https://reviews.llvm.org/D24603 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r283729 - [LLDB][MIPS] Fix TestReturnValue failure for MIPS
Author: nitesh.jain Date: Mon Oct 10 04:16:20 2016 New Revision: 283729 URL: http://llvm.org/viewvc/llvm-project?rev=283729&view=rev Log: [LLDB][MIPS] Fix TestReturnValue failure for MIPS Reviewers: clayborg, labath, bhushan Subscribers: jaydeep, slthakur, llvm-commits Differential Revision: https://reviews.llvm.org/D24498 Modified: lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp Modified: lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp?rev=283729&r1=283728&r2=283729&view=diff == --- lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp (original) +++ lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp Mon Oct 10 04:16:20 2016 @@ -923,23 +923,26 @@ ValueObjectSP ABISysV_mips64::GetReturnV target->GetArchitecture().GetAddressByteSize()); RegisterValue r2_value, r3_value, f0_value, f1_value, f2_value; + // Tracks how much bytes of r2 and r3 registers we've consumed so far + uint32_t integer_bytes = 0; - uint32_t integer_bytes = 0; // Tracks how much bytes of r2 and r3 - // registers we've consumed so far - bool use_fp_regs = 0; // True if return values are in FP return registers. - bool found_non_fp_field = - 0; // True if we found any non floating point field in structure. - bool use_r2 = 0; // True if return values are in r2 register. - bool use_r3 = 0; // True if return values are in r3 register. - bool sucess = 0; // True if the result is copied into our data buffer + // True if return values are in FP return registers. + bool use_fp_regs = 0; + // True if we found any non floating point field in structure. + bool found_non_fp_field = 0; + // True if return values are in r2 register. + bool use_r2 = 0; + // True if return values are in r3 register. + bool use_r3 = 0; + // True if the result is copied into our data buffer + bool sucess = 0; std::string name; bool is_complex; uint32_t count; const uint32_t num_children = return_compiler_type.GetNumFields(); // A structure consisting of one or two FP values (and nothing else) will - // be - // returned in the two FP return-value registers i.e fp0 and fp2. + // be returned in the two FP return-value registers i.e fp0 and fp2. if (num_children <= 2) { uint64_t field_bit_offset = 0; @@ -967,7 +970,6 @@ ValueObjectSP ABISysV_mips64::GetReturnV reg_ctx->ReadRegister(f2_info, f2_value); f0_value.GetData(f0_data); - f2_value.GetData(f2_data); for (uint32_t idx = 0; idx < num_children; idx++) { CompilerType field_compiler_type = @@ -977,30 +979,40 @@ ValueObjectSP ABISysV_mips64::GetReturnV field_compiler_type.GetByteSize(nullptr); DataExtractor *copy_from_extractor = nullptr; +uint64_t return_value[2]; +offset_t offset = 0; if (idx == 0) { - if (field_byte_width == 16) // This case is for long double type. - { + // This case is for long double type. + if (field_byte_width == 16) { + // If structure contains long double type, then it is returned // in fp0/fp1 registers. -reg_ctx->ReadRegister(f1_info, f1_value); -f1_value.GetData(f1_data); - if (target_byte_order == eByteOrderLittle) { - f0_data.Append(f1_data); - copy_from_extractor = &f0_data; + return_value[0] = f0_data.GetU64(&offset); + reg_ctx->ReadRegister(f1_info, f1_value); + f1_value.GetData(f1_data); + offset = 0; + return_value[1] = f1_data.GetU64(&offset); } else { - f1_data.Append(f0_data); - copy_from_extractor = &f1_data; + return_value[1] = f0_data.GetU64(&offset); + reg_ctx->ReadRegister(f1_info, f1_value); + f1_value.GetData(f1_data); + offset = 0; + return_value[0] = f1_data.GetU64(&offset); } - } else -copy_from_extractor = &f0_data; // This is in f0, copy from -// register to our result -// structure -} else - copy_from_extractor = &f2_data; // This is in f2, copy from + +f0_data.SetData(return_value, field_byte_width, +target_byte_order); + } + copy_from_extractor = &f0_data; /
[Lldb-commits] [lldb] r283728 - [LLDB][MIPS] Fix register read/write for 32 bit big endian system
Author: nitesh.jain Date: Mon Oct 10 04:02:41 2016 New Revision: 283728 URL: http://llvm.org/viewvc/llvm-project?rev=283728&view=rev Log: [LLDB][MIPS] Fix register read/write for 32 bit big endian system Reviewers: clayborg, labath Subscribers: jaydeep, bhushan, mohit.bhakkad, slthakur, llvm-commits Differential Revision: https://reviews.llvm.org/D24124 Modified: lldb/trunk/source/Core/RegisterValue.cpp lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp Modified: lldb/trunk/source/Core/RegisterValue.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RegisterValue.cpp?rev=283728&r1=283727&r2=283728&view=diff == --- lldb/trunk/source/Core/RegisterValue.cpp (original) +++ lldb/trunk/source/Core/RegisterValue.cpp Mon Oct 10 04:02:41 2016 @@ -633,8 +633,11 @@ uint64_t RegisterValue::GetAsUInt64(uint default: break; case 1: + return *(const uint8_t *)buffer.bytes; case 2: + return *(const uint16_t *)buffer.bytes; case 4: + return *(const uint32_t *)buffer.bytes; case 8: return *(const uint64_t *)buffer.bytes; } Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp?rev=283728&r1=283727&r2=283728&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp Mon Oct 10 04:02:41 2016 @@ -169,7 +169,7 @@ Error NativeRegisterContextLinux::DoRead if (error.Success()) // First cast to an unsigned of the same size to avoid sign extension. -value.SetUInt64(static_cast(data)); +value.SetUInt(static_cast(data), size); if (log) log->Printf("NativeRegisterContextLinux::%s() reg %s: 0x%lx", __FUNCTION__, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits