diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-25 12:39:51 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-25 12:41:02 -0600 |
commit | d525a99be1b02dda6c69007e31dd06f276378aea (patch) | |
tree | 1fc7017164c71811abc89b028e2fb99d87f8a33a /gdb/mi | |
parent | da505cff6e29b18244dc9f6886bcb4d436263dee (diff) | |
download | gdb-d525a99be1b02dda6c69007e31dd06f276378aea.zip gdb-d525a99be1b02dda6c69007e31dd06f276378aea.tar.gz gdb-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')
-rw-r--r-- | gdb/mi/mi-interp.c | 8 |
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"); |