This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "No registers" error on connecting to MIPS LSI PMON target


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]