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
On Wed, Feb 15, 2012 at 4:40 AM, Javier Pimás elpochodelagente@gmail.comwrote:
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
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 eliot.miranda@gmail.com wrote:
On Wed, Feb 15, 2012 at 4:40 AM, Javier Pimás elpochodelagente@gmail.com 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
(oops, let me reply again; there are *three* ways :) )
On Wed, Feb 15, 2012 at 4:40 AM, Javier Pimás elpochodelagente@gmail.comwrote:
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
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 eliot.miranda@gmail.comwrote:
(oops, let me reply again; there are *three* ways :) )
On Wed, Feb 15, 2012 at 4:40 AM, Javier Pimás elpochodelagente@gmail.comwrote:
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
vm-dev@lists.squeakfoundation.org