Index: packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py +++ packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py @@ -1153,6 +1153,13 @@ # Get current target architecture target_arch = self.getArchitecture() + # In ppc64le, this function will be entered by its local entry point. + # Its offset, relative to the global entry point, is encoded in the + # 'other' field of the ELF function symbol, but for simple + # binaries/functions it's almost always 2 instructions (8 bytes) + if target_arch == "powerpc64le": + function_address = function_address + 8 + # Set the breakpoint. if (target_arch == "arm") or (target_arch == "aarch64"): # TODO: Handle case when setting breakpoint in thumb code Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py =================================================================== --- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py +++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py @@ -1502,6 +1502,15 @@ self.assertIsNotNone(context.get("function_address")) function_address = int(context.get("function_address"), 16) + arch = self.getArchitecture() + + # In ppc64le, this function will be entered by its local entry point. + # Its offset, relative to the global entry point, is encoded in the + # 'other' field of the ELF function symbol, but for simple + # binaries/functions it's almost always 2 instructions (8 bytes) + if arch == "powerpc64le": + function_address = function_address + 8 + # Grab the data addresses. self.assertIsNotNone(context.get("g_c1_address")) g_c1_address = int(context.get("g_c1_address"), 16) @@ -1564,7 +1573,6 @@ step_instruction=step_instruction) self.assertTrue(state_reached) expected_step_count = 1 - arch = self.getArchitecture() # MIPS required "3" (ADDIU, SB, LD) machine instructions for updation # of variable value