public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-swagiaal-upstream: Merge remote branch 'origin/archer-swagiaal-upstream' into archer-swagiaal-upstream
@ 2010-09-02 16:27 swagiaal
  0 siblings, 0 replies; only message in thread
From: swagiaal @ 2010-09-02 16:27 UTC (permalink / raw)
  To: archer-commits

The branch, archer-swagiaal-upstream has been updated
       via  f29368a80d46bda77002ba42e2c3d4c9ed04f69b (commit)
       via  751356fa11697ec357ee5eb351948646226f75ba (commit)
       via  15410cbd1427149d9ffb62f645ef84787c104366 (commit)
       via  a86f55a6a1d38a378a7b220244c848a3ee0506c7 (commit)
       via  911afb54b478b0720b462062380d46b224cbe423 (commit)
       via  a813aae882d63cbc1924d2fc391251b26f49363c (commit)
       via  4538a6066074ef8def5a9ee8be5939f8a180aefc (commit)
       via  8a17c3344f717e09d19ff0a039fe812b6684ad0c (commit)
       via  91626b290b699b6a823708fdd79581354bc7da33 (commit)
       via  b1e163b601597592b3327f65d2093b041e00e0a8 (commit)
       via  71d73bbaf931ea087212a668f6730e93498559a5 (commit)
       via  209536e6969140d08fac1aa1f5ee3dd1f6e12b6d (commit)
      from  0b1172b7810275b9ff3342cb293b6e9c50148ac0 (commit)

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

- Log -----------------------------------------------------------------
commit f29368a80d46bda77002ba42e2c3d4c9ed04f69b
Merge: 751356f 0b1172b
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Thu Sep 2 12:22:50 2010 -0400

    Merge remote branch 'origin/archer-swagiaal-upstream' into archer-swagiaal-upstream

commit 751356fa11697ec357ee5eb351948646226f75ba
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Mon Jul 26 15:14:47 2010 -0400

    Fix overload resolution between children of common ancestor.
    
    2010-08-30  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdbtypes.h (distance_to_public_ancestor): New function.
    	* gdbtypes.c (distance_to_public_ancestor): New function.
    	(rank_one_type): Concider distance_to_public_ancestor when ranking
    	two structs.
    	(is_public_ancestor): Use distance_to_public_ancestor.
    
    2010-08-30  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdb.cp/overload.cc: Add testing for overload resolution based on
    	distance to ancestor.
    	* gdb.cp/overload.exp: Ditto.
    	* gdb.cp/virtfunc2.cc (Obj2): Change inheritance to public.
    	Add calls to the function calls being tested.
    	* gdb.cp/derivation.cc (G): Changed inheritance to public.
    	Add calls to the function calls being tested.

commit 15410cbd1427149d9ffb62f645ef84787c104366
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Mon Jul 26 11:49:59 2010 -0400

    Fixed void* vs int* overload issue (PR C++/10343).
    
    2010-08-30  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdbtypes.h: Made VOID_PTR_CONVERSION_BADNESS better than
    	INTEGER_PROMOTION_BADNESS.
    	Made BASE_CONVERSION_BADNESS better than
    	VOID_PTR_CONVERSION_BADNESS
    
    2010-08-30  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	PR C++/10343
    	* gdb.cp/overload.cc: Added test for void* vs int* overload.
    	* gdb.cp/overload.exp: Ditto.

commit a86f55a6a1d38a378a7b220244c848a3ee0506c7
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Tue Jul 20 11:10:33 2010 -0400

    Support overloading of 'operator->'.
    
    2010-08-16  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	 PR C++/11500:
    	* valarith.c (value_x_unop): Handle STRUCTOP_PTR.
    	* eval.c (evaluate_subexp_standard): Check for overload of
    	'operator->'.
    	* valarith.c (value_x_binop): Throw NOT_FOUND_ERROR.
    	(value_x_unop): Ditto.
    	* valops.c: Include "exceptions.h".
    	(find_overload_match): Throw NOT_FOUND_ERROR.
    	(value_struct_elt): Ditto.
    
    2010-08-16  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdb.cp/smartp.exp: New test.
    	* gdb.cp/smartp.cc : New test.

commit 911afb54b478b0720b462062380d46b224cbe423
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Tue Jul 6 16:26:33 2010 -0400

    Template Lookup 3: Template meta var learns about its instances.
    
    2010-08-30  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* symtab.h (symbol_add_template_instance): New function prototype.
    	(symbol_get_template_instances): New function prototype.
    	Created struct symbol_list_element.
    	Created struct template_symbol.
    	(instances): Add an instance of symbol_list_element to
    	general_symbol_info
    	* symtab.c (symbol_add_template_instance): New function.
    	(symbol_get_template_instances): New function.
    	* findvar.c (read_var_value): Print list of candidates when
    	attempting to evaluate a LOC_TEMPLATE.
    	* dwarf2read.c (add_template_variable): Find template variable and
    	add instance reference to it.
    
    2010-08-30  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdb.cp/temp-op.exp: Test printing of template instances.

commit a813aae882d63cbc1924d2fc391251b26f49363c
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Wed Jun 23 11:24:37 2010 -0400

    Template Lookup 2: Add template meta-variable.
    
    2010-07-16  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* valops.c (find_overload_match): Handle TYPE_CODE_TEMPLATE.
    	* symtab.h: Added LOC_TEMPLATE to address_class.
    	* findvar.c (read_var_value): Handle LOC_TEMPLATE.
    	* dwarf2read.c (add_template_variable): New function.
    	(new_symbol): Moved template symbol handling to
    	add_template_variable().
    	* c-typeprint.c (c_type_print_varspec_prefix): Handle
    	TYPE_CODE_TEMPLATE.
    	(c_type_print_varspec_suffix): Ditto.
    	(c_type_print_base): Ditto.
    	* gdbtypes.h: Ditto.
    
    2010-07-16  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdb.cp/templates.exp: Added the case of "type = Template Symbol"
    	as an acceptable result for ptype of template symbols.
    	* gdb.cp/temp-op.exp: Added test for a function with
    	templated paramters.
    	* gdb.cp/temp-op.cc: Ditto.
    	* gdb.cp/temp-op.exp: Added overload testing.
    	* gdb.cp/temp-op.cc: Ditto.

commit 4538a6066074ef8def5a9ee8be5939f8a180aefc
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Thu Jun 10 11:55:02 2010 -0400

    Template Lookup 1: Create search_name and fixed template lookup
    
    2010-07-15  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* valops.c (find_overload_match): Use SYMBOL_SEARCH_NAME instead of
    	SYMBOL_NATURAL_NAME.
    	* symtab.h: Added new member search_name to cplus_specific.
    	(symbol_set_cplus_search_name): New function prototype.
    	(symbol_get_cplus_search_name): New function prototype.
    	* symtab.c (symbol_set_cplus_search_name): New function.
    	(symbol_get_cplus_search_name): New function.
    	(symbol_search_name): Handle the C++ case.
    	(symbol_matches_template_name): New function.
    	* dwarf2read.c (new_symbol): Set search_name of C++ template symbols.
    	* cp-support.H (cp_name_has_template_parameters): New function
    	prototype.
    	(cp_remove_template_params): New function ptototype.
    	* cp-support.c (cp_name_has_template_parameters): New function.
    	(cp_remove_template_params_component): New function.
    	(cp_remove_template_params): New function.
    	(overload_list_add_symbol): Use SYMBOL_SEARCH_NAME instead of
    	SYMBOL_NATURAL_NAME.
    	* cp-name-parser.y (cp_demangled_name_to_comp): Added more detail to
    	comment.
    
    2010-07-15  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdb.cp/temp-op.exp: New test.
    	* gdb.cp/temp-op.cc: New test.
    	* gdb.cp/cp-relocate.exp: Set the language C++.

