From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17048 invoked by alias); 8 Oct 2003 19:14:09 -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 17027 invoked from network); 8 Oct 2003 19:14:08 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 8 Oct 2003 19:14:08 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4AED42B89; Wed, 8 Oct 2003 15:14:07 -0400 (EDT) Message-ID: <3F8461FF.4090803@redhat.com> Date: Wed, 08 Oct 2003 19:14:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Atsushi Nemoto , gdb-patches@sources.redhat.com Subject: Re: "No registers" error on connecting to MIPS LSI PMON target References: <20031008.194759.74756454.nemoto@toshiba-tops.co.jp> <20031008140542.GA27876@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00242.txt.bz2 > >> 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