This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Patch: add dwarf2 debug pseudo for AVR
- From: Tristan Gingold <gingold at adacore dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Tue, 27 Oct 2009 15:50:21 +0100
- Subject: Patch: add dwarf2 debug pseudo for AVR
Hi,
I can't find any good reason for not having dwarf2 debug pseudos on AVR.
Ok for trunk ?
Tristan.
gas/
2009-10-27 Tristan Gingold <gingold@adacore.com>
* config/tc-avr.c (md_pseudo_table): Add dwarf2 debug pseudo.
* config/tc-avr.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
(DWARF2_ADDR_SIZE): Define.
Index: gas/config/tc-avr.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-avr.c,v
retrieving revision 1.69
diff -c -r1.69 tc-avr.c
*** gas/config/tc-avr.c 8 Sep 2009 10:36:38 -0000 1.69
--- gas/config/tc-avr.c 27 Oct 2009 14:48:01 -0000
***************
*** 241,246 ****
--- 241,249 ----
const pseudo_typeS md_pseudo_table[] =
{
{"arch", avr_set_arch, 0},
+ {"file", (void (*) (int)) dwarf2_directive_file, 0},
+ {"loc", dwarf2_directive_loc, 0},
+ {"loc_mark_labels", dwarf2_directive_loc_mark_labels, 0},
{ NULL, NULL, 0}
};
Index: gas/config/tc-avr.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-avr.h,v
retrieving revision 1.16
diff -c -r1.16 tc-avr.h
*** gas/config/tc-avr.h 3 Jul 2007 11:01:04 -0000 1.16
--- gas/config/tc-avr.h 27 Oct 2009 14:48:01 -0000
***************
*** 147,149 ****
--- 147,155 ----
/* This target is buggy, and sets fix size too large. */
#define TC_FX_SIZE_SLACK(FIX) 2
+
+ /* AVR instructions are 2 or 4 bytes long. */
+ #define DWARF2_LINE_MIN_INSN_LENGTH 2
+
+ /* 32 bits pseudo-addresses are used on AVR. */
+ #define DWARF2_ADDR_SIZE(bfd) 4