+2005-03-07 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * findvar.c (read_var_value): Don't allocate V when it will not
+ be used. Add missing break for LOC_INDIRECT.
+
2005-03-06 Mark Kettenis <kettenis@gnu.org>
* sparc64fbsd-tdep.c: Include "solib-svr4.h".
CORE_ADDR addr;
int len;
- v = allocate_value (type);
- VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */
+ if (SYMBOL_CLASS (var) == LOC_COMPUTED
+ || SYMBOL_CLASS (var) == LOC_COMPUTED_ARG
+ || SYMBOL_CLASS (var) == LOC_REGISTER
+ || SYMBOL_CLASS (var) == LOC_REGPARM)
+ /* These cases do not use V. */
+ v = NULL;
+ else
+ {
+ v = allocate_value (type);
+ VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */
+ }
len = TYPE_LENGTH (type);
-
/* FIXME drow/2003-09-06: this call to the selected frame should be
pushed upwards to the callers. */
if (frame == NULL)
locaddr = SYMBOL_VALUE_ADDRESS (var);
loc = value_at (lookup_pointer_type (type), locaddr);
addr = value_as_address (loc);
+ break;
}
case LOC_ARG: