public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/18832] New: mi_command_param_changed should protect redirection with a cleanup
@ 2015-08-17  1:10 xdje42 at gmail dot com
  2024-01-13 21:09 ` [Bug mi/18832] " ssbssa at sourceware dot org
  2024-01-14 16:53 ` tromey at sourceware dot org
  0 siblings, 2 replies; 3+ messages in thread
From: xdje42 at gmail dot com @ 2015-08-17  1:10 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug mi/18832] mi_command_param_changed should protect redirection with a cleanup
  2015-08-17  1:10 [Bug mi/18832] New: mi_command_param_changed should protect redirection with a cleanup xdje42 at gmail dot com
@ 2024-01-13 21:09 ` ssbssa at sourceware dot org
  2024-01-14 16:53 ` tromey at sourceware dot org
  1 sibling, 0 replies; 3+ messages in thread
From: ssbssa at sourceware dot org @ 2024-01-13 21:09 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18832

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org

--- Comment #1 from Hannes Domani <ssbssa at sourceware dot org> ---
I think this was fixed by this commit:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=992aeed80b0a6ef1d60ce01df52f3397c3274f35

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug mi/18832] mi_command_param_changed should protect redirection with a cleanup
  2015-08-17  1:10 [Bug mi/18832] New: mi_command_param_changed should protect redirection with a cleanup xdje42 at gmail dot com
  2024-01-13 21:09 ` [Bug mi/18832] " ssbssa at sourceware dot org
@ 2024-01-14 16:53 ` tromey at sourceware dot org
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at sourceware dot org @ 2024-01-14 16:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18832

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Agreed.
Feel free to close bugs if you think they are fixed btw.
You can always ask the reporter to chime in if there's some question.
There are many, many open bugs that I'm sure are obsolete just
by reason of their age...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-14 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-17  1:10 [Bug mi/18832] New: mi_command_param_changed should protect redirection with a cleanup xdje42 at gmail dot com
2024-01-13 21:09 ` [Bug mi/18832] " ssbssa at sourceware dot org
2024-01-14 16:53 ` tromey at sourceware dot org

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).