Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 5/7] Remove one argument abbrev_len in read_partial_die
Date: Thu, 25 Jan 2018 09:38:00 -0000	[thread overview]
Message-ID: <1516873114-7449-6-git-send-email-yao.qi@linaro.org> (raw)
In-Reply-To: <1516873114-7449-1-git-send-email-yao.qi@linaro.org>

gdb:

2018-01-11  Yao Qi  <yao.qi@linaro.org>

	* dwarf2read.c (read_partial_die): Update the declaration.
	(load_partial_dies): Caller update.
	(read_partial_die): Remove one argument abbrev_len.
---
 gdb/dwarf2read.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 9b4d09e..0ee102a 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1834,7 +1834,6 @@ static struct partial_die_info *load_partial_dies
 static const gdb_byte *read_partial_die (const struct die_reader_specs *,
 					 struct partial_die_info *,
 					 struct abbrev_info *,
-					 unsigned int,
 					 const gdb_byte *);
 
 static struct partial_die_info *find_partial_die (sect_offset, int,
@@ -18315,8 +18314,8 @@ load_partial_dies (const struct die_reader_specs *reader,
       struct partial_die_info pdi ((sect_offset) (info_ptr - reader->buffer),
 				   abbrev);
 
-      info_ptr = read_partial_die (reader, &pdi, abbrev, bytes_read,
-				   info_ptr);
+      info_ptr = read_partial_die (reader, &pdi, abbrev,
+				   (const gdb_byte *) info_ptr + bytes_read);
 
       /* This two-pass algorithm for processing partial symbols has a
 	 high cost in cache pressure.  Thus, handle some simple cases
@@ -18498,8 +18497,7 @@ partial_die_info::partial_die_info (sect_offset sect_off_,
 static const gdb_byte *
 read_partial_die (const struct die_reader_specs *reader,
 		  struct partial_die_info *part_die,
-		  struct abbrev_info *abbrev, unsigned int abbrev_len,
-		  const gdb_byte *info_ptr)
+		  struct abbrev_info *abbrev, const gdb_byte *info_ptr)
 {
   struct dwarf2_cu *cu = reader->cu;
   struct dwarf2_per_objfile *dwarf2_per_objfile
@@ -18512,8 +18510,6 @@ read_partial_die (const struct die_reader_specs *reader,
   int has_high_pc_attr = 0;
   int high_pc_relative = 0;
 
-  info_ptr += abbrev_len;
-
   for (i = 0; i < abbrev->num_attrs; ++i)
     {
       info_ptr = read_attribute (reader, &attr, &abbrev->attrs[i], info_ptr);
-- 
1.9.1


  parent reply	other threads:[~2018-01-25  9:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25  9:38 [PATCH 0/7] Class-fy partial_die_info Yao Qi
2018-01-25  9:38 ` [PATCH 7/7] Move read_partial_die to partial_die_info::read Yao Qi
2018-01-29  1:58   ` Simon Marchi
2018-01-25  9:38 ` Yao Qi [this message]
2018-01-29  1:30   ` [PATCH 5/7] Remove one argument abbrev_len in read_partial_die Simon Marchi
2018-01-25  9:38 ` [PATCH 6/7] Move fixup_partial_die to partial_die_info::fixup Yao Qi
2018-01-25 12:59   ` Pedro Alves
2018-01-25 14:45     ` Yao Qi
2018-01-25  9:38 ` [PATCH 3/7] Change find_partial_die_in_comp_unit to dwarf2_cu::find_partial_die Yao Qi
2018-01-25  9:38 ` [PATCH 1/7] Re-write partial_die_info allocation in load_partial_dies Yao Qi
2018-01-25  9:38 ` [PATCH 2/7] Don't check abbrev is NULL in read_partial_die Yao Qi
2018-01-25  9:38 ` [PATCH 4/7] Class-fy partial_die_info Yao Qi
     [not found]   ` <87vafphpw6.fsf@tromey.com>
2018-01-26 17:25     ` Yao Qi
2018-01-26 20:55       ` Tom Tromey
2018-01-29  1:15   ` Simon Marchi
2018-01-30 10:49     ` Yao Qi
2018-01-30 15:11       ` Pedro Alves
2018-01-30 11:39     ` Pedro Alves
2018-01-31  3:46       ` Simon Marchi
2018-01-31 11:55         ` Yao Qi
2018-01-31 15:33         ` Pedro Alves
2018-01-25 12:05 ` [PATCH 0/7] " Joel Brobecker
2018-01-25 14:03   ` Yao Qi
2018-02-22 15:36 [PATCH 0/7 v2] " Yao Qi
2018-02-22 15:36 ` [PATCH 5/7] Remove one argument abbrev_len in read_partial_die Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516873114-7449-6-git-send-email-yao.qi@linaro.org \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox