Remove deprecated_lval_hack

This removes deprecated_lval_hack and the VALUE_LVAL macro, replacing
all uses with a call to value::lval.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey 2023-02-09 06:55:48 -07:00
parent 6f9c9d71c2
commit 736355f2e1
28 changed files with 112 additions and 122 deletions

View file

@ -294,8 +294,8 @@ c_get_string (struct value *value, gdb::unique_xmalloc_ptr<gdb_byte> *buffer,
C struct hack. So, only do this if either no length was
specified, or the length is within the existing bounds. This
avoids running off the end of the value's contents. */
if ((VALUE_LVAL (value) == not_lval
|| VALUE_LVAL (value) == lval_internalvar
if ((value->lval () == not_lval
|| value->lval () == lval_internalvar
|| type->code () == TYPE_CODE_ARRAY)
&& fetchlimit != UINT_MAX
&& (*length < 0 || *length <= fetchlimit))
@ -328,7 +328,7 @@ c_get_string (struct value *value, gdb::unique_xmalloc_ptr<gdb_byte> *buffer,
CORE_ADDR addr;
if (type->code () == TYPE_CODE_ARRAY)
{
if (VALUE_LVAL (value) != lval_memory)
if (value->lval () != lval_memory)
error (_("Attempt to take address of value "
"not located in memory."));
addr = value->address ();