public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb/binutils-2_42-branch] PR31898 bug in processing DW_RLE_startx_endx
@ 2024-06-17 14:32 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2024-06-17 14:32 UTC (permalink / raw)
  To: binutils-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6c360d376628d49a1403e5566fb057a207fb5c32

commit 6c360d376628d49a1403e5566fb057a207fb5c32
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jun 17 15:51:13 2024 +0930

    PR31898 bug in processing DW_RLE_startx_endx
    
            PR 31898
            * dwarf.c (display_debug_rnglists_list): Correct fetch of "end"
            indexed address.  Remove excess parens.
    
    (cherry picked from commit 1b19566b18a1208f84b89029785a1e93a6544514)

Diff:
---
 binutils/dwarf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 615e051b2bf..30eefacf290 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -8136,7 +8136,7 @@ display_debug_rnglists_list (unsigned char * start,
 	  READ_ULEB (base_address, start, finish);
 	  print_hex (base_address, pointer_size);
 	  printf (_("(base address index) "));
-	  base_address = fetch_indexed_addr ((base_address * pointer_size) + addr_base,
+	  base_address = fetch_indexed_addr (base_address * pointer_size + addr_base,
 					     pointer_size);
 	  print_hex (base_address, pointer_size);
 	  printf (_("(base address)\n"));
@@ -8144,15 +8144,15 @@ display_debug_rnglists_list (unsigned char * start,
 	case DW_RLE_startx_endx:
 	  READ_ULEB (begin, start, finish);
 	  READ_ULEB (end, start, finish);
-	  begin = fetch_indexed_addr ((begin * pointer_size) + addr_base,
+	  begin = fetch_indexed_addr (begin * pointer_size + addr_base,
 				      pointer_size);
-	  end   = fetch_indexed_addr ((begin * pointer_size) + addr_base,
+	  end   = fetch_indexed_addr (end * pointer_size + addr_base,
 				      pointer_size);
 	  break;
 	case DW_RLE_startx_length:
 	  READ_ULEB (begin, start, finish);
 	  READ_ULEB (length, start, finish);
-	  begin = fetch_indexed_addr ((begin * pointer_size) + addr_base,
+	  begin = fetch_indexed_addr (begin * pointer_size + addr_base,
 				      pointer_size);
 	  end = begin + length;
 	  break;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-17 14:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-17 14:32 [binutils-gdb/binutils-2_42-branch] PR31898 bug in processing DW_RLE_startx_endx Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).