[PATCH 00/16] Add styling to the gdb CLI and TUI

Pedro Alves palves@redhat.com
Thu Mar 21 16:12:00 GMT 2019


On 03/21/2019 04:06 PM, Simon Marchi wrote:
> On 2019-03-21 12:01, Eli Zaretskii wrote:
>>> Date: Thu, 21 Mar 2019 11:02:00 -0400
>>> From: Simon Marchi <simark@simark.ca>
>>> Cc: tom@tromey.com, gdb-patches@sourceware.org
>>>
>>> > I don't have a strong opinion, but I do have a weak one: the decimal
>>> > "encoding" makes it much easier for humans to construct version
>>> > numbers, they don't need to convert to hex.
>>>
>>> There's not much difference in hex, you would just write "if
>>> $_gdb_version >= 0x0901" for example, rather than "if $_gdb_version >=
>>> 901".

Is there an advantage of a single variable that encodes the version,
compared to separate major/minor variables?  Separate variables
would render the discussion of how to encode this moot.

GCC has these as predefined preprocessor macros:

 __GNUC__
 __GNUC_MINOR__
 __GNUC_PATCHLEVEL__

We could likewise have separate variables for these.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list