/* Find a variable's value in memory, for GDB, the GNU debugger.
- Copyright (C) 1986-2019 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
This file is part of GDB.
#include "block.h"
#include "objfiles.h"
#include "language.h"
-#include "dwarf2loc.h"
+#include "dwarf2/loc.h"
#include "gdbsupport/selftest.h"
/* Basic byte-swapping routines. All 'extract' functions return a
if (is_dynamic_type (type))
{
/* Value is a constant byte-sequence and needs no memory access. */
- type = resolve_dynamic_type (type, NULL, /* Unused address. */ 0);
+ type = resolve_dynamic_type (type, {}, /* Unused address. */ 0);
}
/* Put the constant back in target format. */
v = allocate_value (type);
if (is_dynamic_type (type))
{
/* Value is a constant byte-sequence and needs no memory access. */
- type = resolve_dynamic_type (type, NULL, /* Unused address. */ 0);
+ type = resolve_dynamic_type (type, {}, /* Unused address. */ 0);
}
v = allocate_value (type);
memcpy (value_contents_raw (v), SYMBOL_VALUE_BYTES (var),
case LOC_OPTIMIZED_OUT:
if (is_dynamic_type (type))
- type = resolve_dynamic_type (type, NULL, /* Unused address. */ 0);
+ type = resolve_dynamic_type (type, {}, /* Unused address. */ 0);
return allocate_optimized_out_value (type);
default:
read_var_value (struct symbol *var, const struct block *var_block,
struct frame_info *frame)
{
- const struct language_defn *lang = language_def (SYMBOL_LANGUAGE (var));
+ const struct language_defn *lang = language_def (var->language ());
gdb_assert (lang != NULL);
gdb_assert (lang->la_read_var_value != NULL);
#endif
+void _initialize_findvar ();
void
-_initialize_findvar (void)
+_initialize_findvar ()
{
#if GDB_SELF_TEST
selftests::register_test