* [RFC][PATCH] - Fix pretty-printers which call the inferiors, mi-interface crashs
@ 2016-06-02 9:08 Vörtler, Thilo
0 siblings, 0 replies; only message in thread
From: Vörtler, Thilo @ 2016-06-02 9:08 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 774 bytes --]
Hi,
as described in Bug 17437 the mi interface corrupts cached frames in
the list_arg_or_local function of mi-cmd-stack.c when a pretty-printer
calls a function of the inferior. To prevent this the frame_id is stored
and used to restore the frame after calling list_arg_or_local
- MI regressions were run and no effect through the patch was seen
Is this patch okay?
BR, Thilo
gdb/ChangeLog:
2016-06-02 Thilo Vörtler <thilo.voertler@coseda-tech.com>
* mi-cmd-stack.c (list_args_or_locals) the mi interface corrupts
cached frames in the list_arg_or_local function of mi-cmd-stack.c when
a pretty-printer calls a function of the inferior. To prevent this the
frame_id is stored and used to restore the frame after calling
list_arg_or_local
[-- Attachment #2: 0001-FIX-pretty-printers-which-call-the-inferiors-though-.patch --]
[-- Type: application/octet-stream, Size: 1418 bytes --]
From 1bd73a4b39fcbe31362c57a6d2e0392018a62435 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thilo=20V=C3=B6rtler?= <thilo.voertler@coseda-tech.com>
Date: Wed, 1 Jun 2016 15:16:57 +0200
Subject: [PATCH] FIX pretty-printers which call the inferiors though the mi-interface
- as described in Bug 17437 the mi interface corrupts cached frames in
the list_arg_or_local function of mi-cmd-stack.c when a pretty-printer
calls a function of the inferior. To prevent this the frame_id is stored
and used to restore the frame after calling list_arg_or_local
- MI regressions were run and no effect through the patch was seen
---
gdb/mi/mi-cmd-stack.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 390fc7e..5622834 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -581,8 +581,10 @@ list_args_or_locals (enum what_to_list what, enum print_values values,
struct type *type;
char *name_of_result;
struct ui_out *uiout = current_uiout;
+ struct frame_id id;
block = get_frame_block (fi, 0);
+ id = get_frame_id (fi);
switch (what)
{
@@ -680,6 +682,8 @@ list_args_or_locals (enum what_to_list what, enum print_values values,
list_arg_or_local (&entryarg, what, values, skip_unavailable);
xfree (arg.error);
xfree (entryarg.error);
+
+ fi = frame_find_by_id(id);
}
}
--
1.7.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-02 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02 9:08 [RFC][PATCH] - Fix pretty-printers which call the inferiors, mi-interface crashs Vörtler, Thilo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox