From 3bf9c013e4a7b72aaa7e242e163a776ad7347c26 Mon Sep 17 00:00:00 2001 From: Jan Vrany Date: Mon, 27 Aug 2018 21:52:44 +0100 Subject: MI: Fix printing of frame architecture with Python frame filters enabled Commit 6d52907e226a (MI: Print frame architecture when printing frames on an MI channel) added frame's architecture to MI frame output. However the frame architecture was not correctly printed in the output of "-stack-list-frames" with frame filters enabled (via "-enable-frame-filters"). This was because with frame filters enabled, the actual frame printing is done in "py_print_frame" rather than "print_frame". This issue is now fixed. gdb/Changelog: 2018-08-27 Jan Vrany * python/py-framefilter.c (py_print_frame): Print frame architecture when printing on an MI output. gdb/testsuite/Changelog: 2018-08-27 Jan Vrany * gdb.python/py-framefilter-mi.exp: Update regexp to check for "arch" field in frame output. --- gdb/python/py-framefilter.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/python') diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c index 4edefd4..fe17b70 100644 --- a/gdb/python/py-framefilter.c +++ b/gdb/python/py-framefilter.c @@ -958,6 +958,9 @@ py_print_frame (PyObject *filter, frame_filter_flags flags, out->field_int ("line", line); } } + if (out->is_mi_like_p ()) + out->field_string ("arch", + (gdbarch_bfd_arch_info (gdbarch))->printable_name); } /* For MI we need to deal with the "children" list population of -- cgit v1.1