* "No registers" error on connecting to MIPS LSI PMON target
@ 2003-10-08 10:45 Atsushi Nemoto
2003-10-08 14:05 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Atsushi Nemoto @ 2003-10-08 10:45 UTC (permalink / raw)
To: gdb-patches
I tried to use gdb-6.0 for remote-debugging with MIPS LSI PMON.
I got a message "No registers." on "target lsi /dev/ttyS0" command.
I think this is because get_selected_frame() is called BEFORE the
correct target_ops is installed by push_target().
This is a temporary patch. It seems to work, but I can not tell the
situation mentioned in the "FIXME" comment is really solved or not.
--- gdb-6.0/gdb/remote-mips.c.org Wed Jun 11 22:16:28 2003
+++ gdb-6.0/gdb/remote-mips.c Wed Oct 8 16:55:19 2003
@@ -1494,10 +1494,12 @@
the request itself succeeds or fails. */
mips_request ('r', 0, 0, &err, mips_receive_wait, NULL);
+#if 0
/* FIXME: cagney/2002-11-29: Force the update of selected frame.
This shouldn't be necessary, only many many places still refer to
selected_frame directly (instead of using get_selected_frame(). */
get_selected_frame (); /* Hack!!! */
+#endif
}
/* Open a connection to the remote board. */
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "No registers" error on connecting to MIPS LSI PMON target
2003-10-08 10:45 "No registers" error on connecting to MIPS LSI PMON target Atsushi Nemoto
@ 2003-10-08 14:05 ` Daniel Jacobowitz
2003-10-08 19:14 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-10-08 14:05 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: gdb-patches
On Wed, Oct 08, 2003 at 07:47:59PM +0900, Atsushi Nemoto wrote:
> I tried to use gdb-6.0 for remote-debugging with MIPS LSI PMON.
> I got a message "No registers." on "target lsi /dev/ttyS0" command.
>
> I think this is because get_selected_frame() is called BEFORE the
> correct target_ops is installed by push_target().
>
> This is a temporary patch. It seems to work, but I can not tell the
> situation mentioned in the "FIXME" comment is really solved or not.
>
>
> --- gdb-6.0/gdb/remote-mips.c.org Wed Jun 11 22:16:28 2003
> +++ gdb-6.0/gdb/remote-mips.c Wed Oct 8 16:55:19 2003
> @@ -1494,10 +1494,12 @@
> the request itself succeeds or fails. */
>
> mips_request ('r', 0, 0, &err, mips_receive_wait, NULL);
> +#if 0
> /* FIXME: cagney/2002-11-29: Force the update of selected frame.
> This shouldn't be necessary, only many many places still refer to
> selected_frame directly (instead of using get_selected_frame(). */
> get_selected_frame (); /* Hack!!! */
> +#endif
> }
>
> /* Open a connection to the remote board. */
Hmm, I've got one of these too and see the same error. This looks to
predate the deprecation of selected_frame, so I think it can probably
go away now. Andrew would have a better idea...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "No registers" error on connecting to MIPS LSI PMON target
2003-10-08 14:05 ` Daniel Jacobowitz
@ 2003-10-08 19:14 ` Andrew Cagney
2003-10-09 14:37 ` Daniel Jacobowitz
2003-10-12 11:51 ` Atsushi Nemoto
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cagney @ 2003-10-08 19:14 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Atsushi Nemoto, gdb-patches
>
>> mips_request ('r', 0, 0, &err, mips_receive_wait, NULL);
>> +#if 0
>> /* FIXME: cagney/2002-11-29: Force the update of selected frame.
>> This shouldn't be necessary, only many many places still refer to
>> selected_frame directly (instead of using get_selected_frame(). */
>> get_selected_frame (); /* Hack!!! */
>> +#endif
>> }
>>
>> /* Open a connection to the remote board. */
>
>
> Hmm, I've got one of these too and see the same error. This looks to
> predate the deprecation of selected_frame, so I think it can probably
> go away now. Andrew would have a better idea...
Actually, I don't. The old code looked like:
set_current_frame (create_new_frame (read_fp (), read_pc ()));
select_frame (get_current_frame (), 0);
and the above is "functionaly" equivalent. My best guess is that
read_fp() and read_pc() never thought to check if there were registers
and that let the old code work around a race condition :-(
Also, yes, get_selected_frame() and get_current_frame() being on-demand
should also have eliminated the need for this method (well, in theory at
least :-).
So, "if it works for both of you", yank the code. 6.0 as well.
Can you also bug-report the need to audit GDB for this? I'm pretty sure
that the code is this code was cloned into several remote-*.c files :-/
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "No registers" error on connecting to MIPS LSI PMON target
2003-10-08 19:14 ` Andrew Cagney
@ 2003-10-09 14:37 ` Daniel Jacobowitz
2003-10-12 11:51 ` Atsushi Nemoto
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2003-10-09 14:37 UTC (permalink / raw)
To: gdb-patches
On Wed, Oct 08, 2003 at 03:14:07PM -0400, Andrew Cagney wrote:
> >
> >> mips_request ('r', 0, 0, &err, mips_receive_wait, NULL);
> >>+#if 0
> >> /* FIXME: cagney/2002-11-29: Force the update of selected frame.
> >> This shouldn't be necessary, only many many places still refer to
> >> selected_frame directly (instead of using get_selected_frame(). */
> >> get_selected_frame (); /* Hack!!! */
> >>+#endif
> >> }
> >>
> >> /* Open a connection to the remote board. */
> >
> >
> >Hmm, I've got one of these too and see the same error. This looks to
> >predate the deprecation of selected_frame, so I think it can probably
> >go away now. Andrew would have a better idea...
>
> Actually, I don't. The old code looked like:
>
> set_current_frame (create_new_frame (read_fp (), read_pc ()));
> select_frame (get_current_frame (), 0);
>
> and the above is "functionaly" equivalent. My best guess is that
> read_fp() and read_pc() never thought to check if there were registers
> and that let the old code work around a race condition :-(
>
> Also, yes, get_selected_frame() and get_current_frame() being on-demand
> should also have eliminated the need for this method (well, in theory at
> least :-).
>
> So, "if it works for both of you", yank the code. 6.0 as well.
Done, attached.
> Can you also bug-report the need to audit GDB for this? I'm pretty sure
> that the code is this code was cloned into several remote-*.c files :-/
Also done.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-10-09 Daniel Jacobowitz <drow@mvista.com>
* remote-mips.c (mips_initialize): Remove unneeded call to
get_selected_frame. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
Index: remote-mips.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mips.c,v
retrieving revision 1.40
diff -u -p -r1.40 remote-mips.c
--- remote-mips.c 2 Oct 2003 20:28:30 -0000 1.40
+++ remote-mips.c 9 Oct 2003 14:31:44 -0000
@@ -1494,10 +1494,6 @@ mips_initialize (void)
the request itself succeeds or fails. */
mips_request ('r', 0, 0, &err, mips_receive_wait, NULL);
- /* FIXME: cagney/2002-11-29: Force the update of selected frame.
- This shouldn't be necessary, only many many places still refer to
- selected_frame directly (instead of using get_selected_frame(). */
- get_selected_frame (); /* Hack!!! */
}
/* Open a connection to the remote board. */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "No registers" error on connecting to MIPS LSI PMON target
2003-10-08 19:14 ` Andrew Cagney
2003-10-09 14:37 ` Daniel Jacobowitz
@ 2003-10-12 11:51 ` Atsushi Nemoto
1 sibling, 0 replies; 5+ messages in thread
From: Atsushi Nemoto @ 2003-10-12 11:51 UTC (permalink / raw)
To: ac131313; +Cc: drow, gdb-patches
>>>>> On Wed, 08 Oct 2003 15:14:07 -0400, Andrew Cagney <ac131313@redhat.com> said:
ac131313> So, "if it works for both of you", yank the code. 6.0 as
ac131313> well.
ac131313> Can you also bug-report the need to audit GDB for this? I'm
ac131313> pretty sure that the code is this code was cloned into
ac131313> several remote-*.c files :-/
I saw the fix was committed and PR was sent. Thank you all.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-12 11:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-08 10:45 "No registers" error on connecting to MIPS LSI PMON target Atsushi Nemoto
2003-10-08 14:05 ` Daniel Jacobowitz
2003-10-08 19:14 ` Andrew Cagney
2003-10-09 14:37 ` Daniel Jacobowitz
2003-10-12 11:51 ` Atsushi Nemoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox