public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Make tui_gen_win_info constructor protected Date: Tue, 25 Jun 2019 14:03:00 -0000 [thread overview] Message-ID: <20190625140352.46782.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fb54fa768d148ccd07f2b27ae26e87d95605986c commit fb54fa768d148ccd07f2b27ae26e87d95605986c Author: Tom Tromey <tom@tromey.com> Date: Sun Jun 23 16:34:39 2019 -0600 Make tui_gen_win_info constructor protected Now that all the window types have their own concrete classes, the tui_gen_win_info constructor can be protected. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (init_and_make_win): Assert on unrecognized type. * tui/tui-data.h (struct tui_gen_win_info): Make constructor protected. Diff: --- gdb/ChangeLog | 7 +++++++ gdb/tui/tui-data.h | 4 ++++ gdb/tui/tui-layout.c | 4 +--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 43ed9bc..62e9053 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2019-06-25 Tom Tromey <tom@tromey.com> + * tui/tui-layout.c (init_and_make_win): Assert on unrecognized + type. + * tui/tui-data.h (struct tui_gen_win_info): Make constructor + protected. + +2019-06-25 Tom Tromey <tom@tromey.com> + * tui/tui-winsource.c (tui_source_window_base::set_is_exec_point_at): Add check against LOA_ADDRESS. diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index b7cf05c..8991a4a 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -34,11 +34,15 @@ struct tui_point /* Generic window information. */ struct tui_gen_win_info { +protected: + explicit tui_gen_win_info (enum tui_win_type t) : type (t) { } +public: + virtual ~tui_gen_win_info (); /* Call to refresh this window. */ diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 9dbb599..d9a1f08 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -815,9 +815,7 @@ init_and_make_win (tui_gen_win_info *win_info, break; default: - gdb_assert (tui_win_is_auxiliary (win_type)); - win_info = new tui_gen_win_info (win_type); - break; + gdb_assert_not_reached (_("unhandled window type")); } }
reply other threads:[~2019-06-25 14:03 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190625140352.46782.qmail@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@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).