From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21935 invoked by alias); 9 Oct 2003 14:37:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21927 invoked from network); 9 Oct 2003 14:37:36 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 9 Oct 2003 14:37:35 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 1A7bv5-0000tx-FC for ; Thu, 09 Oct 2003 10:37:35 -0400 Date: Thu, 09 Oct 2003 14:37:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: "No registers" error on connecting to MIPS LSI PMON target Message-ID: <20031009143735.GA3331@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20031008.194759.74756454.nemoto@toshiba-tops.co.jp> <20031008140542.GA27876@nevyn.them.org> <3F8461FF.4090803@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F8461FF.4090803@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00299.txt.bz2 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 * remote-mips.c (mips_initialize): Remove unneeded call to get_selected_frame. Suggested by Atsushi Nemoto . 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. */