X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=gdb%2Fvarobj.c;h=3358be4e77b48886f66301a592dad6e01d10938a;hb=a350efd4fb368a35ada608f6bc26ccd3bed0ae6b;hp=10d5a67e154c5e9ce2d2f5c5e0a4c34ee7d946ad;hpb=85102364b2d1845fe9ae7d70096671a3ea4bccf3;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/varobj.c b/gdb/varobj.c index 10d5a67e15..3358be4e77 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1,6 +1,6 @@ /* Implementation of the GDB variable objects API. - Copyright (C) 1999-2019 Free Software Foundation, Inc. + Copyright (C) 1999-2020 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1271,7 +1271,7 @@ install_new_value (struct varobj *var, struct value *value, bool initial) if (value) value = coerce_ref (value); - if (var->type && TYPE_CODE (var->type) == TYPE_CODE_UNION) + if (var->type && var->type->code () == TYPE_CODE_UNION) /* For unions, we need to fetch the value implicitly because of implementation of union member fetch. When gdb creates a value for a field and the value of the enclosing @@ -1299,7 +1299,7 @@ install_new_value (struct varobj *var, struct value *value, bool initial) { /* For variables that are frozen, or are children of frozen variables, we don't do fetch on initial assignment. - For non-initial assignemnt we do the fetch, since it means we're + For non-initial assignment we do the fetch, since it means we're explicitly asked to compare the new value with the old one. */ intentionally_not_fetched = true; } @@ -2398,7 +2398,7 @@ varobj_editable_p (const struct varobj *var) type = varobj_get_value_type (var); - switch (TYPE_CODE (type)) + switch (type->code ()) { case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: @@ -2445,7 +2445,7 @@ varobj_default_value_is_changeable_p (const struct varobj *var) type = varobj_get_value_type (var); - switch (TYPE_CODE (type)) + switch (type->code ()) { case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: @@ -2520,8 +2520,9 @@ varobj_invalidate (void) all_root_varobjs (varobj_invalidate_iter, NULL); } +void _initialize_varobj (); void -_initialize_varobj (void) +_initialize_varobj () { varobj_table = XCNEWVEC (struct vlist *, VAROBJ_TABLE_SIZE);