This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFAv5 2/3] Test the convenience functions $_gdb_setting and $_gdb_int_setting.
- From: Pedro Alves <palves at redhat dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>, gdb-patches at sourceware dot org
- Date: Wed, 30 Oct 2019 19:44:05 +0000
- Subject: Re: [RFAv5 2/3] Test the convenience functions $_gdb_setting and $_gdb_int_setting.
- References: <20190915185314.19875-1-philippe.waroquiers@skynet.be> <20190915185314.19875-3-philippe.waroquiers@skynet.be>
The subject is stale -- it's $_gdb_setting / $_gdb_setting_str nowadays.
> +# Verifies that $_gdb_setting (SETTING) gives a value whose ptype matches EXPECTED.
> +proc check_type {setting expected} {
> + with_test_prefix "check_type $setting $expected" {
> + gdb_test "print \$_gdb_maint_setting(\"$setting\")"
> + gdb_test "ptype $" "$expected"
> + }
> }
>
I think it would still be good to add here:
gdb_test "ptype \$_gdb_maint_setting(\"$setting\")" \
"type = int"
This is so if someone changes ptype of convenience
functions, maybe making it work for this case, the testcase makes
sure this case is inspected.
Otherwise this version LGTM.
Thanks,
Pedro Alves