public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Use new and delete for TUI windows
@ 2019-06-25 16:22 gdb-buildbot
  2019-06-25 16:22 ` Failures on Fedora-i686, branch master gdb-buildbot
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gdb-buildbot @ 2019-06-25 16:22 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 6792b55e08ec49f40916d4f8d7168d0047b9e928 ***

commit 6792b55e08ec49f40916d4f8d7168d0047b9e928
Author:     Tom Tromey <tom@tromey.com>
AuthorDate: Sun Jun 16 09:41:06 2019 -0600
Commit:     Tom Tromey <tom@tromey.com>
CommitDate: Tue Jun 25 07:48:23 2019 -0600

    Use new and delete for TUI windows
    
    This changes tui_win_info to use new and delete, rather than XNEW and
    xfree.
    
    gdb/ChangeLog
    2019-06-25  Tom Tromey  <tom@tromey.com>
    
            * tui/tui-data.h (struct tui_win_info): Add constructor.
            * tui/tui-data.c (tui_alloc_win_info): Use new.
            (tui_free_window): Use delete.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 29c568f5d3..b4395c0138 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-25  Tom Tromey  <tom@tromey.com>
+
+	* tui/tui-data.h (struct tui_win_info): Add constructor.
+	* tui/tui-data.c (tui_alloc_win_info): Use new.
+	(tui_free_window): Use delete.
+
 2019-06-22  Tom Tromey  <tom@tromey.com>
 
 	* tui/tui-windata.h (tui_first_data_element_no_in_line): Don't
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index b67cb48c2e..117bda3c20 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -531,9 +531,8 @@ init_win_info (struct tui_win_info *win_info)
 struct tui_win_info *
 tui_alloc_win_info (enum tui_win_type type)
 {
-  struct tui_win_info *win_info = XNEW (struct tui_win_info);
+  struct tui_win_info *win_info = new struct tui_win_info (type);
 
-  win_info->generic.type = type;
   init_win_info (win_info);
 
   return win_info;
@@ -654,7 +653,7 @@ tui_free_window (struct tui_win_info *win_info)
     }
   if (win_info->generic.title)
     xfree (win_info->generic.title);
-  xfree (win_info);
+  delete win_info;
 }
 
 
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index c696feed28..047ee35d98 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -271,6 +271,13 @@ struct tui_command_info
 /* This defines information about each logical window.  */
 struct tui_win_info
 {
+  explicit tui_win_info (enum tui_win_type type)
+  {
+    generic.type = type;
+  }
+
+  DISABLE_COPY_AND_ASSIGN (tui_win_info);
+
   struct tui_gen_win_info generic;	/* General window information.  */
   union
   {


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

end of thread, other threads:[~2019-07-09 17:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 16:22 [binutils-gdb] Use new and delete for TUI windows gdb-buildbot
2019-06-25 16:22 ` Failures on Fedora-i686, branch master gdb-buildbot
2019-06-25 16:41 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2019-06-25 16:41 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2019-06-25 16:46 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2019-06-25 17:39 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
2019-06-25 18:26 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
2019-06-25 18:28 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
2019-07-09 17:10 ` *** COMPILATION FAILED *** Failures on NetBSD-x86_64-m64, branch master *** BREAKAGE *** gdb-buildbot

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