From d525a99be1b02dda6c69007e31dd06f276378aea Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 25 May 2018 12:39:51 -0600 Subject: Add "name" method to class interp In a review Pedro pointed out that interp::name is intended to be read-only, and so an accessor would be a better fit. This patch renames the field and adds a "name" method that is used instead. ChangeLog 2018-05-25 Tom Tromey * tui/tui.c (tui_enable): Update. * mi/mi-interp.c (mi_interp::init): Update. * interps.h (class interp) : New method. : Rename from name. (~scoped_restore_interp): Update. * interps.c (interp::interp): Update. (interp_add, interp_set, interp_lookup_existing) (current_interp_named_p): Update. --- gdb/mi/mi-interp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/mi') diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index e52d797..ebc899f 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -130,13 +130,13 @@ mi_interp::init (bool top_level) /* INTERP_MI selects the most recent released version. "mi2" was released as part of GDB 6.0. */ - if (strcmp (name, INTERP_MI) == 0) + if (strcmp (name (), INTERP_MI) == 0) mi_version = 2; - else if (strcmp (name, INTERP_MI1) == 0) + else if (strcmp (name (), INTERP_MI1) == 0) mi_version = 1; - else if (strcmp (name, INTERP_MI2) == 0) + else if (strcmp (name (), INTERP_MI2) == 0) mi_version = 2; - else if (strcmp (name, INTERP_MI3) == 0) + else if (strcmp (name (), INTERP_MI3) == 0) mi_version = 3; else gdb_assert_not_reached ("unhandled MI version"); -- cgit v1.1