commit 8a17c3344f717e09d19ff0a039fe812b6684ad0c
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Thu Jun 17 12:10:38 2010 -0400

    Complete symbol construction before adding to pending list.
    
    2010-08-05  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* dwarf2read.c (new_symbol): Add symbol to variable list at end of
    	function after symbol construction is complete.

commit 91626b290b699b6a823708fdd79581354bc7da33
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Tue Jun 22 12:19:08 2010 -0400

    Corrected pre-overload-resolution function evaluation.
    
    2010-07-20  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* eval.c (evaluate_subexp_standard): Disabled evaluation of C++
    	function symbols before overload resolution.
    
    2010-07-20  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdb.cp/fpointer.cc: New test.
    	* gdb.cp/fpointer.exp: New test.

commit b1e163b601597592b3327f65d2093b041e00e0a8
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Mon Jul 12 11:16:49 2010 -0400

    Use allocated cplus_specific for cplus symbols.
    
    2010-07-15  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* symtab.h (symbol_set_demangled_name): Now takes an optional objfile*
    	argument.
    	(cplus_specific): New struct.
    	* symtab.c (symbol_set_demangled_name): Updated.
    	Use cplus_specific for cplus symbols.
    	(symbol_get_demangled_name): Retrive the name from the cplus_specific
    	struct for cplus symbols.
    	(symbol_init_language_specific): Set cplus_specific for cplus symbols.
    	(symbol_set_names): Pass objfile to symbol_set_demangled_name.
    	* symtab.c (symbol_init_cplus_specific): New function.

commit 71d73bbaf931ea087212a668f6730e93498559a5
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Thu Jul 8 16:36:19 2010 -0400

    Use setter and getter for demangled_name.
    
    2010-07-15  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* symtab.h (symbol_set_demangled_name): New function.
    	(symbol_get_demangled_name): New function.
    	* symtab.c (symbol_set_demangled_name): New function.
    	(symbol_get_demangled_name): New function.
    	(symbol_init_language_specific): Use demangled_name setter and getter.
    	(symbol_set_names): Ditto.
    	(symbol_natural_name): Ditto.
    	(symbol_demangled_name): Ditto.
    	* dwarf2read.c (new_symbol): Ditto.

commit 209536e6969140d08fac1aa1f5ee3dd1f6e12b6d
Author: Sami Wagiaalla <swagiaal@redhat.com>
Date:   Wed Jul 7 13:45:46 2010 -0400

    Rename cplus_specific mangled_lang.
    
    2010-07-15  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* symtab.h: Renamed cplus_specific to mangled_lang.
    	* symtab.c (symbol_init_language_specific): Updated.
    	(symbol_set_names): Updated.
    	(symbol_natural_name): Updated.
    	(symbol_demangled_name): Updated.
    	* ada-lang.c (ada_decode_symbol): Updated.
    	* dwarf2read.c (new_symbol): Updated.

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

Summary of changes:
 gdb/cp-support.c                   |    1 -
 gdb/dwarf2read.c                   |   37 +++++++++++++++++++++++------------
 gdb/eval.c                         |   16 +++++++++++---
 gdb/findvar.c                      |    6 +++-
 gdb/gdbtypes.c                     |    8 +++---
 gdb/gdbtypes.h                     |   18 ++++++++--------
 gdb/symtab.c                       |   18 ++++++++--------
 gdb/symtab.h                       |   17 +++++++++++++++-
 gdb/testsuite/gdb.cp/derivation.cc |    7 ++++-
 gdb/testsuite/gdb.cp/temp-op.exp   |    4 +-
 gdb/testsuite/gdb.cp/virtfunc2.cc  |    4 ++-
 gdb/valarith.c                     |    7 ++++-
 gdb/valops.c                       |    8 +++++-
 13 files changed, 99 insertions(+), 52 deletions(-)

First 500 lines of diff:
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 4ef1a0a..249a654 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -445,7 +445,6 @@ cp_name_has_template_parameters (const char *name)
 static struct demangle_component *
 cp_remove_template_params_component (struct demangle_component *comp)
 {
-
   gdb_assert (comp != NULL);
 
   switch (comp->type)
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index c969f13..cbee89d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8636,19 +8636,24 @@ var_decode_location (struct attribute *attr, struct symbol *sym,
   SYMBOL_CLASS (sym) = LOC_COMPUTED;
 }
 
+/* Given a template symbol SYMBOL this function removes the template
+   parameters from the symbol name, and sets its search name to that.
+   If no instances of the same template were encountered before a
+   meta symbol representing the template is inserted into the current
+   scope.  */
+
 static void
 add_template_variable (struct symbol *symbol, struct pending **listhead,
                        struct objfile *objfile)
 {
   const struct pending *iterator = *listhead;
-  struct symbol *template_sym = NULL;
+  struct template_symbol *template_sym = NULL;
   struct symbol *iterator_sym;
   struct type *type;
   char *name = SYMBOL_NATURAL_NAME (symbol);
   char *search_name;
   char *tmp;
   int i;
-
   struct cleanup *all_cleanups = make_cleanup (null_cleanup, NULL);
 
   gdb_assert (name != NULL);
@@ -8658,7 +8663,7 @@ add_template_variable (struct symbol *symbol, struct pending **listhead,
   tmp = cp_remove_template_params (name);
 
   gdb_assert (tmp != NULL);
-  make_cleanup(xfree, tmp);
+  make_cleanup (xfree, tmp);
 
   if (strcmp (tmp, name) == 0)
     return;
@@ -8680,9 +8685,9 @@ add_template_variable (struct symbol *symbol, struct pending **listhead,
 	  iterator_sym = iterator->symbol[i];
 
 	  if (TYPE_CODE (SYMBOL_TYPE (iterator_sym)) == TYPE_CODE_TEMPLATE
-	      && strcmp (SYMBOL_SEARCH_NAME(iterator_sym), search_name) == 0)
+	      && strcmp (SYMBOL_SEARCH_NAME (iterator_sym), search_name) == 0)
 	    {
-	      template_sym = iterator_sym;
+	      template_sym = (struct template_symbol *) iterator_sym;
 	      break;
 	    }
         }
@@ -8691,20 +8696,26 @@ add_template_variable (struct symbol *symbol, struct pending **listhead,
   if (template_sym == NULL)
     {
       /* Add a new template symbol.  */
-      template_sym = (struct symbol *) obstack_alloc (&objfile->objfile_obstack,
-					     sizeof (struct symbol));
+      template_sym = (struct template_symbol *)
+	  obstack_alloc (&objfile->objfile_obstack,
+	                 sizeof (struct template_symbol));
+
       OBJSTAT (objfile, n_syms++);
-      memset (template_sym, 0, sizeof (struct symbol));
+      memset (&template_sym->sym, 0, sizeof (struct symbol));
+
+      SYMBOL_SET_NAMES (&template_sym->sym,
+                        search_name,
+                        strlen (search_name),
+                        0, objfile);
 
-      SYMBOL_SET_NAMES (template_sym, search_name, strlen (search_name), 0, objfile);
       type = alloc_type (objfile);
       TYPE_CODE (type) = TYPE_CODE_TEMPLATE;
-      SYMBOL_TYPE (template_sym) = type;
+      SYMBOL_TYPE (&template_sym->sym) = type;
 
-      SYMBOL_DOMAIN (template_sym) = VAR_DOMAIN;
-      SYMBOL_CLASS (template_sym) = LOC_TEMPLATE;
+      SYMBOL_DOMAIN (&template_sym->sym) = VAR_DOMAIN;
+      SYMBOL_CLASS (&template_sym->sym) = LOC_TEMPLATE;
 
-      add_symbol_to_list (template_sym, listhead);
+      add_symbol_to_list (&template_sym->sym, listhead);
     }
 
   symbol_add_template_instance (template_sym, symbol, objfile);
diff --git a/gdb/eval.c b/gdb/eval.c
index 9786c1e..065cf2c 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1445,8 +1445,12 @@ evaluate_subexp_standard (struct type *expect_type,
 		    }
 
 		  if (except.reason < 0)
-		    break;
-
+		    {
+		      if (except.error == NOT_FOUND_ERROR)
+			break;
+		      else
+			throw_exception (except);
+		    }
 		  arg2 = value;
 		}
 	    }
@@ -1849,8 +1853,12 @@ evaluate_subexp_standard (struct type *expect_type,
 	    }
 
 	  if (except.reason < 0)
-	    break;
-
+	    {
+	      if (except.error == NOT_FOUND_ERROR)
+		break;
+	      else
+		throw_exception (except);
+	    }
 	  arg1 = value;
 	}
 
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 2e6de94..1d2f2a8 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -35,6 +35,7 @@
 #include "user-regs.h"
 #include "block.h"
 #include "objfiles.h"
+#include "exceptions.h"
 
 /* Basic byte-swapping routines.  All 'extract' functions return a
    host-format integer from a target-format integer at ADDR which is
@@ -569,7 +570,8 @@ read_var_value (struct symbol *var, struct frame_info *frame)
 
     case LOC_TEMPLATE:
       {
-	struct symbol_list_element* instance = symbol_get_template_instances (var);
+	const struct symbol_list_element *instance =
+	    symbol_get_template_instances (var);
 
 	printf_filtered ("Symbol represents a template and cannot be evaluated.\n");
 	printf_filtered ("Did you mean:\n");
@@ -579,7 +581,7 @@ read_var_value (struct symbol *var, struct frame_info *frame)
 	    printf_filtered ("  %s\n", SYMBOL_NATURAL_NAME (instance->sym));
 	    instance = instance->next;
 	  }
-	return NULL;
+	throw_error (NOT_FOUND_ERROR, " ");
       }
     default:
       error (_("Cannot look up value of a botched symbol."));
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index a891f95..39912d6 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -1915,10 +1915,10 @@ is_public_ancestor (struct type *base, struct type *dclass)
    class C: public B {};
    class D: C {};
 
-   distance_to_public_ancestor (A ,A) = 0
-   distance_to_public_ancestor (A ,B) = 1
-   distance_to_public_ancestor (A ,C) = 2
-   distance_to_public_ancestor (A ,D) = -1
+   distance_to_public_ancestor (A, A) = 0
+   distance_to_public_ancestor (A, B) = 1
+   distance_to_public_ancestor (A, C) = 2
+   distance_to_public_ancestor (A, D) = -1
 
    */
 int
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 6a1eb80..caaeee7 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1376,25 +1376,25 @@ extern int is_unique_ancestor (struct type *, struct value *);
 #define INCOMPATIBLE_TYPE_BADNESS    100
 
 /* Badness of integral promotion */
-#define INTEGER_PROMOTION_BADNESS      2
+#define INTEGER_PROMOTION_BADNESS      3
 /* Badness of floating promotion */
-#define FLOAT_PROMOTION_BADNESS        2
+#define FLOAT_PROMOTION_BADNESS        3
 /* Badness of integral conversion */
-#define INTEGER_CONVERSION_BADNESS     3
+#define INTEGER_CONVERSION_BADNESS     4
 /* Badness of floating conversion */
-#define FLOAT_CONVERSION_BADNESS       3
+#define FLOAT_CONVERSION_BADNESS       4
 /* Badness of integer<->floating conversions */
-#define INT_FLOAT_CONVERSION_BADNESS   3
+#define INT_FLOAT_CONVERSION_BADNESS   4
 /* Badness of converting to a boolean */
-#define BOOLEAN_CONVERSION_BADNESS     3
+#define BOOLEAN_CONVERSION_BADNESS     4
 /* Badness of pointer conversion */
-#define POINTER_CONVERSION_BADNESS     3
+#define POINTER_CONVERSION_BADNESS     4
 /* Badness of conversion of pointer to void pointer */
 #define VOID_PTR_CONVERSION_BADNESS    1
 /* Badness of converting derived to base class */
-#define BASE_CONVERSION_BADNESS        3
+#define BASE_CONVERSION_BADNESS        1
 /* Badness of converting from non-reference to reference */
-#define REFERENCE_CONVERSION_BADNESS   3
+#define REFERENCE_CONVERSION_BADNESS   4
 
 /* Non-standard conversions allowed by the debugger */
 /* Converting a pointer to an int is usually OK */
diff --git a/gdb/symtab.c b/gdb/symtab.c
index f07ee9b..d2dc528 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -344,25 +344,25 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
    only be allocated for use with cplus symbols.  */
 
 void
-symbol_add_template_instance (struct symbol* sym,
-                              const struct symbol* instance,
+symbol_add_template_instance (struct template_symbol *template_sym,
+                              const struct symbol *instance,
                               struct objfile *objfile)
 {
-  struct symbol_list_element* new_instance =
+  struct symbol_list_element *new_instance =
       OBSTACK_ZALLOC (&objfile->objfile_obstack,
 		      struct symbol_list_element);
 
   new_instance->sym = instance;
-  new_instance->next = sym->ginfo.value.instances;
-  sym->ginfo.value.instances = new_instance;
+  new_instance->next = template_sym->instances;
+  template_sym->instances = new_instance;
 }
 
 /* Return the list of known instances of this template symbol.  */
 
-struct symbol_list_element *
-symbol_get_template_instances (struct symbol* sym)
+const struct symbol_list_element *
+symbol_get_template_instances (const struct symbol *sym)
 {
-  return sym->ginfo.value.instances;
+  return ((struct template_symbol *) sym)->instances;
 }
 
 static void
@@ -425,7 +425,7 @@ symbol_set_cplus_search_name (struct general_symbol_info *gsymbol,
 
 /* Get the search name of the give GSYMBOL.  */
 
-char*
+char *
 symbol_get_cplus_search_name (const struct general_symbol_info *gsymbol)
 {
   if (gsymbol->language_specific.cplus_specific != NULL
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 3f98916..7de2058 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -189,7 +189,7 @@ extern void symbol_set_cplus_search_name (struct general_symbol_info *gsymbol,
                                           struct objfile *objfile,
                                           const char *name);
 
-extern char* symbol_get_cplus_search_name (const struct general_symbol_info *);
+extern char *symbol_get_cplus_search_name (const struct general_symbol_info *);
 
 extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
 
@@ -670,6 +670,21 @@ struct symbol
   struct symbol *hash_next;
 };
 
+/* A "subclass" of symbol object for representing templates.  */
+
+struct template_symbol
+{
+    struct symbol sym;
+    struct symbol_list_element *instances;
+};
+
+extern void
+symbol_add_template_instance (struct template_symbol *template_sym,
+                              const struct symbol *instance,
+                              struct objfile *objfile);
+
+extern const struct symbol_list_element *
+symbol_get_template_instances (const struct symbol *sym);
 
 #define SYMBOL_DOMAIN(symbol)	(symbol)->domain
 #define SYMBOL_CLASS(symbol)		(symbol)->aclass
diff --git a/gdb/testsuite/gdb.cp/derivation.cc b/gdb/testsuite/gdb.cp/derivation.cc
index f6d42e7..02999c1 100644
--- a/gdb/testsuite/gdb.cp/derivation.cc
+++ b/gdb/testsuite/gdb.cp/derivation.cc
@@ -96,7 +96,7 @@ public:
     
 };
 
-class G : private A, public B, protected C {
+class G : public A, public B, public C {
 public:
     int g;
     int gg;
@@ -207,7 +207,10 @@ int main(void)
     E e_instance;
     F f_instance;
     G g_instance;
-    
+
+    g_instance.afoo();
+    g_instance.cfoo();
+
     #ifdef usestubs
        set_debug_traps();
        breakpoint();
diff --git a/gdb/testsuite/gdb.cp/temp-op.exp b/gdb/testsuite/gdb.cp/temp-op.exp
index 21e644f..7352e14 100644
--- a/gdb/testsuite/gdb.cp/temp-op.exp
+++ b/gdb/testsuite/gdb.cp/temp-op.exp
@@ -63,5 +63,5 @@ gdb_test "p bc == 'a'"       "= 19"
 # Test that printing the a template name without
 # template parameters does not return an arbitrary match
 
-gdb_test "print foo" "Symbol represents a template and cannot be evaluated."
-gdb_test "ptype B" "type = Template Symbol"
+gdb_test "print foo" "Symbol represents a template and cannot be evaluated.*foo<A>\\(A, char\\).*"
+gdb_test "ptype B" "Symbol represents a template and cannot be evaluated.*B<char>.*B<int>.*"
diff --git a/gdb/testsuite/gdb.cp/virtfunc2.cc b/gdb/testsuite/gdb.cp/virtfunc2.cc
index 90f3eda..666a495 100644
--- a/gdb/testsuite/gdb.cp/virtfunc2.cc
+++ b/gdb/testsuite/gdb.cp/virtfunc2.cc
@@ -27,7 +27,7 @@ public:
   virtual int do_print() { return 123456; }
 };
 
-class Obj2 : Obj,  virtual public interface
+class Obj2 : public Obj,  virtual public interface
 {
   virtual int do_print2() { return 654321; }
 };
@@ -35,5 +35,7 @@ class Obj2 : Obj,  virtual public interface
 int main(int argc, char** argv) {
   Obj o;
   Obj2 o2;
+  o2.do_print();
+
   return 0;	// marker 1
 }
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 91f9c0c..6de8c0d 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -541,7 +541,8 @@ value_x_binop (struct value *arg1, struct value *arg2, enum exp_opcode op,
 	}
       return call_function_by_hand (argvec[0], 2 - static_memfuncp, argvec + 1);
     }
-  error (_("member function %s not found"), tstr);
+  throw_error (NOT_FOUND_ERROR,
+               _("member function %s not found"), tstr);
 #ifdef lint
   return call_function_by_hand (argvec[0], 2 - static_memfuncp, argvec + 1);
 #endif
@@ -644,7 +645,9 @@ value_x_unop (struct value *arg1, enum exp_opcode op, enum noside noside)
 	}
       return call_function_by_hand (argvec[0], nargs, argvec + 1);
     }
