mbox series

[v2,0/2] Quality of life patches for qemu coroutine debugging

Message ID 20201217155436.927320-1-mlevitsk@redhat.com (mailing list archive)
Headers show
Series Quality of life patches for qemu coroutine debugging | expand

Message

Maxim Levitsky Dec. 17, 2020, 3:54 p.m. UTC
These are two patches that improve a bit the qemu gdb scripts in regard to
coroutines.

First patch fixes a bug in 'qemu coroutine' in regard to usage on non topmost
stack frame.

Second patch implements 'qemu bt' as Stefan suggested.

V2, because after hitting 'send' I noticed a few bugs:
   1. Switch to try/catch around bt, so that when regular bt fails, we
      print the same message as original bt.
   2. Print the correct co-routine address

Best regards,
        Maxim Levitsky

Maxim Levitsky (2):
  scripts/gdb: fix 'qemu coroutine' when users selects a non topmost
    stack frame
  scripts/gdb: implement 'qemu bt'

 scripts/qemu-gdb.py          |  1 +
 scripts/qemugdb/coroutine.py | 35 ++++++++++++++++++++++++++++++++++-
 2 files changed, 35 insertions(+), 1 deletion(-)

Comments

Maxim Levitsky Jan. 7, 2021, 10:24 a.m. UTC | #1
On Thu, 2020-12-17 at 17:54 +0200, Maxim Levitsky wrote:
> These are two patches that improve a bit the qemu gdb scripts in regard to
> coroutines.
> 
> First patch fixes a bug in 'qemu coroutine' in regard to usage on non topmost
> stack frame.
> 
> Second patch implements 'qemu bt' as Stefan suggested.
> 
> V2, because after hitting 'send' I noticed a few bugs:
>    1. Switch to try/catch around bt, so that when regular bt fails, we
>       print the same message as original bt.
>    2. Print the correct co-routine address
> 
> Best regards,
>         Maxim Levitsky
> 
> Maxim Levitsky (2):
>   scripts/gdb: fix 'qemu coroutine' when users selects a non topmost
>     stack frame
>   scripts/gdb: implement 'qemu bt'
> 
>  scripts/qemu-gdb.py          |  1 +
>  scripts/qemugdb/coroutine.py | 35 ++++++++++++++++++++++++++++++++++-
>  2 files changed, 35 insertions(+), 1 deletion(-)
> 
> -- 
> 2.26.2
> 
> 
> 
Any update on this?
Best regards,
	Maxim Levitsky
Paolo Bonzini Jan. 7, 2021, 6:05 p.m. UTC | #2
On 07/01/21 11:24, Maxim Levitsky wrote:
> On Thu, 2020-12-17 at 17:54 +0200, Maxim Levitsky wrote:
>> These are two patches that improve a bit the qemu gdb scripts in regard to
>> coroutines.
>>
>> First patch fixes a bug in 'qemu coroutine' in regard to usage on non topmost
>> stack frame.
>>
>> Second patch implements 'qemu bt' as Stefan suggested.
>>
>> V2, because after hitting 'send' I noticed a few bugs:
>>     1. Switch to try/catch around bt, so that when regular bt fails, we
>>        print the same message as original bt.
>>     2. Print the correct co-routine address
>>
>> Best regards,
>>          Maxim Levitsky
>>
>> Maxim Levitsky (2):
>>    scripts/gdb: fix 'qemu coroutine' when users selects a non topmost
>>      stack frame
>>    scripts/gdb: implement 'qemu bt'
>>
>>   scripts/qemu-gdb.py          |  1 +
>>   scripts/qemugdb/coroutine.py | 35 ++++++++++++++++++++++++++++++++++-
>>   2 files changed, 35 insertions(+), 1 deletion(-)
>>
>> -- 
>> 2.26.2
>>
>>
>>
> Any update on this?
> Best regards,
> 	Maxim Levitsky
> 
> 

I'll queue them myself, thanks.

Paolo
Maxim Levitsky Jan. 7, 2021, 6:07 p.m. UTC | #3
On Thu, 2021-01-07 at 19:05 +0100, Paolo Bonzini wrote:
> On 07/01/21 11:24, Maxim Levitsky wrote:
> > On Thu, 2020-12-17 at 17:54 +0200, Maxim Levitsky wrote:
> > > These are two patches that improve a bit the qemu gdb scripts in regard to
> > > coroutines.
> > > 
> > > First patch fixes a bug in 'qemu coroutine' in regard to usage on non topmost
> > > stack frame.
> > > 
> > > Second patch implements 'qemu bt' as Stefan suggested.
> > > 
> > > V2, because after hitting 'send' I noticed a few bugs:
> > >     1. Switch to try/catch around bt, so that when regular bt fails, we
> > >        print the same message as original bt.
Note that I forgot to 'git add' this bit, but it is only a cosmetic thing,
so I'll guess I'll just leave it like that.

> > >     2. Print the correct co-routine address
> > > 
> > > Best regards,
> > >          Maxim Levitsky
> > > 
> > > Maxim Levitsky (2):
> > >    scripts/gdb: fix 'qemu coroutine' when users selects a non topmost
> > >      stack frame
> > >    scripts/gdb: implement 'qemu bt'
> > > 
> > >   scripts/qemu-gdb.py          |  1 +
> > >   scripts/qemugdb/coroutine.py | 35 ++++++++++++++++++++++++++++++++++-
> > >   2 files changed, 35 insertions(+), 1 deletion(-)
> > > 
> > > -- 
> > > 2.26.2
> > > 
> > > 
> > > 
> > Any update on this?
> > Best regards,
> > 	Maxim Levitsky
> > 
> > 
> 
> I'll queue them myself, thanks.

Thanks!

Best regards,
	Maxim Levitsky
> 
> Paolo
>