1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00

Documentation

This commit is contained in:
empathicqubit 2022-02-20 11:44:08 +01:00 committed by mrdudz
parent 2bd30afdeb
commit 06ddd042f2

View File

@ -198,6 +198,189 @@ Here is a description of all the command line options:
Enables debug mode, for debugging the behavior of cc65. Enables debug mode, for debugging the behavior of cc65.
<tag><tt>--debug-tables name</tt></tag>
Writes symbol table information to a file, which includes details on structs, unions
functions, and global variables. For example, given the following code:
<tscreen><verb>
struct l {
unsigned char m;
unsigned char n;
};
struct hello {
unsigned char j;
unsigned char k;
struct l l;
};
struct sub {
unsigned char x;
unsigned char y;
};
union xy {
struct sub xy;
unsigned int mem;
};
typedef struct hello thingy;
unsigned char single;
unsigned char test_local_vars_main(void) {
static unsigned char wahoo;
static unsigned char bonanza = 0x42;
unsigned char i;
unsigned int j;
unsigned int *random;
unsigned char *lol;
signed char whoa;
struct hello wow;
thingy *cool;
union xy xy;
return 0;
}
</verb></tscreen>
The following output would be produced:
<tscreen><verb>
SC_FUNC: _test_local_vars_main: Symbol table
============================================
__fixargs__:
Flags: SC_CONST SC_DEF
Type: unsigned int
__argsize__:
Flags: SC_CONST SC_DEF
Type: unsigned char
wahoo:
AsmName: M0001
Flags: SC_STATIC SC_DEF SC_REF
Type: unsigned char
bonanza:
AsmName: M0002
Flags: SC_STATIC SC_DEF SC_REF
Type: unsigned char
i:
Flags: SC_AUTO SC_DEF SC_REF
Type: unsigned char
j:
Flags: SC_AUTO SC_DEF SC_REF
Type: unsigned int
random:
Flags: SC_AUTO SC_DEF SC_REF
Type: unsigned int *
lol:
Flags: SC_AUTO SC_DEF SC_REF
Type: unsigned char *
whoa:
Flags: SC_AUTO SC_DEF SC_REF
Type: signed char
wow:
Flags: SC_AUTO SC_DEF SC_REF
Type: struct hello
cool:
Flags: SC_AUTO SC_DEF SC_REF
Type: struct hello *
xy:
Flags: SC_AUTO SC_DEF SC_REF
Type: union xy
Global symbol table
===================
thingy:
AsmName: _thingy
Flags: SC_TYPEDEF 0x100000
Type: struct hello
single:
AsmName: _single
Flags: SC_STATIC SC_EXTERN SC_STORAGE SC_DEF SC_REF 0x100000
Type: unsigned char
test_local_vars_main:
AsmName: _test_local_vars_main
Flags: SC_FUNC SC_STATIC SC_EXTERN SC_DEF 0x100000
Type: unsigned char (void)
Global tag table
================
l:
Flags: SC_STRUCT SC_DEF
Type: (none)
hello:
Flags: SC_STRUCT SC_DEF
Type: (none)
sub:
Flags: SC_STRUCT SC_DEF
Type: (none)
xy:
Flags: SC_UNION SC_DEF
Type: (none)
Global struct and union definitions
=========================
SC_STRUCT: l
============
m:
Flags: SC_STRUCTFIELD
Type: unsigned char
n:
Flags: SC_STRUCTFIELD
Type: unsigned char
SC_STRUCT: hello
================
j:
Flags: SC_STRUCTFIELD
Type: unsigned char
k:
Flags: SC_STRUCTFIELD
Type: unsigned char
l:
Flags: SC_STRUCTFIELD
Type: struct l
SC_STRUCT: sub
==============
x:
Flags: SC_STRUCTFIELD
Type: unsigned char
y:
Flags: SC_STRUCTFIELD
Type: unsigned char
SC_UNION: xy
============
xy:
Flags: SC_STRUCTFIELD
Type: struct sub
mem:
Flags: SC_STRUCTFIELD
Type: unsigned int
</verb></tscreen>
<tag><tt>--debug-opt name</tt></tag> <tag><tt>--debug-opt name</tt></tag>
The named file contains a list of specific optimization steps to enable or disable. The named file contains a list of specific optimization steps to enable or disable.