mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
Upda the documentation on assembler error message generation.
PR 19499 * doc/as.texinfo (Errors): Correct documentation describing the interaction of .file and .line with warning and error messages.
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
2016-01-20 Nick Clifton <nickc@redhat.com>
|
2016-01-20 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 19499
|
||||||
|
* doc/as.texinfo (Errors): Correct documentation describing the
|
||||||
|
interaction of .file and .line with warning and error messages.
|
||||||
|
|
||||||
PR 19458
|
PR 19458
|
||||||
* testsuite/gas/arm/armv8_2-a.d: Skip for COFF based targets.
|
* testsuite/gas/arm/armv8_2-a.d: Skip for COFF based targets.
|
||||||
* testsuite/gas/arm/archv8m-main.d: Likewise.
|
* testsuite/gas/arm/archv8m-main.d: Likewise.
|
||||||
|
@ -2043,23 +2043,42 @@ file_name:@b{NNN}:Warning Message Text
|
|||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
@cindex line numbers, in warnings/errors
|
@cindex file names and line numbers, in warnings/errors
|
||||||
(where @b{NNN} is a line number). If a logical file name has been given
|
(where @b{NNN} is a line number). If both a logical file name
|
||||||
(@pxref{File,,@code{.file}}) it is used for the filename, otherwise the name of
|
(@pxref{File,,@code{.file}}) and a logical line number
|
||||||
the current input file is used. If a logical line number was given
|
|
||||||
@ifset GENERIC
|
@ifset GENERIC
|
||||||
(@pxref{Line,,@code{.line}})
|
(@pxref{Line,,@code{.line}})
|
||||||
@end ifset
|
@end ifset
|
||||||
then it is used to calculate the number printed,
|
have been given then they will be used, otherwise the file name and line number
|
||||||
otherwise the actual line in the current source file is printed. The
|
in the current assembler source file will be used. The message text is
|
||||||
message text is intended to be self explanatory (in the grand Unix
|
intended to be self explanatory (in the grand Unix tradition).
|
||||||
tradition).
|
|
||||||
|
Note the file name must be set via the logical version of the @code{.file}
|
||||||
|
directive, not the DWARF2 version of the @code{.file} directive. For example:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
.file 2 "bar.c"
|
||||||
|
error_assembler_source
|
||||||
|
.file "foo.c"
|
||||||
|
.line 30
|
||||||
|
error_c_source
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
|
produces this output:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
Assembler messages:
|
||||||
|
asm.s:2: Error: no such instruction: `error_assembler_source'
|
||||||
|
foo.c:31: Error: no such instruction: `error_c_source'
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
@cindex format of error messages
|
@cindex format of error messages
|
||||||
Error messages have the format
|
Error messages have the format
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
file_name:@b{NNN}:FATAL:Error Message Text
|
file_name:@b{NNN}:FATAL:Error Message Text
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
The file name and line number are derived as for warning
|
The file name and line number are derived as for warning
|
||||||
messages. The actual message text may be rather less explanatory
|
messages. The actual message text may be rather less explanatory
|
||||||
because many of them aren't supposed to happen.
|
because many of them aren't supposed to happen.
|
||||||
|
Reference in New Issue
Block a user