aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-interp.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-25 12:39:51 -0600
committerTom Tromey <tom@tromey.com>2018-05-25 12:41:02 -0600
commitd525a99be1b02dda6c69007e31dd06f276378aea (patch)
tree1fc7017164c71811abc89b028e2fb99d87f8a33a /gdb/mi/mi-interp.c
parentda505cff6e29b18244dc9f6886bcb4d436263dee (diff)
downloadbinutils-d525a99be1b02dda6c69007e31dd06f276378aea.zip
binutils-d525a99be1b02dda6c69007e31dd06f276378aea.tar.gz
binutils-d525a99be1b02dda6c69007e31dd06f276378aea.tar.bz2
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 <tom@tromey.com> * tui/tui.c (tui_enable): Update. * mi/mi-interp.c (mi_interp::init): Update. * interps.h (class interp) <name>: New method. <m_name>: Rename from name. (~scoped_restore_interp): Update. * interps.c (interp::interp): Update. (interp_add, interp_set, interp_lookup_existing) (current_interp_named_p): Update.
Diffstat (limited to 'gdb/mi/mi-interp.c')
-rw-r--r--gdb/mi/mi-interp.c8
1 files changed, 4 insertions, 4 deletions
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");