[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to run gdbserver and gdb in two different windows?
From: |
jenia.ivlev |
Subject: |
Re: How to run gdbserver and gdb in two different windows? |
Date: |
Fri, 26 Dec 2014 15:01:49 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Anatoly Varakin
<address@hidden> writes:
> Hi Jenia,
>
> Please find my comment at
> https://stackoverflow.com/questions/1628204/how-to-run-a-command-in-background-using-ssh-and-detach-the-session/26296408#26296408
> .
>
> Regards,
> Anatoly Varakin
>
> -----Original Message-----
> From: address@hidden [mailto:address@hidden On Behalf Of jenia.ivlev
> Sent: Monday, December 22, 2014 2:46 AM
> To: address@hidden
> Subject: How to run gdbserver and gdb in two different windows?
>
> Hello.
> How do I write a script for screen that will do the following:
>
> 1. create two screen windows (ctrl-c).
> 2. execute the following command in the first screeen session:
> gdbserver port:1234 editor text-input-for-editor 3. execute the second
> command in the second screen session:
> gdn editor
>
> Can someone please give me an example?
>
> Thanks in advance for your kind help.
>
>
> _______________________________________________
> screen-users mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/screen-users
Thanks a lot Anatoly.
I can't get it to work the way I want to.
So let me say exactly what I want to do.
I want to write a bash script that will:
1. I'm in screen right now.
2. I want to create a new window with a shell. if I had to
press it on the keyboard it would be `C-a c`
3. I want to start a program in that window
4. I want to be able to nagivate to that window, from the first screen
window by pressing `C-a "` and up/down and enter.
How do I achieve this?
1. I tried:
/usr/bin/screen -S gdbserver gdbserver port:1234 editor
This simply run the process in the current window without even renaming
it.
2. I tried:
/usr/bin/screen -dmS gdbserver gdbserver port:1234 editor
This runs a process somewhere in the background. I need it to be in this
screen session. I want to be able to navigate to it if I need to.
So again, how do I simply run screen (from the shell) and tell it to
create a new window, in the screen session where I
am right now, and run a program in that newly created window?
Thanks in advance for your kind help and time
Jenia