Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>, gdb-patches@sources.redhat.com
Subject: Re: "No registers" error on connecting to MIPS LSI PMON target
Date: Wed, 08 Oct 2003 19:14:00 -0000	[thread overview]
Message-ID: <3F8461FF.4090803@redhat.com> (raw)
In-Reply-To: <20031008140542.GA27876@nevyn.them.org>

>  
>>    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





  reply	other threads:[~2003-10-08 19:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-08 10:45 Atsushi Nemoto
2003-10-08 14:05 ` Daniel Jacobowitz
2003-10-08 19:14   ` Andrew Cagney [this message]
2003-10-09 14:37     ` Daniel Jacobowitz
2003-10-12 11:51     ` Atsushi Nemoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F8461FF.4090803@redhat.com \
    --to=ac131313@redhat.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox