[PATCH/RFC] Get rid of deprectated_read_register_gen in i387-tdep.c
Andrew Cagney
ac131313@redhat.com
Sun Nov 3 07:26:00 GMT 2002
> 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
More information about the Gdb-patches
mailing list