mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
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.
This commit is contained in:
10
gdb/utils.h
10
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user