Skip to content
Commit d369b608 authored by Simon Marchi's avatar Simon Marchi Committed by Simon Marchi
Browse files

gdb: add gdb_argv::as_array_view method

Introduce the gdb_argv::as_array_view method, as a way to easily pass
the parsed arguments array to a function taking an array view.  There is
currently one caller where we can use this (which prompted the
suggestion to implement this method).

Add some selftests for the new method, which at the same time test a
little bit gdb_argv.  As far as I know, it's not tested currently.

gdb/ChangeLog:

	* utils.h (class gdb_argv) <as_array_view>: New method.
	* utils.c (gdb_argv_as_array_view_test): New.
	(_initialize_utils): Register selftest.
	* maint.c (maintenance_selftest): Use the new method.

Change-Id: I0645037613ed6549aabe60f14a36f3494513b177
parent 19bddbe9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment