[Lldb-commits] [lldb] r238411 - Fix breakpoint setting in gdb remote test cases on arm

Tamas Berghammer tberghammer at google.com
Thu May 28 03:55:01 PDT 2015


Author: tberghammer
Date: Thu May 28 05:55:01 2015
New Revision: 238411

URL: http://llvm.org/viewvc/llvm-project?rev=238411&view=rev
Log:
Fix breakpoint setting in gdb remote test cases on arm

Modified:
    lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py
    lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py

Modified: lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py?rev=238411&r1=238410&r2=238411&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py Thu May 28 05:55:01 2015
@@ -1204,8 +1204,11 @@ class LldbGdbServerTestCase(gdbremote_te
         function_address = int(context.get("function_address"), 16)
 
         # Set the breakpoint.
-        # Note this might need to be switched per platform (ARM, mips, etc.).
-        BREAKPOINT_KIND = 1
+        if self.getArchitecture() == "arm":
+            # TODO: Handle case when setting breakpoint in thumb code
+            BREAKPOINT_KIND = 4
+        else:
+            BREAKPOINT_KIND = 1
         self.reset_test_sequence()
         self.add_set_breakpoint_packets(function_address, do_continue=True, breakpoint_kind=BREAKPOINT_KIND)
 

Modified: lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py?rev=238411&r1=238410&r2=238411&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py (original)
+++ lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py Thu May 28 05:55:01 2015
@@ -1218,8 +1218,11 @@ class GdbRemoteTestCaseBase(TestBase):
         g_c2_address = int(context.get("g_c2_address"), 16)
 
         # Set a breakpoint at the given address.
-        # Note this might need to be switched per platform (ARM, mips, etc.).
-        BREAKPOINT_KIND = 1
+        if self.getArchitecture() == "arm":
+            # TODO: Handle case when setting breakpoint in thumb code
+            BREAKPOINT_KIND = 4
+        else:
+            BREAKPOINT_KIND = 1
         self.reset_test_sequence()
         self.add_set_breakpoint_packets(function_address, do_continue=True, breakpoint_kind=BREAKPOINT_KIND)
         context = self.expect_gdbremote_sequence()





More information about the lldb-commits mailing list