Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gp \>\> \"gdb-patches\@sourceware.org ml\""
	<gdb-patches@sourceware.org>
Subject: Re: [RFA] Cleanup: Use add_sal_to_sals for expressions
Date: Wed, 18 Jul 2012 16:35:00 -0000	[thread overview]
Message-ID: <878veh3u4z.fsf@fleche.redhat.com> (raw)
In-Reply-To: <5005D93D.7020808@redhat.com> (Keith Seitz's message of "Tue, 17	Jul 2012 14:29:33 -0700")

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> This patch causes expressions to use add_sal_to_sals, which will then
Keith> set a canonical name for the linespec, thereby negating the need to
Keith> double-check for missing linespecs later (in decode_line_full).

Keith> @@ -842,6 +842,8 @@ add_sal_to_sals (struct linespec_state *self,
Keith>  	  else
Keith>  	    canonical_name = xstrprintf ("%s:%d", filename, sal->line);
Keith>  	}
Keith> +      else if (symname != NULL)
Keith> +	canonical_name = xstrdup (symname);

[...]

Keith> +      sal = find_pc_line (ls->expr_pc, 0);
Keith> +      sal.pc = ls->expr_pc;
Keith> +      sal.section = find_pc_overlay (ls->expr_pc);
Keith> +      sal.explicit_pc = 1;
Keith> +      add_sal_to_sals (state, &sals, &sal, ls->expression);

It seems to me that find_pc_line can return a sal with symtab set;
search for "val.symtab = " in find_pc_sect_line.  In this case it seems
that you'd wind up with the wrong canonical form.

Tom


  reply	other threads:[~2012-07-18 16:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 21:29 Keith Seitz
2012-07-18 16:35 ` Tom Tromey [this message]
2012-07-18 19:14   ` Keith Seitz
2012-07-18 20:11     ` Tom Tromey
2012-07-18 20:40       ` Keith Seitz

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=878veh3u4z.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /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