This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix .debug_line for MIPS -msym32
- From: Daniel Jacobowitz <drow at false dot org>
- To: binutils at sourceware dot org
- Date: Wed, 11 Jul 2007 10:00:57 -0400
- Subject: Fix .debug_line for MIPS -msym32
I discovered that a MIPS64 Linux kernel built with the GCC -msym32
option caused GDB to crash. The address size in the .debug_info
compilation header was 4, but the .debug_line section used R_MIPS_64
relocations for DW_LNE_set_address. The former was generated by GCC,
the latter by gas.
Richard pointed me in the right direction for this fix. It causes no
change in the binutils testsuite, and GDB no longer crashes. OK
to commit?
--
Daniel Jacobowitz
CodeSourcery
2007-07-11 Daniel Jacobowitz <dan@codesourcery.com>
* config/tc-mips.c (mips_dwarf2_format, mips_dwarf2_addr_size): Use
HAVE_64BIT_SYMBOLS.
---
gas/config/tc-mips.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: binutils-2.17.50/gas/config/tc-mips.c
===================================================================
--- binutils-2.17.50.orig/gas/config/tc-mips.c 2007-01-31 15:45:54.000000000 -0800
+++ binutils-2.17.50/gas/config/tc-mips.c 2007-07-11 06:04:24.000000000 -0700
@@ -14868,7 +14868,7 @@ MIPS options:\n\
enum dwarf2_format
mips_dwarf2_format (void)
{
- if (mips_abi == N64_ABI)
+ if (HAVE_64BIT_SYMBOLS)
{
#ifdef TE_IRIX
return dwarf2_format_64bit_irix;
@@ -14883,7 +14883,7 @@ mips_dwarf2_format (void)
int
mips_dwarf2_addr_size (void)
{
- if (mips_abi == N64_ABI)
+ if (HAVE_64BIT_SYMBOLS)
return 8;
else
return 4;