Re: [PATCHv2] Restore gdb.SYMBOL_STRUCT_DOMAIN constant

Tom Tromey
2021-06-02T18:40:50Z

>>>>> "Hannes" == Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> writes:

Hannes> It was removed (probably by mistake) in
Hannes> 51e78fc5fa21870d415c52f90b93e3c6ad57be46.

Yes, sorry about that.

Hannes> gdb/ChangeLog:

Hannes> 2021-05-26 Hannes Domani <ssbssa@yahoo.de>

Hannes> * python/py-symbol.c (gdbpy_initialize_symbols): Restore
Hannes> gdb.SYMBOL_LABEL_DOMAIN constant.

Hannes> gdb/testsuite/ChangeLog:

Hannes> 2021-05-26 Hannes Domani <ssbssa@yahoo.de>

Hannes> * gdb.python/py-symbol.exp: Test symbol constants.

This is ok. Thank you.

Hannes> +# Test gdb.Symbol domain categories
Hannes> +gdb_test "python print gdb.SYMBOL_UNDEF_DOMAIN" \
Hannes> + "0" "test gdb.SYMBOL_UNDEF_DOMAIN"
Hannes> +gdb_test "python print gdb.SYMBOL_VAR_DOMAIN" \
Hannes> + "1" "test gdb.SYMBOL_VAR_DOMAIN"

While we don't want people to rely on the values of these constants, it
seems harmless in the test suite. If someone changes one, they can just
update the test.

Tom