This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[committed] fix eabi dwarf2 addresses
- From: Eric Christopher <echristo at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 26 Feb 2004 13:30:02 -0800
- Subject: [committed] fix eabi dwarf2 addresses
This fixes debugging for eabi. Committed to branch and mainline.
Tested on mipsisa64-elf.
-eric
--
Eric Christopher <echristo@redhat.com>
2004-02-26 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c (mips_dwarf2_addr_size): New.
* config/tc-mips.h (DWARF2_ADDR_SIZE): Use.
Index: config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.253
diff -u -p -w -r1.253 tc-mips.c
--- config/tc-mips.c 2 Feb 2004 12:48:19 -0000 1.253
+++ config/tc-mips.c 26 Feb 2004 20:43:43 -0000
@@ -14419,3 +14419,16 @@ mips_dwarf2_format (void)
else
return dwarf2_format_32bit;
}
+
+int
+mips_dwarf2_addr_size (void)
+{
+ if (mips_abi == N64_ABI)
+ return 8;
+ /* GCC for 64-bit targets turns on mlong64 giving
+ us 64-bit addresses. */
+ else if (mips_abi == EABI_ABI && !file_mips_gp32)
+ return 8;
+ else
+ return 4;
+}
Index: config/tc-mips.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.h,v
retrieving revision 1.31
diff -u -p -w -r1.31 tc-mips.h
--- config/tc-mips.h 24 Jan 2004 17:37:29 -0000 1.31
+++ config/tc-mips.h 26 Feb 2004 20:43:48 -0000
@@ -183,7 +183,6 @@ extern void mips_enable_auto_align (void
extern enum dwarf2_format mips_dwarf2_format (void);
#define DWARF2_FORMAT() mips_dwarf2_format ()
-#define DWARF2_ADDR_SIZE(bfd) \
- (DWARF2_FORMAT () == dwarf2_format_32bit ? 4 : 8)
+#define DWARF2_ADDR_SIZE(bfd) mips_dwarf2_addr_size ()
#endif /* TC_MIPS */