[review v2] Fix crash with core + TUI + run

Pedro Alves (Code Review)
2019-11-08T23:14:36Z

Pedro Alves has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/483
......................................................................

Patch Set 2:

(1 comment)

> --- gdb/target.c
> +++ gdb/target.c
> @@ -569,14 +566,18 @@ target_stack::push (target_ops *t)
> - }
> + prev = m_stack[stratum];
>
> /* Now add the new one. */
> m_stack[stratum] = t;
>
> + /* And close the previous one, if it exists. */
> + if (prev != nullptr)
> + target_close (prev);
> +

PS1, Line 574:

> Soundcheck. 1... 2... 3...

Now with a quote.

> if (m_top < stratum)
> m_top = stratum;
> }
>
> /* See target.h. */
>
> void
> push_target (struct target_ops *t)
> {

--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I39e2f8b538c580c8ea5bf1d657ee877e47746c8f
Gerrit-Change-Number: 483
Gerrit-PatchSet: 2
Gerrit-Owner: Sergio Durigan Junior <sergiodj@redhat.com>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Reviewer: Sergio Durigan Junior <sergiodj@redhat.com>
Gerrit-Comment-Date: Fri, 08 Nov 2019 23:14:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Pedro Alves <palves@redhat.com>
Comment-In-Reply-To: Sergio Durigan Junior <sergiodj@redhat.com>