Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH/RFC] Get rid of deprectated_read_register_gen in i387-tdep.c
Date: Sun, 03 Nov 2002 07:26:00 -0000	[thread overview]
Message-ID: <3DC5401A.8070003@redhat.com> (raw)
In-Reply-To: <200211031243.gA3ChoG7006472@elgar.kettenis.dyndns.org>

> I checked in the attached patch.  Unfortunately this introduces a

Thanks for flushing these!

>    FAIL: gdb.base/default.exp: info float
> 
> in the testsuite.  The output now is:
> 
>    info float
>    No registers.
> 
> Which makes sense to me since it's the truth.  However, "info
> registers" and "info vector" print a slightly different message:
> 
>    info registers
>    The program has no registers now.
> 
> The reason is that the bit of code that prints this message:
> 
>       if (!target_has_registers)
> 	error ("The program has no registers now.");
>       if (selected_frame == NULL)
> 	error ("No selected frame.");
> 
> isn't executed if a print_float_info method exists in the target
> vector.  Is there any reason not to move these statements up such that
> they're executed even if a target provides the print_float_info
> method?

I can't think of a reason not to.

--

PS: My things to do real soon includes add a function:

get_selected_frame (thread_info *)
	if (!thread's target_has_registers)
	  error ("...");
	if (thread's selected_frame != NULL)
	  return thread's selected_frame;
	// now for the fun
	// selected_frame = find_frame_by_id (thread's selected frame-id);
	// if (selected_frame != NULL)
	//   return selected_frame;
	error ("No selected frame");

and then use that instead of the selected_frame global.

The bit that is commented out is more interesting.  It would mean 
differentiating between target_changed() and target_run() events.

The former shouldn't change the selected frame but the latter should set 
it back to current frame.  This will cause a behavioral change in GDB 
but I think it will really fix a bug.

Andrew


      reply	other threads:[~2002-11-03 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-03  4:43 Mark Kettenis
2002-11-03  7:26 ` Andrew Cagney [this message]

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=3DC5401A.8070003@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@chello.nl \
    /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