public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-ambiguous-linespec: add more funfirstline checks add missing return to symbol_to_sal
@ 2011-11-02 14:19 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2011-11-02 14:19 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-ambiguous-linespec has been updated
       via  3b7465182c067a701970667a73089613c8ecf451 (commit)
      from  bfaf00b650b34a497553fbf5026a54b715feb645 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 3b7465182c067a701970667a73089613c8ecf451
Author: Tom Tromey <tromey@redhat.com>
Date:   Wed Nov 2 08:18:42 2011 -0600

    add more funfirstline checks
    add missing return to symbol_to_sal

-----------------------------------------------------------------------

Summary of changes:
 gdb/linespec.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

First 500 lines of diff:
diff --git a/gdb/linespec.c b/gdb/linespec.c
index c61215b..21189d3 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -2611,6 +2611,7 @@ collect_symbols (struct symbol *sym, void *data)
   struct symtab_and_line sal;
 
   if ((SYMBOL_CLASS (sym) == LOC_STATIC
+       && !info->state->funfirstline
        && !maybe_add_address (info->state->addr_set,
 			      SYMTAB_PSPACE (SYMBOL_SYMTAB (sym)),
 			      SYMBOL_VALUE_ADDRESS (sym)))
@@ -2670,6 +2671,13 @@ check_minsym (struct minimal_symbol *minsym, void *d)
     {
       /* Reject some odd ones.  */
     }
+  else if (info->state->funfirstline
+	   && (MSYMBOL_TYPE (minsym) != mst_text
+	       || MSYMBOL_TYPE (minsym) != mst_text_gnu_ifunc
+	       || MSYMBOL_TYPE (minsym) != mst_file_text))
+    {
+      /* When FUNFIRSTLINE, only allow text symbols.  */
+    }
   else if (maybe_add_address (info->state->addr_set, info->objfile->pspace,
 			      SYMBOL_VALUE_ADDRESS (minsym)))
     minsym_found (info->state, info->objfile, minsym, &info->result);
@@ -2768,13 +2776,12 @@ decode_variable (struct linespec_state *self, char *copy)
      discovered name.  */
   if (info.result.nelts == 0)
     {
-      struct symbol *function_symbol;
+      struct symbol *sym;
 
-      function_symbol = lookup_symbol (lookup_name, get_selected_block (0),
-				       VAR_DOMAIN, 0);
-      if (function_symbol && SYMBOL_CLASS (function_symbol) == LOC_BLOCK)
+      sym = lookup_symbol (lookup_name, get_selected_block (0), VAR_DOMAIN, 0);
+      if (sym)
 	{
-	  copy = SYMBOL_SEARCH_NAME (function_symbol);
+	  copy = SYMBOL_SEARCH_NAME (sym);
 	  add_matching_symbols_to_info (copy, &info, NULL);
 	}
     }
@@ -2830,6 +2837,7 @@ symbol_to_sal (struct symtab_and_line *result,
 	  result->pc = SYMBOL_VALUE_ADDRESS (sym);
 	  result->pspace = SYMTAB_PSPACE (SYMBOL_SYMTAB (sym));
 	  result->explicit_pc = 1;
+	  return 1;
 	}
       else if (funfirstline)
 	{


hooks/post-receive
--
Repository for Project Archer.


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

only message in thread, other threads:[~2011-11-02 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-02 14:19 [SCM] archer-tromey-ambiguous-linespec: add more funfirstline checks add missing return to symbol_to_sal 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).