diff options
author | Pedro Alves <pedro@palves.net> | 2022-05-27 16:33:56 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2022-06-17 09:58:49 +0100 |
commit | 7464aeaab47ca3fb7127223fe372489c9c7ed69e (patch) | |
tree | 0b301cd6c229f435b44b97b81ac543ab840a0a2b /gdb/location.c | |
parent | 238dc9af03392ecd8129ee54a340efd736782cf9 (diff) | |
download | binutils-7464aeaab47ca3fb7127223fe372489c9c7ed69e.zip binutils-7464aeaab47ca3fb7127223fe372489c9c7ed69e.tar.gz binutils-7464aeaab47ca3fb7127223fe372489c9c7ed69e.tar.bz2 |
Convert location_spec_type to a method
This converts location_spec_type to location_spec::type().
Change-Id: Iff4cbfafb1cf3d22adfa142ff939b4a148e52273
Diffstat (limited to 'gdb/location.c')
-rw-r--r-- | gdb/location.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/gdb/location.c b/gdb/location.c index ae056f3..9643ea8 100644 --- a/gdb/location.c +++ b/gdb/location.c @@ -206,14 +206,6 @@ explicit_location_spec::compute_string () const /* See description in location.h. */ -enum location_spec_type -location_spec_type (const location_spec *locspec) -{ - return locspec->type; -} - -/* See description in location.h. */ - location_spec_up new_linespec_location_spec (const char **linespec, symbol_name_match_type match_type) @@ -227,7 +219,7 @@ new_linespec_location_spec (const char **linespec, const linespec_location_spec * as_linespec_location_spec (const location_spec *locspec) { - gdb_assert (locspec->type == LINESPEC_LOCATION_SPEC); + gdb_assert (locspec->type () == LINESPEC_LOCATION_SPEC); return static_cast<const linespec_location_spec *> (locspec); } @@ -246,7 +238,7 @@ new_address_location_spec (CORE_ADDR addr, const char *addr_string, const address_location_spec * as_address_location_spec (const location_spec *locspec) { - gdb_assert (locspec->type == ADDRESS_LOCATION_SPEC); + gdb_assert (locspec->type () == ADDRESS_LOCATION_SPEC); return static_cast<const address_location_spec *> (locspec); } @@ -263,7 +255,7 @@ new_probe_location_spec (std::string &&probe) const probe_location_spec * as_probe_location_spec (const location_spec *locspec) { - gdb_assert (locspec->type == PROBE_LOCATION_SPEC); + gdb_assert (locspec->type () == PROBE_LOCATION_SPEC); return static_cast<const probe_location_spec *> (locspec); } @@ -272,7 +264,7 @@ as_probe_location_spec (const location_spec *locspec) const explicit_location_spec * as_explicit_location_spec (const location_spec *locspec) { - gdb_assert (locspec->type == EXPLICIT_LOCATION_SPEC); + gdb_assert (locspec->type () == EXPLICIT_LOCATION_SPEC); return static_cast<const explicit_location_spec *> (locspec); } @@ -281,7 +273,7 @@ as_explicit_location_spec (const location_spec *locspec) explicit_location_spec * as_explicit_location_spec (location_spec *locspec) { - gdb_assert (locspec->type == EXPLICIT_LOCATION_SPEC); + gdb_assert (locspec->type () == EXPLICIT_LOCATION_SPEC); return static_cast<explicit_location_spec *> (locspec); } |