* Remote stub can't single-step, how to tell GDB?
@ 2004-08-12 21:50 Deepak Saxena
2004-08-12 22:36 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Deepak Saxena @ 2004-08-12 21:50 UTC (permalink / raw)
To: gdb
Hello,
I am working on porting the existing ARM KGDB stub into the
grand-unified-kgdb project (http://kgdb.sf.net) and am looking
for some info on how to cleanup our single-step handling. For
the existing stub we basically took the get_next_pc() code
from gdb and put it in the kgdb-stub so that we can execute
single-steps in the stub itself. When we receive an 's' command,
we call get_next_pc() and stuff the breakpoint at that address.
IMHO, having this in the kernel is overkill and skimming the gdb src,
I am guessing there is away to just force the user's client to do this,
but I am not sure how. In arm-tdep.c, I see the following comment that
makes me wonder if right now I have no choice but handle single-step
in the kernel stub:
/* Single stepping. */
/* XXX For an RDI target we should ask the target if it can single-step. */
set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
Any pointers appreciated.
Tnx,
~Deepak
--
Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/
"Unlike me, many of you have accepted the situation of your imprisonment and
will die here like rotten cabbages." - Number 6
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Remote stub can't single-step, how to tell GDB?
2004-08-12 21:50 Remote stub can't single-step, how to tell GDB? Deepak Saxena
@ 2004-08-12 22:36 ` Daniel Jacobowitz
2004-08-12 23:08 ` Deepak Saxena
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2004-08-12 22:36 UTC (permalink / raw)
To: Deepak Saxena; +Cc: gdb
On Thu, Aug 12, 2004 at 02:49:58PM -0700, Deepak Saxena wrote:
>
> Hello,
>
> I am working on porting the existing ARM KGDB stub into the
> grand-unified-kgdb project (http://kgdb.sf.net) and am looking
> for some info on how to cleanup our single-step handling. For
> the existing stub we basically took the get_next_pc() code
> from gdb and put it in the kgdb-stub so that we can execute
> single-steps in the stub itself. When we receive an 's' command,
> we call get_next_pc() and stuff the breakpoint at that address.
> IMHO, having this in the kernel is overkill and skimming the gdb src,
> I am guessing there is away to just force the user's client to do this,
> but I am not sure how. In arm-tdep.c, I see the following comment that
> makes me wonder if right now I have no choice but handle single-step
> in the kernel stub:
>
> /* Single stepping. */
> /* XXX For an RDI target we should ask the target if it can single-step. */
> set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
>
> Any pointers appreciated.
Hi Deepak :-)
Does GDB currently send single-step packets to the kgdb stub? What
version of GDB are you using? The call to set_gdbarch_software_single_step
sets up software (client-GDB-controlled) single stepping, and it should
not ask the stub to do so.
[GDB's handling of target capabilities in this area is a bit shoddy.
But here it looks like the default matches what you want anyway.]
--
Daniel Jacobowitz
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Remote stub can't single-step, how to tell GDB?
2004-08-12 22:36 ` Daniel Jacobowitz
@ 2004-08-12 23:08 ` Deepak Saxena
0 siblings, 0 replies; 3+ messages in thread
From: Deepak Saxena @ 2004-08-12 23:08 UTC (permalink / raw)
To: gdb
On Aug 12 2004, at 18:36, Daniel Jacobowitz was caught saying:
> On Thu, Aug 12, 2004 at 02:49:58PM -0700, Deepak Saxena wrote:
> > /* Single stepping. */
> > /* XXX For an RDI target we should ask the target if it can single-step. */
> > set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
> >
> > Any pointers appreciated.
>
> Hi Deepak :-)
>
> Does GDB currently send single-step packets to the kgdb stub? What
> version of GDB are you using? The call to set_gdbarch_software_single_step
> sets up software (client-GDB-controlled) single stepping, and it should
> not ask the stub to do so.
>
> [GDB's handling of target capabilities in this area is a bit shoddy.
> But here it looks like the default matches what you want anyway.]
You're right. The original stub was written with some ancient (5.x)
version of GDB and it must have behaved differently. Debug remote
on 6.0 shows GDB sending memory read/write commands.
Tnx,
~Deepak
--
Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/
"Unlike me, many of you have accepted the situation of your imprisonment and
will die here like rotten cabbages." - Number 6
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-12 23:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-12 21:50 Remote stub can't single-step, how to tell GDB? Deepak Saxena
2004-08-12 22:36 ` Daniel Jacobowitz
2004-08-12 23:08 ` Deepak Saxena
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox