+2016-07-21 Pedro Alves <palves@redhat.com>
+
+ * varobj.c (varobj_value_get_print_value): Move "gdbarch" to block
+ scope that uses it.
+
2016-07-20 John Baldwin <jhb@FreeBSD.org>
* fbsd-nat.c (fbsd_enable_proc_events): Enable "PTRACE_VFORK"
struct type *type = NULL;
long len = 0;
char *encoding = NULL;
- struct gdbarch *gdbarch = NULL;
/* Initialize it just to avoid a GCC false warning. */
CORE_ADDR str_addr = 0;
int string_print = 0;
stb = mem_fileopen ();
old_chain = make_cleanup_ui_file_delete (stb);
- gdbarch = get_type_arch (value_type (value));
#if HAVE_PYTHON
if (gdb_python_initialized)
{
if (s)
{
+ struct gdbarch *gdbarch;
char *hint;
hint = gdbpy_get_display_hint (value_formatter);
len = strlen (s);
thevalue = (char *) xmemdup (s, len + 1, len + 1);
+ gdbarch = get_type_arch (value_type (value));
type = builtin_type (gdbarch)->builtin_char;
xfree (s);