* Nonblocking GDB stub
@ 2002-03-01 16:42 Mattias Wildeman
2002-03-03 9:03 ` Andrew Cagney
2002-03-05 21:15 ` Michael Snyder
0 siblings, 2 replies; 3+ messages in thread
From: Mattias Wildeman @ 2002-03-01 16:42 UTC (permalink / raw)
To: gdb
Hello!
I've been using GDB for a while, running it with a ARM based board and a
serial connection (remote debugging).
To activate GDB, i'll install a breakpoint on the target and connect GDB
throught that.
Standard behavior.
Now, what i would like to do is to have GDB interact with the target
without the target being stopped.
Yes, this breaks some of the purpose of the debugger, but i would like
to use GDB to analyze memory and datastructures without freezing the
program. The OS i am running do support task-switching, so i was
thinking about making the stub exception_handler non-blocking (e.g.
remove the while(1==1) statement that makes it accept commands until i
kill it), and instead have a call scheduled for it regularly.
Has anyone had experience with doing this? Or know of any place were i
could get more information on this? Is it even feasible?
I looked through Google, but was unable to find anything on this level.
Thank you for your time!
Regards,
Mattias Wildeman
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nonblocking GDB stub
2002-03-01 16:42 Nonblocking GDB stub Mattias Wildeman
@ 2002-03-03 9:03 ` Andrew Cagney
2002-03-05 21:15 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-03-03 9:03 UTC (permalink / raw)
To: Mattias Wildeman; +Cc: gdb
> Hello!
>
> I've been using GDB for a while, running it with a ARM based board and a
>
> serial connection (remote debugging).
>
> To activate GDB, i'll install a breakpoint on the target and connect GDB
> throught that.
> Standard behavior.
>
> Now, what i would like to do is to have GDB interact with the target
> without the target being stopped.
> Yes, this breaks some of the purpose of the debugger, but i would like
> to use GDB to analyze memory and datastructures without freezing the
> program. The OS i am running do support task-switching, so i was
> thinking about making the stub exception_handler non-blocking (e.g.
> remove the while(1==1) statement that makes it accept commands until i
> kill it), and instead have a call scheduled for it regularly.
>
> Has anyone had experience with doing this? Or know of any place were i
> could get more information on this? Is it even feasible?
>
> I looked through Google, but was unable to find anything on this level.
>
> Thank you for your time!
Perhaphs have a look through the tracepoints section of the documentation:
http://sources.redhat.com/gdb/onlinedocs/gdb_10.html#SEC68
Another option is to look at modifying GDB so that it doesn't stop all
threads - instead only specified threads. This is a little bit more
ambitious though.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nonblocking GDB stub
2002-03-01 16:42 Nonblocking GDB stub Mattias Wildeman
2002-03-03 9:03 ` Andrew Cagney
@ 2002-03-05 21:15 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2002-03-05 21:15 UTC (permalink / raw)
To: gdb
Mattias Wildeman wrote:
>
> Hello!
>
> I've been using GDB for a while, running it with a ARM based board and a
>
> serial connection (remote debugging).
>
> To activate GDB, i'll install a breakpoint on the target and connect GDB
> throught that.
> Standard behavior.
>
> Now, what i would like to do is to have GDB interact with the target
> without the target being stopped.
> Yes, this breaks some of the purpose of the debugger, but i would like
> to use GDB to analyze memory and datastructures without freezing the
> program. The OS i am running do support task-switching, so i was
> thinking about making the stub exception_handler non-blocking (e.g.
> remove the while(1==1) statement that makes it accept commands until i
> kill it), and instead have a call scheduled for it regularly.
>
> Has anyone had experience with doing this? Or know of any place were i
> could get more information on this? Is it even feasible?
>
> I looked through Google, but was unable to find anything on this level.
>
> Thank you for your time!
>
> Regards,
> Mattias Wildeman
I did do this once, a number of years ago, so I know it's possible.
You have to watch out for a few things, of course. It makes no sense
to talk about register values, for instance, nor to say run, step, or
continue.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-03-06 5:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-01 16:42 Nonblocking GDB stub Mattias Wildeman
2002-03-03 9:03 ` Andrew Cagney
2002-03-05 21:15 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox