Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Keith Seitz <keiths@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>,
	 "gdb-patches\@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA 1/2] Linespec rewrite (update 2)
Date: Sun, 22 Jul 2012 19:33:00 -0000	[thread overview]
Message-ID: <m2394jsiaj.fsf@igel.home> (raw)
In-Reply-To: <4F7B8610.9070302@redhat.com> (Keith Seitz's message of "Tue, 03	Apr 2012 16:21:52 -0700")

Keith Seitz <keiths@redhat.com> writes:

> +      for (i = 0; VEC_iterate (symbolp, ls->labels.label_symbols, i, sym); ++i)
> +	{
> +	  symbol_to_sal (&sal, state->funfirstline, sym);
> +	  add_sal_to_sals (state, &sals, &sal,
> +			   SYMBOL_NATURAL_NAME (sym));

If symbol_to_sal returns 0 then sal is uninitialized.

> +	}
> +    }
> +  else if (ls->function_symbols != NULL || ls->minimal_symbols != NULL)
> +    {
> +      /* We have just a bunch of functions and/or methods.  */
> +      int i;
> +      struct symtab_and_line sal;
> +      struct symbol *sym;
> +      minsym_and_objfile_d *elem;
> +      struct program_space *pspace;
> +
> +      if (ls->function_symbols != NULL)
> +	{
> +	  /* Sort symbols so that symbols with the same program space are next
> +	     to each other.  */
> +	  qsort (VEC_address (symbolp, ls->function_symbols),
> +		 VEC_length (symbolp, ls->function_symbols),
> +		 sizeof (symbolp), compare_symbols);
> +
> +	  for (i = 0; VEC_iterate (symbolp, ls->function_symbols, i, sym); ++i)
> +	    {
> +	      pspace = SYMTAB_PSPACE (SYMBOL_SYMTAB (sym));
> +	      set_current_program_space (pspace);
> +	      symbol_to_sal (&sal, state->funfirstline, sym);
> +	      if (maybe_add_address (state->addr_set, pspace, sal.pc))
> +		add_sal_to_sals (state, &sals, &sal, SYMBOL_NATURAL_NAME (sym));

Likewise.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


  parent reply	other threads:[~2012-07-22 19:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 23:18 Keith Seitz
2012-03-27  1:45 ` asmwarrior
2012-03-28 18:55   ` Tom Tromey
2012-03-27 13:56 ` Joel Brobecker
2012-03-27 14:31   ` Keith Seitz
2012-03-27 14:54     ` Joel Brobecker
2012-03-27 15:05       ` Joel Brobecker
2012-03-27 18:08         ` Keith Seitz
2012-03-28 20:46 ` Tom Tromey
2012-03-29 19:18   ` Keith Seitz
2012-03-30 15:34     ` Tom Tromey
2012-03-30 15:59       ` Keith Seitz
2012-03-30 16:37         ` Tom Tromey
2012-03-30 17:09           ` Joel Brobecker
2012-03-30 17:56             ` Tom Tromey
2012-03-30 18:05               ` Keith Seitz
2012-04-03 23:22                 ` Keith Seitz
2012-04-05 15:22                   ` Tom Tromey
2012-04-05 15:55                     ` Doug Evans
2012-04-05 19:01                       ` Keith Seitz
2012-07-22 19:33                   ` Andreas Schwab [this message]
2012-07-23 17:57                     ` Keith Seitz
2012-07-23 18:55                       ` Tom Tromey
2012-07-23 21:13                         ` Keith Seitz
2012-04-03 21:19 ` Doug Evans
2012-04-03 23:14   ` 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=m2394jsiaj.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    --cc=tromey@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