* [RFA] Disable "remote_rdp_can_run"
@ 2002-05-02 16:31 Michael Snyder
2002-05-08 8:21 ` Richard Earnshaw
0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2002-05-02 16:31 UTC (permalink / raw)
To: gdb-patches; +Cc: rearnsha
Happened across this. It's not right.
With this in place, if you have not attached to your rdp target
(ie. by saying "target rdp"), but you instead just say "run",
gdb will attempt to use the rdp target, which has not at this
point been opened or initialized. This is not the right way
to make a remote target accept the "run" command.
2002-05-02 Michael Snyder <msnyder@redhat.com>
* remote-rdp.c (remote_rdp_can_run): Return false. This is
not a good work-around for making a remote target accept 'run'.
Index: remote-rdp.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-rdp.c,v
retrieving revision 1.24
diff -p -r1.24 remote-rdp.c
*** remote-rdp.c 13 Feb 2002 16:24:59 -0000 1.24
--- remote-rdp.c 2 May 2002 23:25:40 -0000
*************** remote_rdp_create_inferior (char *exec_f
*** 1367,1373 ****
static int
remote_rdp_can_run (void)
{
! return 1;
}
/* Attach doesn't need to do anything */
--- 1367,1378 ----
static int
remote_rdp_can_run (void)
{
! /* You certainly can't run unles you've attached to your target board.
! If you want to save some sort of global state that tells you if
! you've attached, then maybe you can accept the run command
! (but I still don't think that would be right -- remote targets
! don't accept the run command (nor do they accept "attach")). */
! return 0;
}
/* Attach doesn't need to do anything */
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [RFA] Disable "remote_rdp_can_run"
2002-05-02 16:31 [RFA] Disable "remote_rdp_can_run" Michael Snyder
@ 2002-05-08 8:21 ` Richard Earnshaw
2002-05-08 11:35 ` Michael Snyder
0 siblings, 1 reply; 5+ messages in thread
From: Richard Earnshaw @ 2002-05-08 8:21 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches, rearnsha
>
> Happened across this. It's not right.
>
> With this in place, if you have not attached to your rdp target
> (ie. by saying "target rdp"), but you instead just say "run",
> gdb will attempt to use the rdp target, which has not at this
> point been opened or initialized. This is not the right way
> to make a remote target accept the "run" command.
>
> 2002-05-02 Michael Snyder <msnyder@redhat.com>
>
> * remote-rdp.c (remote_rdp_can_run): Return false. This is
> not a good work-around for making a remote target accept 'run'.
>
I'm not sure I understand this. Shouldn't remote_rdp_can_run return 1
once the target has been attached? If not, then I think the whole
function should be killed (so that we pick up the default behaviour).
R.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Disable "remote_rdp_can_run"
2002-05-08 8:21 ` Richard Earnshaw
@ 2002-05-08 11:35 ` Michael Snyder
2002-05-08 12:11 ` Richard Earnshaw
0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2002-05-08 11:35 UTC (permalink / raw)
To: Richard.Earnshaw; +Cc: Michael Snyder, gdb-patches, rearnsha
Richard Earnshaw wrote:
>
> >
> > Happened across this. It's not right.
> >
> > With this in place, if you have not attached to your rdp target
> > (ie. by saying "target rdp"), but you instead just say "run",
> > gdb will attempt to use the rdp target, which has not at this
> > point been opened or initialized. This is not the right way
> > to make a remote target accept the "run" command.
> >
> > 2002-05-02 Michael Snyder <msnyder@redhat.com>
> >
> > * remote-rdp.c (remote_rdp_can_run): Return false. This is
> > not a good work-around for making a remote target accept 'run'.
> >
>
> I'm not sure I understand this. Shouldn't remote_rdp_can_run return 1
> once the target has been attached? If not, then I think the whole
> function should be killed (so that we pick up the default behaviour).
Actually, I agree with the second statement (it sound be killed).
If you want to have it return true once the target is attached,
you need some way of detecting that state (perhaps a global).
I didn't bother to do that, because I don't like the idea.
This is the only remote target that tries to do this.
I'd be glad to yank it if you say the word...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Disable "remote_rdp_can_run"
2002-05-08 11:35 ` Michael Snyder
@ 2002-05-08 12:11 ` Richard Earnshaw
2002-05-09 11:45 ` Michael Snyder
0 siblings, 1 reply; 5+ messages in thread
From: Richard Earnshaw @ 2002-05-08 12:11 UTC (permalink / raw)
To: Michael Snyder; +Cc: Richard.Earnshaw, Michael Snyder, gdb-patches, rearnsha
> Richard Earnshaw wrote:
> >
> > >
> > > Happened across this. It's not right.
> > >
> > > With this in place, if you have not attached to your rdp target
> > > (ie. by saying "target rdp"), but you instead just say "run",
> > > gdb will attempt to use the rdp target, which has not at this
> > > point been opened or initialized. This is not the right way
> > > to make a remote target accept the "run" command.
> > >
> > > 2002-05-02 Michael Snyder <msnyder@redhat.com>
> > >
> > > * remote-rdp.c (remote_rdp_can_run): Return false. This is
> > > not a good work-around for making a remote target accept 'run'.
> > >
> >
> > I'm not sure I understand this. Shouldn't remote_rdp_can_run return 1
> > once the target has been attached? If not, then I think the whole
> > function should be killed (so that we pick up the default behaviour).
>
> Actually, I agree with the second statement (it sound be killed).
> If you want to have it return true once the target is attached,
> you need some way of detecting that state (perhaps a global).
> I didn't bother to do that, because I don't like the idea.
>
> This is the only remote target that tries to do this.
> I'd be glad to yank it if you say the word...
"The word"
R.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Disable "remote_rdp_can_run"
2002-05-08 12:11 ` Richard Earnshaw
@ 2002-05-09 11:45 ` Michael Snyder
0 siblings, 0 replies; 5+ messages in thread
From: Michael Snyder @ 2002-05-09 11:45 UTC (permalink / raw)
To: Richard.Earnshaw; +Cc: Michael Snyder, gdb-patches, rearnsha
Richard Earnshaw wrote:
>
> > Richard Earnshaw wrote:
> > >
> > > >
> > > > Happened across this. It's not right.
> > > >
> > > > With this in place, if you have not attached to your rdp target
> > > > (ie. by saying "target rdp"), but you instead just say "run",
> > > > gdb will attempt to use the rdp target, which has not at this
> > > > point been opened or initialized. This is not the right way
> > > > to make a remote target accept the "run" command.
> > > >
> > > > 2002-05-02 Michael Snyder <msnyder@redhat.com>
> > > >
> > > > * remote-rdp.c (remote_rdp_can_run): Return false. This is
> > > > not a good work-around for making a remote target accept 'run'.
> > > >
> > >
> > > I'm not sure I understand this. Shouldn't remote_rdp_can_run return 1
> > > once the target has been attached? If not, then I think the whole
> > > function should be killed (so that we pick up the default behaviour).
> >
> > Actually, I agree with the second statement (it sound be killed).
> > If you want to have it return true once the target is attached,
> > you need some way of detecting that state (perhaps a global).
> > I didn't bother to do that, because I don't like the idea.
> >
> > This is the only remote target that tries to do this.
> > I'd be glad to yank it if you say the word...
>
> "The word"
Aye aye, Cap'n! ;-)
It's in.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-05-09 18:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-02 16:31 [RFA] Disable "remote_rdp_can_run" Michael Snyder
2002-05-08 8:21 ` Richard Earnshaw
2002-05-08 11:35 ` Michael Snyder
2002-05-08 12:11 ` Richard Earnshaw
2002-05-09 11:45 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox