bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/31115] [ARM] The minimalistic DWARF DIE for function has wrong


From: thiago.bauermann at linaro dot org
Subject: [Bug gas/31115] [ARM] The minimalistic DWARF DIE for function has wrong address in Thumb mode
Date: Wed, 06 Dec 2023 17:45:01 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31115

--- Comment #2 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> 
---
(In reply to Nick Clifton from comment #1)
> Created attachment 15240 [details]
> Proposed patch
> 
> Hi Thiago,
> 
>   Please could you try out this patch and let me know if it works for you ?
> 
> Cheers
>   Nick

Hello Nick,

Thank you for the quick response! I tested the patch, but unfortunately the DIE
still has the LSB bit set in DW_AT_low_pc, and GDB still fails:

 <1><1fe>: Abbrev Number: 2 (DW_TAG_subprogram)
    <1ff>   DW_AT_name        : (strp) (offset: 0x47a): main
    <203>   DW_AT_external    : (flag_present) 1
    <203>   DW_AT_type        : (ref_udata) <0x209>
    <204>   DW_AT_low_pc      : (addr) 0x10517
    <208>   DW_AT_high_pc     : (udata) 12


(gdb) x /i main+8
   0x1051f <main+7>:    b.n     0x10c62
(gdb) FAIL: gdb.arch/pr25124.exp: disassemble thumb instruction (1st try)

Without the patch, DW_AT_low_pc had value 0x10519:

$ diff -U 4 main-86b775c51597/readelf-w.out patch-6eab43ba8bd7/readelf-w.out 
--- main-86b775c51597/readelf-w.out     2023-12-04 14:48:06.217429953 -0300
+++ patch-6eab43ba8bd7/readelf-w.out    2023-12-06 14:37:58.742262164 -0300
@@ -316,9 +316,9 @@
  <1><1fe>: Abbrev Number: 2 (DW_TAG_subprogram)
     <1ff>   DW_AT_name        : (strp) (offset: 0x47a): main
     <203>   DW_AT_external    : (flag_present) 1
     <203>   DW_AT_type        : (ref_udata) <0x209>
-    <204>   DW_AT_low_pc      : (addr) 0x10519
+    <204>   DW_AT_low_pc      : (addr) 0x10517
     <208>   DW_AT_high_pc     : (udata) 12
  <1><209>: Abbrev Number: 3 (DW_TAG_unspecified_type)
  <1><20a>: Abbrev Number: 0
   Compilation Unit @ offset 0x20b:

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]