aboutsummaryrefslogtreecommitdiff
path: root/gcc/gdbhooks.py
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-06-11 08:40:08 -0400
committerJason Merrill <jason@gcc.gnu.org>2019-06-11 08:40:08 -0400
commit92812757648109dc6cd35a52374ab3f6e9f44f78 (patch)
treeb10ff4fbd325eb277a8c2342eb2f325d56b91b60 /gcc/gdbhooks.py
parentde6abd8514fa7a2bed078935fd950f8cb8dee45c (diff)
downloadgcc-92812757648109dc6cd35a52374ab3f6e9f44f78.zip
gcc-92812757648109dc6cd35a52374ab3f6e9f44f78.tar.gz
gcc-92812757648109dc6cd35a52374ab3f6e9f44f78.tar.bz2
gdbhooks.py (TreePrinter.to_string): Recognize ggc_free'd memory.
* gdbhooks.py (TreePrinter.to_string): Recognize ggc_free'd memory. * tree.c (get_tree_code_name): Likewise. * print-tree.c (print_node): Only briefly print a node with an invalid code. From-SVN: r272150
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 39f5c47..e08208e 100644
--- a/gcc/gdbhooks.py
+++ b/gcc/gdbhooks.py
@@ -222,6 +222,9 @@ class TreePrinter:
# extern const enum tree_code_class tree_code_type[];
# #define TREE_CODE_CLASS(CODE) tree_code_type[(int) (CODE)]
+ if val_TREE_CODE == 0xa5a5:
+ return '<ggc_freed 0x%x>' % intptr(self.gdbval)
+
val_tree_code_type = gdb.parse_and_eval('tree_code_type')
val_tclass = val_tree_code_type[val_TREE_CODE]