summaryrefslogtreecommitdiffstats
path: root/lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2014-08-12 17:02:07 +0000
committerTodd Fiala <todd.fiala@gmail.com>2014-08-12 17:02:07 +0000
commit58a2f6692bc3d140d2308549f5c0b96e72c0a034 (patch)
tree15889695196839cd13e19b4ff87c4ac017855896 /lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py
parent09d84addb77e7ddf6a430ea79174ec123e9d3581 (diff)
downloadbcm5719-llvm-58a2f6692bc3d140d2308549f5c0b96e72c0a034.tar.gz
bcm5719-llvm-58a2f6692bc3d140d2308549f5c0b96e72c0a034.zip
llgs: corrected Linux signal reception notification for SIGABRT, SIGSEGV and their ilk.
Added llgs/debugserver gdb-remote tests around SIGABRT and SIGSEGV signal reception notification. Found a few bugs in exception signal handling in Linux llgs. Fixed those. llvm-svn: 215458
Diffstat (limited to 'lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py')
-rw-r--r--lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py b/lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py
index 15aca47d046..afc03c8e367 100644
--- a/lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py
+++ b/lldb/test/tools/lldb-gdbserver/gdbremote_testcase.py
@@ -284,11 +284,12 @@ class GdbRemoteTestCaseBase(TestBase):
raise Exception("failed to create a socket to the launched debug monitor after %d tries" % attempts)
- def launch_process_for_attach(self,inferior_args=None, sleep_seconds=3):
+ def launch_process_for_attach(self,inferior_args=None, sleep_seconds=3, exe_path=None):
# We're going to start a child process that the debug monitor stub can later attach to.
# This process needs to be started so that it just hangs around for a while. We'll
# have it sleep.
- exe_path = os.path.abspath("a.out")
+ if not exe_path:
+ exe_path = os.path.abspath("a.out")
args = [exe_path]
if inferior_args:
@@ -298,7 +299,7 @@ class GdbRemoteTestCaseBase(TestBase):
return subprocess.Popen(args)
- def prep_debug_monitor_and_inferior(self, inferior_args=None, inferior_sleep_seconds=3):
+ def prep_debug_monitor_and_inferior(self, inferior_args=None, inferior_sleep_seconds=3, inferior_exe_path=None):
"""Prep the debug monitor, the inferior, and the expected packet stream.
Handle the separate cases of using the debug monitor in attach-to-inferior mode
@@ -323,7 +324,7 @@ class GdbRemoteTestCaseBase(TestBase):
if self._inferior_startup == self._STARTUP_ATTACH or self._inferior_startup == self._STARTUP_ATTACH_MANUALLY:
# Launch the process that we'll use as the inferior.
- inferior = self.launch_process_for_attach(inferior_args=inferior_args, sleep_seconds=inferior_sleep_seconds)
+ inferior = self.launch_process_for_attach(inferior_args=inferior_args, sleep_seconds=inferior_sleep_seconds, exe_path=inferior_exe_path)
self.assertIsNotNone(inferior)
self.assertTrue(inferior.pid > 0)
if self._inferior_startup == self._STARTUP_ATTACH:
@@ -336,7 +337,9 @@ class GdbRemoteTestCaseBase(TestBase):
if self._inferior_startup == self._STARTUP_LAUNCH:
# Build launch args
- launch_args = [os.path.abspath('a.out')]
+ if not inferior_exe_path:
+ inferior_exe_path = os.path.abspath("a.out")
+ launch_args = [inferior_exe_path]
if inferior_args:
launch_args.extend(inferior_args)
OpenPOWER on IntegriCloud