How to debug vm without heartbeat interrupting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to debug vm without heartbeat interrupting

melkyades
 
I want to debug asm instruction per instruction with gdb, but the heartbeat keeps interrupting. Is there a way to disable it or make gdb ignore it in some way?

Cheers,
Javier

--
Lic. Javier Pimás
Ciudad de Buenos Aires
Reply | Threaded
Open this post in threaded view
|

Re: How to debug vm without heartbeat interrupting

Eliot Miranda-2
 


On Wed, Feb 15, 2012 at 4:40 AM, Javier Pimás <[hidden email]> wrote:
 
I want to debug asm instruction per instruction with gdb, but the heartbeat keeps interrupting. Is there a way to disable it or make gdb ignore it in some way?

Yes, at two levels.  First, signals, via

handle SIGUSR1 nostop noprint noignore
handle SIGUSR2 nostop noprint noignore
handle SIGALRM nostop noprint noignore
handle SIGPOLL nostop noprint noignore
handle SIGPIPE nostop noprint noignore

etc.  This can and should be put in ~/.gdbinit (find mine attached; note its called gdbinit only because I can't attach .gdbinit; you need to rename it when you install it; pbreg prints my Bochs instance in the JIT simulator; feel free to delete that :) )


Second, to avoid the effect that the heartbeat has on control flow (e.g. causing a process switch) you can set suppressHeartbeatFlag to 1 via

(gdb) set var suppressHeartbeatFlag = 1

HTH
Eliot


Cheers,
Javier

--
Lic. Javier Pimás
Ciudad de Buenos Aires


gdbinit (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to debug vm without heartbeat interrupting

Eliot Miranda-2
In reply to this post by melkyades
 
(oops, let me reply again; there are *three* ways :) )

On Wed, Feb 15, 2012 at 4:40 AM, Javier Pimás <[hidden email]> wrote:
 
I want to debug asm instruction per instruction with gdb, but the heartbeat keeps interrupting. Is there a way to disable it or make gdb ignore it in some way?

Yes, at three levels.  First, signals, via

handle SIGUSR1 nostop noprint noignore
handle SIGUSR2 nostop noprint noignore
handle SIGALRM nostop noprint noignore
handle SIGPOLL nostop noprint noignore
handle SIGPIPE nostop noprint noignore

etc.  This can and should be put in ~/.gdbinit (find mine attached; note its called gdbinit only because I can't attach .gdbinit; you need to rename it when you install it; pbreg prints my Bochs instance in the JIT simulator; feel free to delete that :) )


Second, to avoid the effect that the heartbeat has on control flow (e.g. causing a process switch) you can set suppressHeartbeatFlag to 1, while running via

(gdb) set var suppressHeartbeatFlag = 1

or from start-up via the -noheartbeat flag, e.g.

(gdb) run -noheartbeat myimage.image

HTH
Eliot
 
Cheers,
Javier

--
Lic. Javier Pimás
Ciudad de Buenos Aires
Reply | Threaded
Open this post in threaded view
|

Re: How to debug vm without heartbeat interrupting

Igor Stasenko
In reply to this post by Eliot Miranda-2

yeah, i remember i was also missing that when debugging..
i found stuff about signals myself, but not the other parts.

Thanks.

On 15 February 2012 19:13, Eliot Miranda <[hidden email]> wrote:

>
>
>
> On Wed, Feb 15, 2012 at 4:40 AM, Javier Pimás <[hidden email]> wrote:
>>
>>
>> I want to debug asm instruction per instruction with gdb, but the heartbeat keeps interrupting. Is there a way to disable it or make gdb ignore it in some way?
>
>
> Yes, at two levels.  First, signals, via
>
> handle SIGUSR1 nostop noprint noignore
> handle SIGUSR2 nostop noprint noignore
> handle SIGALRM nostop noprint noignore
> handle SIGPOLL nostop noprint noignore
> handle SIGPIPE nostop noprint noignore
>
> etc.  This can and should be put in ~/.gdbinit (find mine attached; note its called gdbinit only because I can't attach .gdbinit; you need to rename it when you install it; pbreg prints my Bochs instance in the JIT simulator; feel free to delete that :) )
>
>
> Second, to avoid the effect that the heartbeat has on control flow (e.g. causing a process switch) you can set suppressHeartbeatFlag to 1 via
>
> (gdb) set var suppressHeartbeatFlag = 1
>
> HTH
> Eliot
>
>>
>> Cheers,
>> Javier
>>
>> --
>> Lic. Javier Pimás
>> Ciudad de Buenos Aires
>
>
>



--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: How to debug vm without heartbeat interrupting

melkyades
In reply to this post by Eliot Miranda-2
 
Cool, thanks for the answer. I had tried with handle, but with the wrong signal, SIGTRAP, and heartbeats kept popping. I'll check disabling the others and also with the supressHeartbeatFlag.

Cheers,
Javier.

On Wed, Feb 15, 2012 at 3:17 PM, Eliot Miranda <[hidden email]> wrote:
 
(oops, let me reply again; there are *three* ways :) )

On Wed, Feb 15, 2012 at 4:40 AM, Javier Pimás <[hidden email]> wrote:
 
I want to debug asm instruction per instruction with gdb, but the heartbeat keeps interrupting. Is there a way to disable it or make gdb ignore it in some way?

Yes, at three levels.  First, signals, via

handle SIGUSR1 nostop noprint noignore
handle SIGUSR2 nostop noprint noignore
handle SIGALRM nostop noprint noignore
handle SIGPOLL nostop noprint noignore
handle SIGPIPE nostop noprint noignore

etc.  This can and should be put in ~/.gdbinit (find mine attached; note its called gdbinit only because I can't attach .gdbinit; you need to rename it when you install it; pbreg prints my Bochs instance in the JIT simulator; feel free to delete that :) )


Second, to avoid the effect that the heartbeat has on control flow (e.g. causing a process switch) you can set suppressHeartbeatFlag to 1, while running via

(gdb) set var suppressHeartbeatFlag = 1

or from start-up via the -noheartbeat flag, e.g.

(gdb) run -noheartbeat myimage.image

HTH
Eliot
 
Cheers,
Javier

--
Lic. Javier Pimás
Ciudad de Buenos Aires




--
Lic. Javier Pimás
Ciudad de Buenos Aires