Re: [PATCH v3 5/8] gdbserver: Transmit target description ID in thread list and stop reply

Simon Marchi via Gdb-patches
2023-02-02T20:56:57Z

> I agree it makes more sense to use hex everywhere.
>
> In the case of XML attribute fields, enforcing hex would mean adding a
> base parameter to xml_parse_unsigned_integer (which currently accepts
> decimal, octal and hex). I'll do that.
>
> In the case of the core field, to avoid breaking existing stubs it's
> probably better to document that it can accept any of the three bases.

The "core" field is parsed using gdb_xml_parse_attr_ulongest, which uses
strtoulst with a base of 0. So I suppose that an hex value with the 0x
prefix would work. So bases other than 10 can work, but they need to
have the appropriate prefix.

Simon