-  error (_("member function %s not found"), tstr);
+  throw_error (NOT_FOUND_ERROR,
+               _("member function %s not found"), tstr);
+
   return 0;			/* For lint -- never reached */
 }
 \f
diff --git a/gdb/valops.c b/gdb/valops.c
index f1eb041..70f24ca 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -46,6 +46,7 @@
 #include "observer.h"
 #include "objfiles.h"
 #include "symtab.h"
+#include "exceptions.h"
 
 extern int overload_debug;
 /* Local functions.  */
@@ -2196,7 +2197,8 @@ value_struct_elt (struct value **argp, struct value **args,
     }
 
   if (!v)
-    error (_("Structure has no component named %s."), name);
+    throw_error (NOT_FOUND_ERROR,
+                 _("Structure has no component named %s."), name);
   return v;
 }
 
@@ -2517,7 +2519,9 @@ find_overload_match (struct type **arg_types, int nargs,
 
   /* Did we find a match ?  */
   if (method_oload_champ == -1 && func_oload_champ == -1)
-    error (_("No symbol \"%s\" in current context."), name);
+    throw_error (NOT_FOUND_ERROR,
+                 _("No symbol \"%s\" in current context."),
+                 name);
 
   /* If we have found both a method match and a function
      match, find out which one is better, and calculate match


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


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

only message in thread, other threads:[~2010-09-02 16:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-02 16:27 [SCM] archer-swagiaal-upstream: Merge remote branch 'origin/archer-swagiaal-upstream' into archer-swagiaal-upstream swagiaal

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).