public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Trivial fix in dwarf_decode_macro_bytes
@ 2020-03-26 15:33 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2020-03-26 15:33 UTC (permalink / raw)
  To: gdb-cvs

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

commit 2ef46c2fbbd18c3f411ef294c2c6694a1308a5a5
Author: Tom Tromey <tom@tromey.com>
Date:   Thu Mar 26 09:28:08 2020 -0600

    Trivial fix in dwarf_decode_macro_bytes
    
    One spot in dwarf_decode_macro_bytes could use the existing "objfile"
    local variable.
    
    gdb/ChangeLog
    2020-03-26  Tom Tromey  <tom@tromey.com>
    
            * dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
            variable.

Diff:
---
 gdb/ChangeLog      | 5 +++++
 gdb/dwarf2/macro.c | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c9459365173..1472f6679c0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-26  Tom Tromey  <tom@tromey.com>
+
+	* dwarf2/macro.c (dwarf_decode_macro_bytes): Use objfile local
+	variable.
+
 2020-03-26  Tom Tromey  <tom@tromey.com>
 
 	* dwarf2/macro.h (dwarf_decode_macros): Make section parameter
diff --git a/gdb/dwarf2/macro.c b/gdb/dwarf2/macro.c
index 49586399673..6c2d2514652 100644
--- a/gdb/dwarf2/macro.c
+++ b/gdb/dwarf2/macro.c
@@ -512,9 +512,9 @@ dwarf_decode_macro_bytes (struct dwarf2_per_objfile *dwarf2_per_objfile,
 		    body = dwz->read_string (objfile, str_offset);
 		  }
 		else
-		  body = (dwarf2_per_objfile->str.read_string
-			  (dwarf2_per_objfile->objfile,
-			   str_offset, "DW_FORM_strp"));
+		  body = dwarf2_per_objfile->str.read_string (objfile,
+							      str_offset,
+							      "DW_FORM_strp");
 	      }
 
 	    is_define = (macinfo_type == DW_MACRO_define


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

only message in thread, other threads:[~2020-03-26 15:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 15:33 [binutils-gdb] Trivial fix in dwarf_decode_macro_bytes Tom Tromey

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).