Adding aix 64-bit check to bfd_get_sign_extend_vma

Sangamesh Mallayya sangamesh.swamy@in.ibm.com
Thu Dec 7 06:17:00 GMT 2017


Hi All,

I see that their is no aix 64-bit check has been added to the 
bfd_get_sign_extend_vma function in bfd.c.
One of the user of this function is gdb's dwarf reading function 
read_comp_unit_head (dwarf2read.c).
This is causing most of the 64-bit application in gdb to fail with the 
internal error as.

dwarf2read.c:4601: internal-error: read_comp_unit_head: dwarf from non elf 
file
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n

To avoid this error we also need to add aix5coff64-rs6000 check.

--- ./bfd/bfd.c_orig    2017-12-07 11:34:28.128618919 +0530
+++ ./bfd/bfd.c 2017-12-07 11:36:07.781926367 +0530
@@ -1533,7 +1533,8 @@
       || strcmp (name, "pei-x86-64") == 0
       || strcmp (name, "pe-arm-wince-little") == 0
       || strcmp (name, "pei-arm-wince-little") == 0
-      || strcmp (name, "aixcoff-rs6000") == 0)
+      || strcmp (name, "aixcoff-rs6000") == 0
+      || strcmp (name, "aix5coff64-rs6000") == 0)
     return 1;
 
   if (CONST_STRNEQ (name, "mach-o"))

After adding this check gdb is able to debug 64-bit applications.
Let me know your views.

Thanks,
Sangamesh



More information about the Binutils mailing list