Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get/set command line arguments in SBLaunchInfo #35

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

roccoblues
Copy link
Contributor

This enables us to set cli arguments of the debugged process with set_arguments() and retrieve an iterator over them with arguments().

One unexpected thing I noticed is that target.launch(lauch_info) does not persist the launch info in the target. But this seems to be a "feature" of the C++ API. Eg.

let target = debugger.create_target(executable, None, None, false)?;
let launch_info = SBLaunchInfo::new();
launch_info.set_launch_flags(LaunchFlags::STOP_AT_ENTRY);
target.launch(launch_info)?;

// target.get_launch_info().launch_flags() <-- this is different from above
let target = debugger.create_target(executable, None, None, false)?;
let launch_info = SBLaunchInfo::new();
launch_info.set_launch_flags(LaunchFlags::STOP_AT_ENTRY);
target.set_launch_info(launch_info.clone());
target.launch(launch_info)?;

// target.get_launch_info().launch_flags() <-- now it matches

@waywardmonkeys waywardmonkeys merged commit 8f88492 into endoli:main Apr 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants