mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-09 14:26:09 +00:00

*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
59 lines
2.0 KiB
Python
59 lines
2.0 KiB
Python
from __future__ import print_function
|
|
|
|
|
|
import gdbremote_testcase
|
|
import lldbgdbserverutils
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
class TestGdbRemoteKill(gdbremote_testcase.GdbRemoteTestCaseBase):
|
|
|
|
mydir = TestBase.compute_mydir(__file__)
|
|
|
|
def attach_commandline_kill_after_initial_stop(self):
|
|
procs = self.prep_debug_monitor_and_inferior()
|
|
self.test_sequence.add_log_lines([
|
|
"read packet: $k#6b",
|
|
{"direction": "send", "regex": r"^\$X[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"},
|
|
], True)
|
|
|
|
if self.stub_sends_two_stop_notifications_on_kill:
|
|
# Add an expectation for a second X result for stubs that send two
|
|
# of these.
|
|
self.test_sequence.add_log_lines([
|
|
{"direction": "send", "regex": r"^\$X[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"},
|
|
], True)
|
|
|
|
self.expect_gdbremote_sequence()
|
|
|
|
# Wait a moment for completed and now-detached inferior process to
|
|
# clear.
|
|
time.sleep(1)
|
|
|
|
if not lldb.remote_platform:
|
|
# Process should be dead now. Reap results.
|
|
poll_result = procs["inferior"].poll()
|
|
self.assertIsNotNone(poll_result)
|
|
|
|
# Where possible, verify at the system level that the process is not
|
|
# running.
|
|
self.assertFalse(
|
|
lldbgdbserverutils.process_is_running(
|
|
procs["inferior"].pid, False))
|
|
|
|
@debugserver_test
|
|
def test_attach_commandline_kill_after_initial_stop_debugserver(self):
|
|
self.init_debugserver_test()
|
|
self.build()
|
|
self.set_inferior_startup_attach()
|
|
self.attach_commandline_kill_after_initial_stop()
|
|
|
|
@llgs_test
|
|
def test_attach_commandline_kill_after_initial_stop_llgs(self):
|
|
self.init_llgs_test()
|
|
self.build()
|
|
self.set_inferior_startup_attach()
|
|
self.attach_commandline_kill_after_initial_stop()
|