summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-14 12:22:11 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-14 12:22:11 -0800
commit800c1686880acd74b964de00f58c7a2d8f14eff3 (patch)
tree7df3672f996677dc14079cbe107f7dc1945a771b /doc
parent190e8465630e9e1fd8a211256a9fdcd6cc9176d7 (diff)
downloadnasm-800c1686880acd74b964de00f58c7a2d8f14eff3.tar.gz
--no-line: new option to ignore %line directives
For debugging preprocessed code, it is useful to be able to ignore %line directives rather than having to filter them out externally. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/changes.src3
-rw-r--r--doc/nasmdoc.src34
2 files changed, 21 insertions, 16 deletions
diff --git a/doc/changes.src b/doc/changes.src
index 8e0bc060..d279b0ad 100644
--- a/doc/changes.src
+++ b/doc/changes.src
@@ -37,6 +37,9 @@ failure instead which is very slow and not easy to debug.
\b Duplicate definitions of the same label \e{with the same value} is now
explicitly permitted (2.14 would allow it in some circumstances.)
+\b Add the option \c{--no-line} to ignore \c{%line} directives in the
+source. See \k{opt-no-line} and \k{line}.
+
\S{cl-2.14} Version 2.14
\b Changed \c{-I} option semantics by adding a trailing path separator
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src
index f1abc507..bdec6b6e 100644
--- a/doc/nasmdoc.src
+++ b/doc/nasmdoc.src
@@ -368,10 +368,10 @@ To get further usage instructions from NASM, try typing
\c nasm -h
-\c{--help} option is also the same.
+The option \c{--help} is an alias for the \c{-h} option.
-As \c{-hf}, this will also list the available output file formats, and what they
-are.
+The option \c{-hf} will also list the available output file formats,
+and what they are.
If you use Linux but aren't sure whether your system is \c{a.out}
or \c{ELF}, type
@@ -992,7 +992,14 @@ In example, running this limits the maximum line count to be 1000.
\S{opt-keep-all} The \i\c{--keep-all} Option
-This option doesn't delete any output files even if an error happens.
+This option prevents NASM from deleting any output files even if an
+error happens.
+
+\S{opt-no-line} The \i\c{--no-line} Option
+
+If this option is given, all \i\c{%line} directives in the source code
+are ignored. This can be useful for debugging already preprocessed
+code. See \k{line}.
\S{nasmenv} The \i\c{NASMENV} \i{Environment} Variable
@@ -3747,15 +3754,6 @@ the user. For example:
\H{otherpreproc} \i{Other Preprocessor Directives}
-NASM also has preprocessor directives which allow access to
-information from external sources. Currently they include:
-
-\b\c{%line} enables NASM to correctly handle the output of another
-preprocessor (see \k{line}).
-
-\b\c{%!} enables NASM to read in the value of an environment variable,
-which can then be used in your program (see \k{getenv}).
-
\S{line} \i\c{%line} Directive
The \c{%line} directive is used to notify NASM that the input line
@@ -3766,9 +3764,9 @@ directive allows NASM to output messages which indicate the line
number of the original source file, instead of the file that is being
read by NASM.
-This preprocessor directive is not generally of use to programmers,
-by may be of interest to preprocessor authors. The usage of the
-\c{%line} preprocessor directive is as follows:
+This preprocessor directive is not generally used directly by
+programmers, but may be of interest to preprocessor authors. The
+usage of the \c{%line} preprocessor directive is as follows:
\c %line nnn[+mmm] [filename]
@@ -3783,6 +3781,10 @@ After reading a \c{%line} preprocessor directive, NASM will report
all file name and line numbers relative to the values specified
therein.
+If the command line option \i\c{--no-line} is given, all \c{%line}
+directives are ignored. This may be useful for debugging preprocessed
+code. See \k{opt-no-line}.
+
\S{getenv} \i\c{%!}\e{variable}: Read an Environment Variable.