public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "xdje42 at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug mi/18832] New: mi_command_param_changed should protect redirection with a cleanup Date: Mon, 17 Aug 2015 01:10:00 -0000 [thread overview] Message-ID: <bug-18832-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=18832 Bug ID: 18832 Summary: mi_command_param_changed should protect redirection with a cleanup Product: gdb Version: unknown Status: NEW Severity: normal Priority: P2 Component: mi Assignee: unassigned at sourceware dot org Reporter: xdje42 at gmail dot com Target Milestone: --- Filing this so I don't forget. This code should protect the restoration of the redirection with a cleanup. An audit of all of MI might be in order. static void mi_command_param_changed (const char *param, const char *value) { struct mi_interp *mi = top_level_interpreter_data (); struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ()); if (mi_suppress_notification.cmd_param_changed) return; target_terminal_ours (); fprintf_unfiltered (mi->event_channel, "cmd-param-changed"); ui_out_redirect (mi_uiout, mi->event_channel); ui_out_field_string (mi_uiout, "param", param); ui_out_field_string (mi_uiout, "value", value); ui_out_redirect (mi_uiout, NULL); gdb_flush (mi->event_channel); } Another issue is that we only support one level of redirection in mi_out_data (if we're already in the middle of a redirection, doing another will leave gdb in a bad state and possible future segv, but that's a separate bug). -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2015-08-17 1:10 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-17 1:10 xdje42 at gmail dot com [this message] 2024-01-13 21:09 ` [Bug mi/18832] " ssbssa at sourceware dot org 2024-01-14 16:53 ` tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-18832-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).