MI testsuite improvements

Andrew Cagney cagney@gnu.org
Mon Feb 21 02:12:00 GMT 2005


Bob Rossi wrote:
> On Fri, Feb 18, 2005 at 02:27:24PM -0500, Alain Magloire wrote:
> 
>>>>Ok.  Wonder if it should be ``set/show tty'', "tty ..." just a wrapper.
>>>
>>>Ok, I'm going to implement this before even thinking about anything
>>>else. Do you care what file the -mi-tty command's go in? or should I
>>>create a new file?
>>>
>>>Also, is there an easy way to use the set/show internally to GDB? This
>>>way, as you suggessted, there will be 3 ways to access the inferior's
>>>tty device name.
>>>
>>>   - through the MI commands
>>>   - through the set/show
>>>   - and you can only set the tty through the 'tty' console command
>>>     there is no way to get the name. This should probably be
>>>     depricated ...
>>>
>>>Internally, they should all use the same data, so, is there an
>>>interface to modify the set/show value internally to GDB?
>>>
>>
>>Bob,
>>  I did not see the original of your proposal, so ..
>>Am I correct to assume that the "show" tty will print the master side
>>and not the slave or vice versa ...
>>Meaning the frontends are interested in the other side of the pipe
>>not the tty given by gdb to the inferior.
> 
> 
> Hi Alain,
> 
> There are 2 different ideas being suggested, 
>    - To create an mi command, that does the same thing as the console
>      'tty' command, and each of these internally can be wrappers around
>      some data that can be accessed with GDB's set/show mechanism. For
>      example,
>         -mi-set-tty /dev/pts/1 (mi command)
>         tty /dev/pts/1         (console command)
>         set tty /dev/pts/1     (set command)

and I belive:
	set tty
I need to confirm it but it appears that there's an ``optional 
filename'' class of variable (grep for filename_completer in the sources).

If the last is implemented, an existing MI command should already let 
you set/show the variable.

>    - The second idea was to have GDB internally create a pty. That would
>      result in a master and slave side. Neither of these are important,
>      AFAIK, only the slavename (file name of the terminal created, 
>      ie. /dev/pts/1) is important. For example, here is what could
>      happen
>       1. The user asks GDB to open a new pty and the name is given back
>       -mi-create-pty
>       /dev/pts/1
>       2. The user asks GDB to use that pty for the inferior
>       -mi-set-tty /dev/pts/1
>       3. The user opens /dev/pts/1 in there own program to read the
>       output of the inferior.
>       4. The user asks GDB to close the device
>       -mi-destroy-pty /dev/pts/1
> 
> Either way, it will probably be a while before I have time to work on
> the second task, since I'm already swamped trying to validate the MI
> testsuite with a syntax checker and changing the grammar to match
> what GDB actually outputs.

Andrew



More information about the Gdb-patches mailing list