-
Notifications
You must be signed in to change notification settings - Fork 62
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
PoC: Redirect program output/input to separate window #112
base: master
Are you sure you want to change the base?
Conversation
f8c7213
to
41519df
Compare
Updated solution to use portable functions. Also not sure if I found the best place to open ptty |
In the case of errors occurring when creating the window, you should not return |
@aolo2 Since you tried making something similar, can you review this commit? |
41519df
to
48f8daf
Compare
Didn't work with UILabelCreate, used UICodeInsertContent |
This approach (i.e. create your own pts) makes much more sense than what I did (the reverse, try to get the pts of a real terminal). Can't test right now, but I don't think this handles input, which is what most people want the terminal for. |
I think this window would work better as a separate plugin. Here is the general documentation for making plugins: https://github.com/nakst/gf#plugins In commit 2746442 I have added the following features:
UIMessage ReceiveMessageRegister(void (*callback)(char *input)); It returns the message code you should pass to
strcat_s(initialGDBCommand, sizeof(initialGDBCommand) - 1, "...\n") This is where you should append your
void InterfaceWindow.config(const char *key, const char *value); It will match key-value pairs in the section corresponding to the interface window name. So, key-value pairs in the Once you have made this plugin, I will link to it in the README.md. |
This is pretty much the same as the Log window, but it is implemented via the gdb tty command and pseudo tty, so you don't have to change your code for it to work.
The window name can be changed)