From e3c8365473bdabc09514406cc4018c44a8887f49 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Fri, 21 Mar 2003 22:53:02 +0000 Subject: [PATCH] * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54 * src/doc/cdbfileformat.lyx: added, written by Lenny Story * src/doc/Makefile: added cdbfileformat.lyx * src/doc/clean.mk: added cdbfileformat.lyx git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2404 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 3 + doc/Makefile | 9 +- doc/cdbfileformat.lyx | 3950 +++++++++++++++++++++++++++++++++++++++++ doc/clean.mk | 5 +- 4 files changed, 3964 insertions(+), 3 deletions(-) create mode 100644 doc/cdbfileformat.lyx diff --git a/ChangeLog b/ChangeLog index 66edd772..f3c1823c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2003-03-21 Bernhard Held * support/scripts/sdcc_mingw32: adapted to configure from autoconf 2.54 + * src/doc/cdbfileformat.lyx: added, written by Lenny Story + * src/doc/Makefile: added cdbfileformat.lyx + * src/doc/clean.mk: added cdbfileformat.lyx 2003-03-20 Bernhard Held diff --git a/doc/Makefile b/doc/Makefile index f3f765d2..dcb6f092 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -2,15 +2,18 @@ include ../Makefile.common MANUAL = sdccman TSS = test_suite_spec +CDB = cdbfileformat all: $(MANUAL).html $(MANUAL).pdf $(MANUAL).txt \ - $(TSS).html $(TSS).pdf $(TSS).txt + $(TSS).html $(TSS).pdf $(TSS).txt \ + $(CDB).html $(CDB).pdf $(CDB).txt install: $(INSTALL) -d $(docdir) cp -rf *.html *.txt z80 avr $(docdir) $(shell if [ -f $(MANUAL).html ]; then cp -rf $(MANUAL).html $(docdir); fi) $(shell if [ -f $(TSS).html ]; then cp -rf $(TSS).html $(docdir); fi) + $(shell if [ -f $(CDB).html ]; then cp -rf $(CDB).html $(docdir); fi) $(shell if [ -f *.pdf ]; then cp -rf *.pdf $(docdir); fi) uninstall: @@ -25,6 +28,10 @@ $(TSS).html: $(TSS).tex mkdir -p $@ latex2html -split 0 -dir $(TSS).html $(TSS) +$(CDB).html: $(CDB).tex + mkdir -p $@ + latex2html -split 0 -show_section_numbers -dir $(CDB).html $(CDB) + %.txt: %.lyx lyx -e text $< sed s/---/--/ $@ > $*.tmp diff --git a/doc/cdbfileformat.lyx b/doc/cdbfileformat.lyx new file mode 100644 index 00000000..f0b0b138 --- /dev/null +++ b/doc/cdbfileformat.lyx @@ -0,0 +1,3950 @@ +#LyX 1.2 created this file. For more info see http://www.lyx.org/ +\lyxformat 220 +\textclass article +\language english +\inputencoding auto +\fontscheme pslatex +\graphics default +\paperfontsize default +\spacing single +\papersize Default +\paperpackage a4 +\use_geometry 0 +\use_amsmath 0 +\use_natbib 0 +\use_numerical_citations 0 +\paperorientation portrait +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation skip +\defskip medskip +\quotes_language english +\quotes_times 2 +\papercolumns 1 +\papersides 1 +\paperpagestyle fancy + +\layout Title + +CDB File Format +\layout Author + +Lenny Story +\layout Standard +\align center +SDCC Development Team +\layout Standard + + +\begin_inset LatexCommand \tableofcontents{} + +\end_inset + + +\layout Section + +Overview +\layout Standard + +The CDB File is used to record all of the information that describes the + variables, functions, lines, and memory items. + These records provide the critical information that allows external utilities + to properly locate and interpret variables, functions, and types. + Development tools such as simulators debuggers and profilers use these + records to analyze and describe the code in terms of the high level language + in which it was written. + The CDB file is therefore the critical link to bridging the compiled code + image to the source files from which it was built. +\layout Section + +Usage +\layout Standard + +CDB files are created when the "- +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-debug" option is used. + Each source file will have its own CDB file associated with it. + When the - +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-debug flag is used during the link process, the CDB file of the FIRST source + module will contain all the records from all the source modules linked + as well as the linker records. +\layout Standard + +Code and variables that are removed during the optimization phase will not + be present in the debug file. + Images created for debugging purposes should always disable as much optimizatio +n as possible. + The following options are critical for the completeness of the resulting + debugging file. +\layout List +\labelwidthstring 00.00.0000 + +- +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-debug Mandatory to produce a debugging file. + +\layout List +\labelwidthstring 00.00.0000 + +- +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-noinduction Induction processing occurs at the very latest stages of compilatio +n. + This results in the inability to report the location of the resulting variables. + Including this option disables the loop induction optimization. + +\layout List +\labelwidthstring 00.00.0000 + +- +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-nooverlay Overlay variables will not show up in the debug file. + Including this option will force variables to the data segment. +\layout Section + +Conventions +\layout Standard + +The record examples and grammar shown in this document are displayed on + multiple lines only for the purposes of readability. + The records contained within the CDB files are always encoded on a single + line. + +\layout Standard + +Record grammar is indicated here using a custom format of the following + specifications: +\layout Itemize + +Record Elements are surrounded using the characters `<' and '>'. +\layout Itemize + +Alternation is indicated using the `|' character. +\layout Itemize + +Non-mandatory items are surrounded using the characters `{` and `}'. +\layout Section + +Record Formats +\layout Subsection + +Basic Record Format +\layout Description + +<:> +\layout Standard + + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + + +\series bold +Type +\end_inset + + +\begin_inset Text + +\layout Standard + + +\series bold +Description +\end_inset + + +\begin_inset Text + +\layout Standard + + +\series bold +Form +\end_inset + + + + +\begin_inset Text + +\layout Standard + +M +\end_inset + + +\begin_inset Text + +\layout Standard + +Module Record +\end_inset + + +\begin_inset Text + +\layout Standard + +Compiler +\end_inset + + + + +\begin_inset Text + +\layout Standard + +F +\end_inset + + +\begin_inset Text + +\layout Standard + +Function Record +\end_inset + + +\begin_inset Text + +\layout Standard + +Compiler +\end_inset + + + + +\begin_inset Text + +\layout Standard + +S +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol Record +\end_inset + + +\begin_inset Text + +\layout Standard + +Compiler +\end_inset + + + + +\begin_inset Text + +\layout Standard + +T +\end_inset + + +\begin_inset Text + +\layout Standard + +Structure (Complex Type) Record +\end_inset + + +\begin_inset Text + +\layout Standard + +Compiler +\end_inset + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Linker Record +\end_inset + + +\begin_inset Text + +\layout Standard + +Assembler / Linker +\end_inset + + + + +\end_inset + + +\layout Standard + +All records are ASCII text, with one record per line. + The record type is the first character, followed by a single colon ":". + Sub types are often included as part of the record specific format. +\layout Subsection + +Module Record +\layout Description + +<:> +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +M +\end_inset + + +\begin_inset Text + +\layout Standard + +Module record type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + +Filename +\end_inset + + +\begin_inset Text + +\layout Standard + +The filename of the module that this CDB file represents. +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Purpose +\layout Standard + +The module record is used to define a source module. + It is usually used at the beginning of each of the module specific CDB + files, and will occur several times in the final CDB file produced by the + linker to represent each of the source modules. + The location of this record within the file does not necessarily indicate + the scope of the variables that follow. + Those variables that have module specific scope have an indication encoded + within their respective symbol entry. +\layout Standard + + +\series bold +Examples +\layout Standard + + +\family typewriter +M:Timer0 +\newline +M:_bp +\layout Subsection + +Symbol Records +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +S +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol record type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + +G +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope is global +\end_inset + + + + +\begin_inset Text + +\layout Standard + +F +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope is file +\end_inset + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope is local +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol name +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope level (see below) +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope block (see below) +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Type chain record (see type record below) +\end_inset + + + + +\begin_inset Text + +\layout Standard + +
+\end_inset + + +\begin_inset Text + +\layout Standard + +Address space code (see table below) +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Is this symbol on the stack? Indicates if the next parameter is valid. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +The stack Offsetorelative to the +\begin_inset Quotes eld +\end_inset + +bp +\begin_inset Quotes erd +\end_inset + + variable. + (The libraries may have to be recompiled to include the - +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-debug option for this variable to appear in the debug file). +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +If the address space is 'R', this field indicates the register that the + symbol is allocated. + The register name is in its native form: R1, AX, etc. +\end_inset + + + + +\end_inset + + +\layout Description + +<:> +\series bold + +\newline +{G +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + F +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + L { function +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + +\begin_inset Quotes eld +\end_inset + +--null-- +\begin_inset Quotes eld +\end_inset + + } +\newline +<$> +\newline +<$> +\newline +<$> +\newline +<(><)> +\newline +<,> +\newline +<,> +\newline +<,> +\newline +<,><[><,>{<,>}<]> +\layout Standard + +A symbol record is generated for each named symbol in the source file; this + includes local, global and parameter symbols. + +\layout Standard + + +\series bold +Blocks and Levels +\layout Standard + +The level & block are used to further scope local variables since C allows + unique definitions across different scope blocks. + When using the symbol records, it is always important to include the level + and block information as part of the identification. + It is possible to have two symbols that share the same name, but have different + scope information. +\layout Standard + +The linker address records contain not only the name of the symbol, but + the Scope information as well, which is instrumental in determining the + correct instantiation of the symbol. +\layout Standard + +Linker C line records also contain the Scope information (see below). +\layout Standard + +The following code fragment illustrates a simple scope example: +\layout LyX-Code + +foo() +\layout LyX-Code + +{ +\layout LyX-Code + +int c; /* block #1 , level #1 */ +\layout LyX-Code + + { +\layout LyX-Code + + int c; /* block #2, level #2 */ +\layout LyX-Code + + ... +\layout LyX-Code + + } +\layout LyX-Code + + { +\layout LyX-Code + + int c; /* block #3 , level #2 */ +\layout LyX-Code + + ... +\layout LyX-Code + + } +\layout LyX-Code + +} +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +A +\end_inset + + +\begin_inset Text + +\layout Standard + +External stack +\end_inset + + + + +\begin_inset Text + +\layout Standard + +B +\end_inset + + +\begin_inset Text + +\layout Standard + +Internal stack +\end_inset + + + + +\begin_inset Text + +\layout Standard + +C +\end_inset + + +\begin_inset Text + +\layout Standard + +Code +\end_inset + + + + +\begin_inset Text + +\layout Standard + +D +\end_inset + + +\begin_inset Text + +\layout Standard + +Code / static segment +\end_inset + + + + +\begin_inset Text + +\layout Standard + +E +\end_inset + + +\begin_inset Text + +\layout Standard + +Internal ram (lower 128) bytes +\end_inset + + + + +\begin_inset Text + +\layout Standard + +F +\end_inset + + +\begin_inset Text + +\layout Standard + +External ram +\end_inset + + + + +\begin_inset Text + +\layout Standard + +G +\end_inset + + +\begin_inset Text + +\layout Standard + +Internal ram +\end_inset + + + + +\begin_inset Text + +\layout Standard + +H +\end_inset + + +\begin_inset Text + +\layout Standard + +Bit addressable +\end_inset + + + + +\begin_inset Text + +\layout Standard + +I +\end_inset + + +\begin_inset Text + +\layout Standard + +SFR space +\end_inset + + + + +\begin_inset Text + +\layout Standard + +J +\end_inset + + +\begin_inset Text + +\layout Standard + +SBIT space +\end_inset + + + + +\begin_inset Text + +\layout Standard + +R +\end_inset + + +\begin_inset Text + +\layout Standard + +Register space +\end_inset + + + + +\begin_inset Text + +\layout Standard + +Z +\end_inset + + +\begin_inset Text + +\layout Standard + +Used for function records, or any undefined space code +\end_inset + + + + +\end_inset + + +\layout Subsection + +Type Chain Record +\layout Description + +<{><}> +\series bold + <,> { <,>} <:> +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +The size of the item in decimal. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +The type encoded using the table below. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +The sign of the item. + Encoded as 'U' or 'S'. +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Purpose +\layout Standard + +The C programming language allows arbitrarily complex type constructions. + Because of this, the CDB file type designations are organized as a list + of basic primitive types. +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +DA +\end_inset + + +\begin_inset Text + +\layout Standard + +Array of n elements +\end_inset + + + + +\begin_inset Text + +\layout Standard + +DF +\end_inset + + +\begin_inset Text + +\layout Standard + +Function +\end_inset + + + + +\begin_inset Text + +\layout Standard + +DG +\end_inset + + +\begin_inset Text + +\layout Standard + +Generic pointer +\end_inset + + + + +\begin_inset Text + +\layout Standard + +DC +\end_inset + + +\begin_inset Text + +\layout Standard + +Code pointer +\end_inset + + + + +\begin_inset Text + +\layout Standard + +DX +\end_inset + + +\begin_inset Text + +\layout Standard + +External ram pointer +\end_inset + + + + +\begin_inset Text + +\layout Standard + +DD +\end_inset + + +\begin_inset Text + +\layout Standard + +Internal ram pointer +\end_inset + + + + +\begin_inset Text + +\layout Standard + +DP +\end_inset + + +\begin_inset Text + +\layout Standard + +Paged pointer +\end_inset + + + + +\begin_inset Text + +\layout Standard + +DI +\end_inset + + +\begin_inset Text + +\layout Standard + +Upper 128 byte pointer +\end_inset + + + + +\begin_inset Text + +\layout Standard + +SL +\end_inset + + +\begin_inset Text + +\layout Standard + +long +\end_inset + + + + +\begin_inset Text + +\layout Standard + +SI +\end_inset + + +\begin_inset Text + +\layout Standard + +int +\end_inset + + + + +\begin_inset Text + +\layout Standard + +SC +\end_inset + + +\begin_inset Text + +\layout Standard + +char +\end_inset + + + + +\begin_inset Text + +\layout Standard + +SS +\end_inset + + +\begin_inset Text + +\layout Standard + +short +\end_inset + + + + +\begin_inset Text + +\layout Standard + +SV +\end_inset + + +\begin_inset Text + +\layout Standard + +void +\end_inset + + + + +\begin_inset Text + +\layout Standard + +SF +\end_inset + + +\begin_inset Text + +\layout Standard + +float +\end_inset + + + + +\begin_inset Text + +\layout Standard + +ST +\end_inset + + +\begin_inset Text + +\layout Standard + +Structure of name +\end_inset + + + + +\begin_inset Text + +\layout Standard + +SX +\end_inset + + +\begin_inset Text + +\layout Standard + +sbit +\end_inset + + + + +\begin_inset Text + +\layout Standard + +SB +\end_inset + + +\begin_inset Text + +\layout Standard + +Bit field of bits +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Examples +\layout Standard + + +\family typewriter +\size small +S:LcheckSerialPort$pstBuffer$1$1({3}DG,STTTinyBuffer:S),R,0,0,[r2,r3,r4] +\newline +S:Ltimer0LoadExtended$count$1$1({2}SI:S),B,1,-4 +\newline +S:G$T2CON_7$0$0({1}SX:S),J,0,0 +\newline +S:LAdcInitialize$a$1$1({2}SI:S),B,1,1 +\newline +S:G$ScanCount$0$0({2}SI:S),F,0,0 +\layout Subsection + +Function Records +\layout Description + +<:> +\series bold + +\newline +{G +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + F +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + L { function +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + +\begin_inset Quotes eld +\end_inset + +--null-- +\begin_inset Quotes eld +\end_inset + + } +\newline +<$> +\newline +<$> +\newline +<$> +\newline +<(><)> +\newline +<,> +\newline +<,> +\newline +<,> +\newline +<,> +\newline +<,> +\newline +<,> +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +F +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol record type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + +G +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope is global +\end_inset + + + + +\begin_inset Text + +\layout Standard + +F +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope is file +\end_inset + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope is local +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol name +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope level (see below) +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Scope block (see below) +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Type chain record (see type record below) +\end_inset + + + + +\begin_inset Text + +\layout Standard + +
+\end_inset + + +\begin_inset Text + +\layout Standard + +Address space code +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Indicates if this is a stack variable +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +If stack variable, the stack offset relative to the +\begin_inset Quotes eld +\end_inset + +bp +\begin_inset Quotes erd +\end_inset + + variable. + (Libraries will have to be compiled using the - +\begin_inset ERT +status Collapsed + +\layout Standard + +\backslash +/ +\end_inset + +-debug option for this to be available) +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Indicates if this is an interrupt handler. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +If interrupt handler, this indicates the interrupt number. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +If interrupt handler, this ist he register bank number. +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Purpose +\layout Standard + +The Function record defines any Source File function. + Its construction is the same as the symbol record, with the addition of + 3 extra parameters for indicating interrupt handlers. +\layout Standard + + +\series bold +Example +\layout Standard + + +\family typewriter +F:G$main$0$0({2}DF,SV:S),C,0,0,0,0,0 +\newline +F:G$SioISR$0$0({2}DF,SV:S),Z,0,0,1,4,0 +\layout Subsection + +Type Records +\layout Description + +<:> +\series bold + +\newline +<$> +\newline + +\newline +<[> {} <]> +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +T +\end_inset + + +\begin_inset Text + +\layout Standard + +Type record type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +The filename where this type is declared +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +The name of this type +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +(see below) +\end_inset + + + + +\end_inset + + +\layout Subsection + +Type Member +\layout Description + +<(><{><}><)> +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +The offset of this type member in decimal. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +A complete symbol record describing this Member. + (See +\begin_inset Quotes eld +\end_inset + +Symbol Records +\begin_inset Quotes erd +\end_inset + + above. +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Purpose +\layout Standard + +Type records describe the complex types within the source file. + These include structure and union types. +\layout Standard + + +\series bold +Examples +\layout Standard + + +\family typewriter +T:Fcmdas$TTinyBuffer[ +\newline +({0}S:S$pNext$0$0({3}DG,STTTinyBuffer:S),Z,0,0) +\newline +({3}S:S$length$0$0({1}SC:U),Z,0,0) +\newline +({4}S:S$maxLength$0$0({1}SC:U),Z,0,0) +\newline +({5}S:S$rindex$0$0({1}SC:U),Z,0,0) +\newline +({6}S:S$windex$0$0({1}SC:U),Z,0,0) +\newline +({7}S:S$buffer$0$0({64}DA64,SC:U),Z,0,0) +\newline +] +\layout Subsection + +Link Address of Symbol +\layout Description + +<:> +\series bold + +\newline +{ +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + F +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + L } +\newline +<$> +\newline +<$> +\newline +<$> +\newline +<:>
+\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Link record type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + +G +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol has file scope. +\end_inset + + + + +\begin_inset Text + +\layout Standard + +F +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol has file scope. +\end_inset + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol has function scope +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol name +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol level +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol block +\end_inset + + + + +\begin_inset Text + +\layout Standard + +
+\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol address in hex, relative to the address space code, in the matching + symbol record. +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Purpose +\layout Standard + +The link address record is used to bind a memory location to a symbol record. +\layout Standard + + +\series bold +Example +\layout Standard + + +\family typewriter +L:G$P0$0$0:80 +\newline +L:G$ScanCount$0$0:0 +\newline +L:Fcmdas$_str_0$0$0:195 +\layout Subsection + +Linker Symbol End Address Record +\layout Description + +<:> +\series bold + +\newline +{ +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + F +\begin_inset ERT +status Collapsed + +\layout Standard +| +\end_inset + + L } +\newline +<$> +\newline +<$> +\newline +<$> +\newline +<:>
+\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Link record type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + +X +\end_inset + + +\begin_inset Text + +\layout Standard + +Link end address sub type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + +G +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol has file scope. +\end_inset + + + + +\begin_inset Text + +\layout Standard + +F +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol has file scope. +\end_inset + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol has function scope. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol name +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol level +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol block +\end_inset + + + + +\begin_inset Text + +\layout Standard + +
+\end_inset + + +\begin_inset Text + +\layout Standard + +Symbol end address in hex, relative to the address space code contained + in the matching symbol record. +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Purpose +\layout Standard + +The Linker Symbol end address record is primarily used to indicate the Ending + address of functions. + This is because function records do not contain a size value, as symbol + records do. +\layout Standard + + +\series bold +Example +\layout Standard + + +\family typewriter +L:XG$sysClearError$0$0:194 +\newline +L:XG$SioISR$0$0:A09 +\layout Subsection + +Linker ASM Line Record +\layout Description + + +\series bold +<:> +\newline +<$> +\newline +<$> +\newline +<:> +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Link record type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + +A +\end_inset + + +\begin_inset Text + +\layout Standard + +Link assembly file line record sub type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Filename of the assembly file. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Line number in the above filename.{}These numbers start at 1 (not 0). +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +End address +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Purpose +\layout Standard + +The linker Asm Line record is used to bind the execution address with a + source file and line number. +\layout Standard + + +\series bold +Example +\layout Standard + + +\family typewriter +L:A$TinyBuffer$2320:A13 +\newline +L:A$max1270$391:CA4 +\layout Subsection + +Linker C-Line Record +\layout Description + + +\series bold +<:> +\newline +<$> +\newline +<$> +\newline +<$> +\newline +<$> +\newline +<:> +\layout Standard + + +\begin_inset Tabular + + + + + + +\begin_inset Text + +\layout Standard + +L +\end_inset + + +\begin_inset Text + +\layout Standard + +Link record type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + +C +\end_inset + + +\begin_inset Text + +\layout Standard + +Link assembly file line record sub type indicator +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Filename of the assembly file. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Line number in the above filename. + These numbers start at 1 (not 0). +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Current level at this line and address. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +Current block at this line and address. +\end_inset + + + + +\begin_inset Text + +\layout Standard + + +\end_inset + + +\begin_inset Text + +\layout Standard + +End address +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Purpose +\layout Standard + +The linker C-Line record is used to bind the execution address with a source + file, line number and the level, block information. +\layout Standard + +The following is an example source module with its lines showing the correspondi +ng C-Line Records. + You will notice in this example that there are no line entries for lines + 18, 19. + This is because the code was optimized and removed. +\layout Standard + + +\begin_inset Tabular + + + + + + + +\begin_inset Text + +\layout Standard + +01 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + + + +\begin_inset Text + +\layout Standard + +02 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +struct complex +\end_inset + + + + +\begin_inset Text + +\layout Standard + +03 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +{ +\end_inset + + + + +\begin_inset Text + +\layout Standard + +04 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +int count; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +05 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +int Max; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +06 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +}; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +07 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + + + +\begin_inset Text + +\layout Standard + +08 +\end_inset + + +\begin_inset Text + +\layout Standard + +L:C$vars.c$8$0$0:38 +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +void main(void) +\end_inset + + + + +\begin_inset Text + +\layout Standard + +09 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +{ +\end_inset + + + + +\begin_inset Text + +\layout Standard + +10 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +int iterA; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +11 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +int iterB; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +12 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +struct complex myStruct; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +13 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + + + +\begin_inset Text + +\layout Standard + +14 +\end_inset + + +\begin_inset Text + +\layout Standard + +L:C$vars.c$14$1$1:C1 +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +for(iterA = 0; iterA < 10; iterA++) +\end_inset + + + + +\begin_inset Text + +\layout Standard + +15 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +{ +\end_inset + + + + +\begin_inset Text + +\layout Standard + +16 +\end_inset + + +\begin_inset Text + +\layout Standard + +L:C$vars.c$16$2$2:B9 +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +for(iterB = 0; iterB < 10; iterB++) +\end_inset + + + + +\begin_inset Text + +\layout Standard + +17 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +{ +\end_inset + + + + +\begin_inset Text + +\layout Standard + +18 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +int iterA = 6 + iterB; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +19 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +iterA++; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +20 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + + + +\begin_inset Text + +\layout Standard + +21 +\end_inset + + +\begin_inset Text + +\layout Standard + +L:C$vars.c$21$1$1:69 +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +myStruct.count++; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +22 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + + + +\begin_inset Text + +\layout Standard + +23 +\end_inset + + +\begin_inset Text + +\layout Standard + +L:C$vars.c$23$3$3:83 +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +if(myStruct.count > myStruct.Max) +\end_inset + + + + +\begin_inset Text + +\layout Standard + +24 +\end_inset + + +\begin_inset Text + +\layout Standard + +L:C$vars.c$24$3$3:A3 +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +myStruct.Max = mystruct.count; +\end_inset + + + + +\begin_inset Text + +\layout Standard + +25 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +\SpecialChar ~ +} +\end_inset + + + + +\begin_inset Text + +\layout Standard + +26 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +\SpecialChar ~ +\SpecialChar ~ +} +\end_inset + + + + +\begin_inset Text + +\layout Standard + +27 +\end_inset + + +\begin_inset Text + +\layout Standard + +L:C$vars.c$27$1$1:CE +\end_inset + + +\begin_inset Text + +\layout Standard + + +\family typewriter +} +\end_inset + + + + +\begin_inset Text + +\layout Standard + +28 +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + +\begin_inset Text + +\layout Standard + +\end_inset + + + + +\end_inset + + +\layout Standard + + +\series bold +Example +\layout Standard + + +\family typewriter +L:C$max1270.c$35$1$1:CA9 +\newline +L:C$Timer0.c$20$1$1:D9D +\layout Section + +Source File Example +\layout LyX-Code + +sfr IM = 0x90; +\layout LyX-Code + +\layout LyX-Code + +struct complex +\layout LyX-Code + +{ +\layout LyX-Code + + int count; +\layout LyX-Code + + int Max; +\layout LyX-Code + +}; +\layout LyX-Code + +\layout LyX-Code + +void main(void) +\layout LyX-Code + +{ +\layout LyX-Code + + int iterA; +\layout LyX-Code + + int iterB; +\layout LyX-Code + + struct complex myStruct; +\layout LyX-Code + +\layout LyX-Code + + for(iterA = 0; iterA < 10; iterA++) +\layout LyX-Code + + { +\layout LyX-Code + + for(iterB = 0; iterB < 10; iterB++) +\layout LyX-Code + + { +\layout LyX-Code + + int iterA = 6 + iterB; +\layout LyX-Code + + iterA++; +\layout LyX-Code + +\layout LyX-Code + + myStruct.count++; +\layout LyX-Code + + +\layout LyX-Code + + IM = iterA; +\layout LyX-Code + +\layout LyX-Code + + if(myStruct.count > myStruct.Max) +\layout LyX-Code + + myStruct.Max = myStruct.count; +\layout LyX-Code + + } +\layout LyX-Code + + } +\layout LyX-Code + +} +\layout Section + +CDB File Example +\layout Standard + + +\family typewriter +M:vars +\newline +F:G$main$0$0({2}DF,SV:S),C,0,0,0,0,0 +\newline +T:Fvars$complex[({0}S:S$count$0$0({2}SI:S),Z,0,0)({2}S:S$Max$0$0({2}SI:S),Z,0,0) +] +\newline +S:Lmain$iterA$1$1({2}SI:S),R,0,0,[r0,r1] +\newline +S:Lmain$iterB$1$1({2}SI:S),R,0,0,[r4,r5] +\newline +S:Lmain$myStruct$1$1({4}STcomplex:S),E,0,0 +\newline +S:Lmain$iterA$3$3({2}SI:S),R,0,0,[r6,r7] +\newline +S:G$IM$0$0({1}SC:U),I,0,0 +\newline +S:G$main$0$0({2}DF,SV:S),C,0,0 +\newline +L:G$IM$0$0:90 +\newline +L:Lmain$myStruct$1$1:8 +\newline +L:A$vars$64:0 +\newline +L:A$vars$65:3 +\newline +L:A$vars$67:B +\newline +L:A$vars$69:13 +\newline +L:A$vars$71:1B +\newline +L:A$vars$73:23 +\newline +L:A$vars$75:2B +\newline +L:A$vars$129:33 +\newline +L:A$vars$131:36 +\newline +L:A$vars$158:38 +\newline +L:C$vars.c$10$0$0:38 +\newline +L:G$main$0$0:38 +\newline +L:A$vars$159:3A +\newline +L:A$vars$163:3C +\newline +L:A$vars$164:3D +\newline +L:A$vars$165:3E +\newline +L:A$vars$166:40 +\newline +L:A$vars$167:41 +\newline +L:A$vars$168:43 +\newline +L:A$vars$170:45 +\newline +L:A$vars$171:47 +\newline +L:A$vars$176:4A +\newline +L:A$vars$177:4C +\newline +L:A$vars$181:4E +\newline +L:A$vars$182:4F +\newline +L:A$vars$183:50 +\newline +L:A$vars$184:52 +\newline +L:A$vars$185:53 +\newline +L:A$vars$186:55 +\newline +L:A$vars$191:57 +\newline +L:A$vars$196:59 +\newline +L:C$vars.c$20$3$3:59 +\newline +L:A$vars$197:5B +\newline +L:A$vars$198:5D +\newline +L:A$vars$200:5E +\newline +L:A$vars$201:5F +\newline +L:A$vars$202:61 +\newline +L:A$vars$207:62 +\newline +L:C$vars.c$21$3$3:62 +\newline +L:A$vars$208:63 +\newline +L:A$vars$209:66 +\newline +L:A$vars$216:67 +\newline +L:C$vars.c$23$3$3:67 +\newline +L:A$vars$217:69 +\newline +L:A$vars$220:6B +\newline +L:A$vars$221:6C +\newline +L:A$vars$222:6F +\newline +L:A$vars$227:70 +\newline +L:A$vars$228:72 +\newline +L:A$vars$232:74 +\newline +L:C$vars.c$25$3$3:74 +\newline +L:A$vars$238:76 +\newline +L:C$vars.c$27$3$3:76 +\newline +L:A$vars$239:77 +\newline +L:A$vars$240:79 +\newline +L:A$vars$241:7A +\newline +L:A$vars$242:7C +\newline +L:A$vars$243:7E +\newline +L:A$vars$244:80 +\newline +L:A$vars$245:83 +\newline +L:A$vars$248:85 +\newline +L:A$vars$256:87 +\newline +L:C$vars.c$28$3$3:87 +\newline +L:A$vars$257:8A +\newline +L:A$vars$263:8D +\newline +L:C$vars.c$18$2$2:8D +\newline +L:A$vars$264:8E +\newline +L:A$vars$265:91 +\newline +L:A$vars$268:92 +\newline +L:A$vars$274:94 +\newline +L:C$vars.c$16$1$1:94 +\newline +L:A$vars$275:95 +\newline +L:A$vars$276:98 +\newline +L:A$vars$278:99 +\newline +L:A$vars$282:9C +\newline +L:C$vars.c$31$1$1:9C +\newline +L:XG$main$0$0:9C +\newline +L:A$vars$84:A1 +\newline +L:A$vars$85:A4 +\newline +L:A$vars$86:A7 +\newline +L:A$vars$87:A9 +\newline +L:A$vars$88:AB +\newline +L:A$vars$91:AE +\newline +L:A$vars$92:B0 +\newline +L:A$vars$93:B2 +\newline +L:A$vars$94:B4 +\newline +L:A$vars$95:B6 +\newline +L:A$vars$96:B8 +\newline +L:A$vars$97:B9 +\newline +L:A$vars$98:BB +\newline +L:A$vars$99:BD +\newline +L:A$vars$100:BE +\newline +L:A$vars$101:C1 +\newline +L:A$vars$102:C3 +\newline +L:A$vars$103:C6 +\newline +L:A$vars$104:C7 +\newline +L:A$vars$105:C8 +\newline +L:A$vars$106:C9 +\newline +L:A$vars$107:CA +\newline +L:A$vars$108:CB +\newline +L:A$vars$109:CE +\newline +L:A$vars$110:D0 +\newline +L:A$vars$111:D2 +\newline +L:A$vars$112:D5 +\newline +L:A$vars$113:D7 +\newline +L:A$vars$114:DA +\newline +L:A$vars$118:DD +\the_end diff --git a/doc/clean.mk b/doc/clean.mk index c3a85bda..18f315e6 100644 --- a/doc/clean.mk +++ b/doc/clean.mk @@ -1,8 +1,9 @@ clean: # The directories are still in CVS, so don't delete them # rm -rf $(MANUAL).html $(TSS).html - rm -f $(MANUAL).html/* $(TSS).html/* - rm -rf $(MANUAL).txt $(TSS).txt *.pdf *.tex *.aux *.dvi *.idx *.ilg \ + rm -rf $(MANUAL).html/* $(TSS).html/* $(CDB).html + rm -rf $(MANUAL).txt $(TSS).txt $(CDB).txt \ + *.pdf *.tex *.aux *.dvi *.idx *.ilg \ *.ind *.log *.toc *~ \#* *.ps */*.css */*.pl *.gif core *.glo # Deleting all files created by configuring or building the program -- 2.47.2