Skip to content

Commit c309e16

Browse files
JDevliegherememfrob
authored andcommitted
[lldb] Use target.GetLaunchInfo() instead of creating an empty one.
Update tests that were creating an empty LaunchInfo instead of using the one coming from the target. This ensures target properties are honored.
1 parent 86c443d commit c309e16

File tree

12 files changed

+13
-12
lines changed

12 files changed

+13
-12
lines changed

lldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def frame_disassemble_test(self):
4141
# environment variables, add them using SetArguments or
4242
# SetEnvironmentEntries
4343

44-
launch_info = lldb.SBLaunchInfo(None)
44+
launch_info = target.GetLaunchInfo()
4545
process = target.Launch(launch_info, error)
4646
self.assertTrue(process, PROCESS_IS_VALID)
4747

lldb/test/API/commands/frame/language/TestGuessLanguage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def do_test(self):
5353
# environment variables, add them using SetArguments or
5454
# SetEnvironmentEntries
5555

56-
launch_info = lldb.SBLaunchInfo(None)
56+
launch_info = target.GetLaunchInfo()
5757
process = target.Launch(launch_info, error)
5858
self.assertTrue(process, PROCESS_IS_VALID)
5959

lldb/test/API/commands/frame/var/TestFrameVar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def do_test(self):
4242
# environment variables, add them using SetArguments or
4343
# SetEnvironmentEntries
4444

45-
launch_info = lldb.SBLaunchInfo(None)
45+
launch_info = target.GetLaunchInfo()
4646
process = target.Launch(launch_info, error)
4747
self.assertTrue(process, PROCESS_IS_VALID)
4848

lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_target_auto_install_main_executable(self):
6666

6767
# Disable the auto install.
6868
self.runCmd("settings set target.auto-install-main-executable false")
69-
self.expect("settings show target.auto-install-main-executable",
69+
self.expect("settings show target.auto-install-main-executable",
7070
substrs=["target.auto-install-main-executable (boolean) = false"])
7171

7272
self.runCmd("platform select %s"%configuration.lldb_platform_name)
@@ -80,7 +80,7 @@ def test_target_auto_install_main_executable(self):
8080
target = new_debugger.GetSelectedTarget()
8181
breakpoint = target.BreakpointCreateByName("main")
8282

83-
launch_info = lldb.SBLaunchInfo(None)
83+
launch_info = taget.GetLaunchInfo()
8484
error = lldb.SBError()
8585
process = target.Launch(launch_info, error)
8686
self.assertTrue(process, PROCESS_IS_VALID)

lldb/test/API/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def address_breakpoints(self):
5656
launch_info = lldb.SBLaunchInfo(None)
5757
flags = launch_info.GetLaunchFlags()
5858
flags &= ~lldb.eLaunchFlagDisableASLR
59+
flags &= lldb.eLaunchFlagInheritTCCFromParent
5960
launch_info.SetLaunchFlags(flags)
6061

6162
error = lldb.SBError()

lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def make_target_and_bkpt(self, additional_options=None, num_expected_loc=1,
4646

4747
def launch_it (self, expected_state):
4848
error = lldb.SBError()
49-
launch_info = lldb.SBLaunchInfo(None)
49+
launch_info = self.target.GetLaunchInfo()
5050
launch_info.SetWorkingDirectory(self.get_process_working_directory())
5151

5252
process = self.target.Launch(launch_info, error)

lldb/test/API/functionalities/signal/TestSendSignal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_with_run_command(self):
4747
VALID_BREAKPOINT_LOCATION)
4848

4949
# Now launch the process, no arguments & do not stop at entry point.
50-
launch_info = lldb.SBLaunchInfo([exe])
50+
launch_info = target.GetLaunchInfo()
5151
launch_info.SetWorkingDirectory(self.get_process_working_directory())
5252

5353
process_listener = lldb.SBListener("signal_test_listener")

lldb/test/API/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def do_test(self):
3131
VALID_BREAKPOINT)
3232

3333
error = lldb.SBError()
34-
launch_info = lldb.SBLaunchInfo(None)
34+
launch_info = target.GetLaunchInfo()
3535
process = target.Launch(launch_info, error)
3636
self.assertTrue(process, PROCESS_IS_VALID)
3737

lldb/test/API/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def prepare_thread(self):
2929
VALID_BREAKPOINT)
3030

3131
error = lldb.SBError()
32-
launch_info = lldb.SBLaunchInfo(None)
32+
launch_info = target.GetLaunchInfo()
3333
process = target.Launch(launch_info, error)
3434
self.assertTrue(process, PROCESS_IS_VALID)
3535

lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_with_python_api(self):
2323
target = self.dbg.CreateTarget(exe)
2424
self.assertTrue(target, VALID_TARGET)
2525

26-
launch_info = lldb.SBLaunchInfo(None)
26+
launch_info = target.GetLaunchInfo()
2727
error = lldb.SBError()
2828
self.dbg.SetAsync(True)
2929
process = target.Launch(launch_info, error)

0 commit comments

Comments
 (0)