Change the available options to -dM and -dP. The former prints user macros,

the latter predefined macros. Can be combined by using -dMP or -dPM.
This commit is contained in:
Kugel Fuhr
2025-06-16 11:16:13 +02:00
parent b7a5ec86c5
commit adc9ddc280
7 changed files with 57 additions and 73 deletions

View File

@@ -63,9 +63,8 @@ Short options:
-V Print the compiler version number
-W [-+]warning[,...] Control warnings ('-' disables, '+' enables)
-d Debug mode
-dD Output user defined macros (needs -E)
-dM Output all macro definitions (needs -E)
-dN Output user defined macro names (needs -E)
-dM Output all user macros (needs -E)
-dP Output all predefined macros (needs -E)
-g Add debug info to object file
-h Help (this text)
-j Default characters are signed
@@ -202,24 +201,26 @@ Here is a description of all the command line options:
Enables debug mode, for debugging the behavior of cc65.
<label id="option-dD">
<tag><tt>-dD</tt></tag>
Like <tt/<ref id="option-dM" name="-dM">/ but does not include the predefined
macros.
<label id="option-dM">
<tag><tt>-dM</tt></tag>
When used with -E, will output <tt>#define</tt> directives for all the user
macros defined during execution of the preprocessor. This does not include
macros defined by the compiler.
Note: Can be combined with <tt/<ref id="option-dP" name="-dP">/ by using
<tt/-dMP/.
<label id="option-dP">
<tag><tt>-dP</tt></tag>
When used with -E, will output <tt>#define</tt> directives for all the macros
defined during execution of the preprocessor, including predefined macros.
defined by the compiler itself. This does not include any user defined macros.
<tag><tt>-dN</tt></tag>
Like <tt/<ref id="option-dD" name="-dD">/ but will only output the macro names,
not their definitions.
Note: Can be combined with <tt/<ref id="option-dM" name="-dM">/ by using
<tt/-dMP/.
<tag><tt>--debug-tables name</tt></tag>