diff options
author | Pedro Alves <pedro@palves.net> | 2022-05-27 16:53:49 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2022-06-17 09:58:49 +0100 |
commit | dac9773e17261f905d51684fe35da036e82c69cd (patch) | |
tree | d2db5b16a215c83434d7e222585e204d9d491f6c /gdb/location.c | |
parent | 709438c75abc52cdc4888e7eaa089c2709c75a07 (diff) | |
download | gdb-dac9773e17261f905d51684fe35da036e82c69cd.zip gdb-dac9773e17261f905d51684fe35da036e82c69cd.tar.gz gdb-dac9773e17261f905d51684fe35da036e82c69cd.tar.bz2 |
Convert set_location_spec_string to a method
This converts set_location_spec_string to a method of location_spec,
and makes the location_spec::as_string field protected, renaming it to
m_as_string along the way.
Change-Id: Iccfb1654e9fa7808d0512df89e775f9eacaeb9e0
Diffstat (limited to 'gdb/location.c')
-rw-r--r-- | gdb/location.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gdb/location.c b/gdb/location.c index e22ee41..2b31baa 100644 --- a/gdb/location.c +++ b/gdb/location.c @@ -60,7 +60,7 @@ probe_location_spec::empty_p () const std::string probe_location_spec::compute_string () const { - return std::move (as_string); + return std::move (m_as_string); } /* A "normal" linespec. */ @@ -131,7 +131,7 @@ address_location_spec::address_location_spec (CORE_ADDR addr, address (addr) { if (addr_string != nullptr) - as_string = std::string (addr_string, addr_string_len); + m_as_string = std::string (addr_string, addr_string_len); } location_spec_up @@ -857,12 +857,3 @@ string_to_location_spec (const char **stringp, spec. */ return string_to_location_spec_basic (stringp, language, match_type); } - -/* See description in location.h. */ - -void -set_location_spec_string (struct location_spec *locspec, - std::string &&string) -{ - locspec->as_string = std::move (string); -} |