Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 1/2] Remove pst from dwarf_decode_lines_1
Date: Wed, 06 Aug 2014 06:54:00 -0000	[thread overview]
Message-ID: <1407307813-5321-1-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <53D8A264.1050103@codesourcery.com>

Hi,
Parameter 'pst' of function dwarf_decode_lines_1 isn't used except
to compute decode_for_pst_p, which has been got in the caller
dwarf_decode_lines.  I wonder it would be good if we just pass
'decode_for_pst_p'.

gdb:

2014-08-06  Yao Qi  <yao@codesourcery.com>

	* dwarf2read.c (dwarf_decode_lines_1): Remove parameter 'pst'.
	Add parameter 'decode_for_pst_p'.  Callers update.
---
 gdb/dwarf2read.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8f5d9d4..8011e4e 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -17179,7 +17179,7 @@ noop_record_line (struct subfile *subfile, int line, CORE_ADDR pc)
 
 static void
 dwarf_decode_lines_1 (struct line_header *lh, const char *comp_dir,
-		      struct dwarf2_cu *cu, struct partial_symtab *pst)
+		      struct dwarf2_cu *cu, const int decode_for_pst_p)
 {
   const gdb_byte *line_ptr, *extended_end;
   const gdb_byte *line_end;
@@ -17189,7 +17189,6 @@ dwarf_decode_lines_1 (struct line_header *lh, const char *comp_dir,
   struct objfile *objfile = cu->objfile;
   bfd *abfd = objfile->obfd;
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
-  const int decode_for_pst_p = (pst != NULL);
   struct subfile *last_subfile = NULL;
   void (*p_record_line) (struct subfile *subfile, int line, CORE_ADDR pc)
     = record_line;
@@ -17507,7 +17506,7 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir,
   struct subfile *first_subfile = current_subfile;
 
   if (want_line_info)
-    dwarf_decode_lines_1 (lh, comp_dir, cu, pst);
+    dwarf_decode_lines_1 (lh, comp_dir, cu, decode_for_pst_p);
 
   if (decode_for_pst_p)
     {
-- 
1.9.0


  parent reply	other threads:[~2014-08-06  6:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30  8:21 Revisit gdb/12528 for bare metal targets Yao Qi
2014-08-01 13:29 ` Yao Qi
2014-08-06  6:54 ` Yao Qi [this message]
2014-08-06  6:54   ` [PATCH 2/2] Check function is GC'ed Yao Qi
2014-08-15  4:40     ` Doug Evans
2014-08-15  6:19       ` Yao Qi
2014-08-20 15:40     ` Pedro Alves
2014-08-13 12:01   ` [PATCH 1/2] Remove pst from dwarf_decode_lines_1 Yao Qi
2014-08-13 18:58     ` Doug Evans
2014-08-14 23:53       ` Yao Qi
2014-08-15  2:04         ` Yao Qi
2014-08-21  8:26 ` [PATCH 1/3] Check function is GC'ed Yao Qi
2014-08-21  8:26   ` [PATCH 2/3] Check data " Yao Qi
2014-08-22 18:02     ` Doug Evans
2014-08-29 13:32       ` Yao Qi
2014-08-21  8:26   ` [PATCH 3/3] Run dw2-var-zero-addr.exp with --readnow Yao Qi
2014-08-22 18:06     ` Doug Evans
2014-09-19  9:09       ` Yao Qi
2014-08-22 17:40   ` [PATCH 1/3] Check function is GC'ed Doug Evans
2014-08-28 10:50     ` Yao Qi
2014-09-15  8:06       ` Yao Qi
2014-09-15 18:53       ` Doug Evans
2014-09-16  2:40         ` Yao Qi
2014-09-18 16:42           ` Doug Evans
2014-09-19  9:08             ` 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=1407307813-5321-1-git-send-email-yao@codesourcery.com \
    --to=yao@codesourcery.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