PR exp/11803:
	* value.c (value_static_field): Use value_of_variable.
gdb/testsuite
	PR exp/11803:
	* gdb.threads/tls.exp: Use C++.
	(check_thread_local): Use K::another_thread_local.
	* gdb.threads/tls.c (class K): New.
	(another_thread_local): Now a member of K.
	(spin): Update.  No longer K&R C.
This commit is contained in:
Tom Tromey
2010-09-14 19:08:30 +00:00
parent 7ef07ba077
commit 515ed53230
5 changed files with 31 additions and 21 deletions

View File

@@ -1903,17 +1903,7 @@ value_static_field (struct type *type, int fieldno)
}
}
else
{
/* SYM should never have a SYMBOL_CLASS which will require
read_var_value to use the FRAME parameter. */
if (symbol_read_needs_frame (sym))
warning (_("static field's value depends on the current "
"frame - bad debug info?"));
retval = read_var_value (sym, NULL);
}
if (retval && VALUE_LVAL (retval) == lval_memory)
SET_FIELD_PHYSADDR (TYPE_FIELD (type, fieldno),
value_address (retval));
retval = value_of_variable (sym, NULL);
break;
}
default: