[PATCH] Add -g switch to GAS
Nick Clifton
nickc@redhat.com
Tue Aug 17 12:19:00 GMT 2004
Hi Guys,
I am applying the patch below to add a -g switch to GAS. This
switch behaves in the same way as GCC's -g switch, ie it enables the
generation of debugging information in the format preferred by the
assembler's target.
The patch also adds a -gdwarf-2 switch as a synonym for -gdwarf2 so
that GAS now uses the same nomenclature are GCC.
A new target macro is included: MD_DEBUG_FORMAT_SELECTOR, which if
defined by a backend will be called to select the preferred debug
format. Otherwise DWARF2 will be selected for ELF targets and STABS
for others. The patch does not define any implementations of the
MD_DEBUG_FORMAT_SELECTOR macro, but these can be added later if
necessary.
The patch also clears up the behaviour of the md_parse_option
function. This function should always return zero if it did not
handle the option, and it should not print any messages about the
option being ignored because there might be further, generic
processing that can be done.
Cheers
Nick
gas/ChangeLog
2004-08-17 Nick Clifton <nickc@redhat.com>
* as.c (MD_DEBUG_FORMAT_SELECTOR): Provide default definition.
(show_usage): Add -g.
(std_longopts): Add --gen-debug. Alpha sort the table.
(parse_args): Print an error message if a switch is not handled.
Handle the -g switch, calling md_debug_format_selector() if
necessary.
* NEWS: Mention new feature.
* doc/as.texinfo: Document new switch.
* doc/internals.texi: Document behaviour of md_parse_option.
* config/tc-arm.c (md_parse_option): Do not issue an error message
if the switch is not recognised.
* config/tc-m68k.c (md_parse_option): Likewise.
* config/tc-pdp11.c (md_parse_option): Likewise.
* config/tc-v850.c (md_parse_option): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: -g.patch
Type: text/x-patch
Size: 18218 bytes
Desc: Add support for a -g switch to GAS
URL: <https://sourceware.org/pipermail/binutils/attachments/20040817/8e19db44/attachment.bin>
More information about the Binutils
mailing list