How to pass arguments to mac terminal in llldb mode

96 views Asked by At

I'am developing an mac app.I need to open the terminal and execute lldb command. I've found the solution:Open a terminal window to a specified folder from a Cocoa app. However,i need to pass more arguments to the opened terminal after entering lldb mode. so i'm confused about there is any way that my app can communication with the terminal?

for example:

Firstly, i open a terminal and enter in lldb mode.

NSAppleScript *as = [[NSAppleScript alloc] initWithSource: @"tell application \"Terminal\" to do script \"lldb\""];
NSDictionary *errors = nil;
[as executeAndReturnError:&errors];
if (errors) {
    NSLog(@"start lldb error: %@", errors);
}

Then i want to pass lldb command to the opened terminal, like process connect connect://xxxx. But i can't find any way to make it.

0

There are 0 answers