2003-03-12 Andrew Cagney <cagney@redhat.com>
* frame.c (get_current_frame): Check target_has_registers before checking target_has_stack. * eval.c (evaluate_subexp_standard): Use get_selected_frame, instead of deprecated_selected_frame. * findvar.c (value_of_register): Pass "frame", not deprecated_selected_frame, to value_of_builtin_reg.
This commit is contained in:
parent
a66a9c2331
commit
0a1e1ca1f6
4 changed files with 18 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2003-03-12 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
|
* frame.c (get_current_frame): Check target_has_registers before
|
||||||
|
checking target_has_stack.
|
||||||
|
* eval.c (evaluate_subexp_standard): Use get_selected_frame,
|
||||||
|
instead of deprecated_selected_frame.
|
||||||
|
* findvar.c (value_of_register): Pass "frame", not
|
||||||
|
deprecated_selected_frame, to value_of_builtin_reg.
|
||||||
|
|
||||||
2003-03-12 Andrew Cagney <cagney@redhat.com>
|
2003-03-12 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* regcache.c (regcache_cooked_write_signed): New function.
|
* regcache.c (regcache_cooked_write_signed): New function.
|
||||||
|
|
|
@ -447,7 +447,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
case OP_REGISTER:
|
case OP_REGISTER:
|
||||||
{
|
{
|
||||||
int regno = longest_to_int (exp->elts[pc + 1].longconst);
|
int regno = longest_to_int (exp->elts[pc + 1].longconst);
|
||||||
struct value *val = value_of_register (regno, deprecated_selected_frame);
|
struct value *val = value_of_register (regno, get_selected_frame ());
|
||||||
(*pos) += 2;
|
(*pos) += 2;
|
||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
error ("Value of register %s not available.",
|
error ("Value of register %s not available.",
|
||||||
|
|
|
@ -305,7 +305,7 @@ value_of_register (int regnum, struct frame_info *frame)
|
||||||
/* Builtin registers lie completly outside of the range of normal
|
/* Builtin registers lie completly outside of the range of normal
|
||||||
registers. Catch them early so that the target never sees them. */
|
registers. Catch them early so that the target never sees them. */
|
||||||
if (regnum >= NUM_REGS + NUM_PSEUDO_REGS)
|
if (regnum >= NUM_REGS + NUM_PSEUDO_REGS)
|
||||||
return value_of_builtin_reg (regnum, deprecated_selected_frame);
|
return value_of_builtin_reg (regnum, frame);
|
||||||
|
|
||||||
get_saved_register (raw_buffer, &optim, &addr,
|
get_saved_register (raw_buffer, &optim, &addr,
|
||||||
frame, regnum, &lval);
|
frame, regnum, &lval);
|
||||||
|
|
|
@ -566,10 +566,15 @@ unwind_to_current_frame (struct ui_out *ui_out, void *args)
|
||||||
struct frame_info *
|
struct frame_info *
|
||||||
get_current_frame (void)
|
get_current_frame (void)
|
||||||
{
|
{
|
||||||
if (!target_has_stack)
|
/* First check, and report, the lack of registers. Having GDB
|
||||||
error ("No stack.");
|
report "No stack!" or "No memory" when the target doesn't even
|
||||||
|
have registers is very confusing. Besides, "printcmd.exp"
|
||||||
|
explicitly checks that ``print $pc'' with no registers prints "No
|
||||||
|
registers". */
|
||||||
if (!target_has_registers)
|
if (!target_has_registers)
|
||||||
error ("No registers.");
|
error ("No registers.");
|
||||||
|
if (!target_has_stack)
|
||||||
|
error ("No stack.");
|
||||||
if (!target_has_memory)
|
if (!target_has_memory)
|
||||||
error ("No memory.");
|
error ("No memory.");
|
||||||
if (current_frame == NULL)
|
if (current_frame == NULL)
|
||||||
|
|
Loading…
Reference in a new issue