qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 2/5] gdbstub: gdb pass-through qemu monitor supp


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH 2/5] gdbstub: gdb pass-through qemu monitor support
Date: Fri, 23 May 2008 17:33:11 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080226)

Jason Wessel wrote:
> Jan Kiszka wrote:
>> Jason Wessel wrote:
>>   
>>> Jan Kiszka wrote:
>>>     
>>>> Jason Wessel wrote:
>>>>   
>>>>       
>>>>> Maxim Gorbachyov wrote:
>>>>>     
>>>>>         
>>>>>> On Mon, May 19, 2008 at 5:29 PM, Jason Wessel
>>>>>> <address@hidden> wrote:
>>>>>>
>>>>>> [cut]
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> Seems reasonable too, see newly attached patch.
>>>>>>>
>>>>>>> Obviously you need the new monitor patch applied prior to this one.
>>>>>>> This patch was updated against the prior patch.
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>> It was noticed [by Jan Kiszka and me] that the output on the monitor
>>>>>> console goes both to the local as well as the remote one - but only if
>>>>>> you issue a command via gdb. When you type in the command locally (ie.
>>>>>> on the qemu side), that output is not forwarded to the gdb frontend.
>>>>>> Is this behavior desired?
>>>>>>
>>>>>>
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> That was certainly the intended behavior when I created the patch. 
>>>>> There is no reason to feed the monitor output up to the debugger that
>>>>> may or may not be attached.
>>>>>     
>>>>>         
>>>> That's not what we were confused by.
>>>>
>>>>   
>>>>       
>>>>>  The behavior could get altered to check if
>>>>> the debugger is in the "continue" state and then send the information
>>>>> from the monitor, but it seemed of little value to do so.
>>>>>     
>>>>>         
>>>> Rather the contrary: What is the point of mirroring the output you see
>>>> in gdb to the local monitor console?
>>>>
>>>>   
>>>>       
>>> That happens to have little to do with the gdb implementation.  It is a
>>> function of the monitor mux.  The monitor mux always writes out to all
>>> the output channels automatically.   In the case of gdb sending input
>>> for which you only want to receive the response it would be plausible to
>>> add a "focus" parameter to the monitor mux code to indicate which
>>> "channel" to send the output to.
>>>
>>> The monitor mux could also be changed to simply shift the output focus
>>> to the most recent place it received an input, and if the focus was -1
>>> to start it would broadcast every where, the way it does today.  It is a
>>> trivial enough change, if this is what you are looking for.
>>>     
>> Yep, would be nice.
>>
>> Jan
>>
>>   
> 
> Jan,
> 
> See the newly attached patches which address the problem you raised.  I
> removed the monitor broadcast code entirely and replaced it with the
> "mon_active" because it is not likely that there will ever be two
> exactly concurrent users of the qemu monitor.  You either use it from
> one place or another at a time.
> 
> Apply in order:
> gdb_single_step_monitor_cmd.patch
> gdb_monitor_plus_qemu_monitor.patch

Thanks, work nicely here!

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]