diff options
author | Lancelot SIX <lsix@lancelotsix.com> | 2021-10-19 21:44:19 +0000 |
---|---|---|
committer | Lancelot SIX <lsix@lancelotsix.com> | 2021-11-08 21:55:35 +0000 |
commit | 8b4195d8d1d1a7c328f9b0dc48cdbf3d8abb6fe6 (patch) | |
tree | 9ec30a4c2518e4e9459ca40d6b079795087cfda5 /gdb/utils.h | |
parent | 234f075cc69d125a9175f9fb0a5f56a1b3388622 (diff) | |
download | fsf-binutils-gdb-8b4195d8d1d1a7c328f9b0dc48cdbf3d8abb6fe6.zip fsf-binutils-gdb-8b4195d8d1d1a7c328f9b0dc48cdbf3d8abb6fe6.tar.gz fsf-binutils-gdb-8b4195d8d1d1a7c328f9b0dc48cdbf3d8abb6fe6.tar.bz2 |
Add a const version of gdb_argv:as_array_view
This commits adds const versions for the GET and AS_ARRAX_VIEW methods
of gdb_argv. Those methods will be required in the following patch of
the series.
Diffstat (limited to 'gdb/utils.h')
-rw-r--r-- | gdb/utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/utils.h b/gdb/utils.h index f05e662..6f3a702 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -195,6 +195,11 @@ public: return m_argv; } + const char * const * get () const + { + return m_argv; + } + /* Return the underlying array, transferring ownership to the caller. */ @@ -227,6 +232,11 @@ public: return gdb::array_view<char *> (this->get (), this->count ()); } + gdb::array_view<const char * const> as_array_view () const + { + return gdb::array_view<const char * const> (this->get (), this->count ()); + } + /* Append arguments to this array. */ void append (gdb_argv &&other) { |