From ba7789a316f78e163f03f9206a61d34652f7e060 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 24 Mar 2022 10:21:10 -0400 Subject: gdb/testsuite: remove gdb.python/pretty-print-call-by-hand.exp This test was added without a corresponding fix, with some setup_kfails. However, it results in UNRESOLVED results when GDB is built with ASan. ERROR: GDB process no longer exists GDB process exited with wait status 1946871 exp7 0 1 UNRESOLVED: gdb.python/pretty-print-call-by-hand.exp: frame print: backtrace test (PRMS gdb/28856) Remove the test from the tree, I'll attach it to the Bugzilla bug instead [1]. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=28856 Change-Id: Id95d8949fb8742874bd12aeac758aa4d7564d678 --- .../gdb.python/pretty-print-call-by-hand.py | 45 ---------------------- 1 file changed, 45 deletions(-) delete mode 100644 gdb/testsuite/gdb.python/pretty-print-call-by-hand.py (limited to 'gdb/testsuite/gdb.python/pretty-print-call-by-hand.py') diff --git a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.py b/gdb/testsuite/gdb.python/pretty-print-call-by-hand.py deleted file mode 100644 index 5343af8..0000000 --- a/gdb/testsuite/gdb.python/pretty-print-call-by-hand.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2022 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 -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -class MytypePrinter: - """pretty print my type""" - - def __init__(self, val): - self.val = val - - def to_string(self): - calls = gdb.parse_and_eval("f()") - return "mytype is %s" % self.val["x"] - - -def ec_lookup_function(val): - typ = val.type - if typ.code == gdb.TYPE_CODE_REF: - typ = typ.target() - if str(typ) == "struct mytype": - return MytypePrinter(val) - return None - - -def disable_lookup_function(): - ec_lookup_function.enabled = False - - -def enable_lookup_function(): - ec_lookup_function.enabled = True - - -gdb.pretty_printers.append(ec_lookup_function) -- cgit v1.1