aboutsummaryrefslogtreecommitdiff
path: root/gcc/gdbhooks.py
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-07-11 12:43:49 -0700
committerIan Lance Taylor <iant@golang.org>2020-07-11 12:43:49 -0700
commit4854d721be78358e59367982bdd94461b4be3c5a (patch)
tree8ead189e618f8ef1456c8b02c81de0cc1585d8a6 /gcc/gdbhooks.py
parent3cdc95b9f8d6c90c4a279783fd3da961c5afb22c (diff)
parente109f6e438b72ef3e403162971068d28d09b82f5 (diff)
downloadgcc-4854d721be78358e59367982bdd94461b4be3c5a.zip
gcc-4854d721be78358e59367982bdd94461b4be3c5a.tar.gz
gcc-4854d721be78358e59367982bdd94461b4be3c5a.tar.bz2
Merge from trunk revision e109f6e438b72ef3e403162971068d28d09b82f5
Diffstat (limited to 'gcc/gdbhooks.py')
-rw-r--r--gcc/gdbhooks.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py
index e9acc373..0ab6f01 100644
--- a/gcc/gdbhooks.py
+++ b/gcc/gdbhooks.py
@@ -154,6 +154,7 @@ tree_code_dict = gdb.types.make_enum_dict(gdb.lookup_type('enum tree_code'))
# ...and look up specific values for use later:
IDENTIFIER_NODE = tree_code_dict['IDENTIFIER_NODE']
TYPE_DECL = tree_code_dict['TYPE_DECL']
+SSA_NAME = tree_code_dict['SSA_NAME']
# Similarly for "enum tree_code_class" (tree.h):
tree_code_class_dict = gdb.types.make_enum_dict(gdb.lookup_type('enum tree_code_class'))
@@ -252,6 +253,8 @@ class TreePrinter:
result += ' %s' % tree_TYPE_NAME.DECL_NAME().IDENTIFIER_POINTER()
if self.node.TREE_CODE() == IDENTIFIER_NODE:
result += ' %s' % self.node.IDENTIFIER_POINTER()
+ elif self.node.TREE_CODE() == SSA_NAME:
+ result += ' %u' % self.gdbval['base']['u']['version']
# etc
result += '>'
return result