aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2001-12-07 23:30:13 +0000
committerDaniel Jacobowitz <drow@false.org>2001-12-07 23:30:13 +0000
commit23abb74e4bdf8c1c1f32052466952bbeff14bd39 (patch)
treefa2fcd327c096d5215b33d13d6329b6b14ede480 /gdb
parent82c7b87461d3b9f08929b6587d73a94017d2f4c1 (diff)
downloadgdb-23abb74e4bdf8c1c1f32052466952bbeff14bd39.zip
gdb-23abb74e4bdf8c1c1f32052466952bbeff14bd39.tar.gz
gdb-23abb74e4bdf8c1c1f32052466952bbeff14bd39.tar.bz2
* stabsread.c (read_member_functions): Skip member functions which
are duplicates of the callable constructor/destructor.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/stabsread.c31
2 files changed, 36 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 37920f2..184cda8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-07 Daniel Jacobowitz <drow@mvista.com>
+
+ * stabsread.c (read_member_functions): Skip member functions which
+ are duplicates of the callable constructor/destructor.
+
2001-12-07 Jim Blandy <jimb@redhat.com>
* s390-tdep.c (s390_store_return_value): Don't convert float
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 8a46acf..7b68242 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -2953,6 +2953,7 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
{
int nfn_fields = 0;
int length = 0;
+ int skip_method;
/* Total number of member functions defined in this class. If the class
defines two `f' functions, and one `g' function, then this will have
the value 3. */
@@ -2992,6 +2993,36 @@ read_member_functions (struct field_info *fip, char **pp, struct type *type,
look_ahead_type = NULL;
length = 0;
+ skip_method = 0;
+ if (p - *pp == strlen ("__base_ctor")
+ && strncmp (*pp, "__base_ctor", strlen ("__base_ctor")) == 0)
+ skip_method = 1;
+ else if (p - *pp == strlen ("__base_dtor")
+ && strncmp (*pp, "__base_dtor", strlen ("__base_dtor")) == 0)
+ skip_method = 1;
+ else if (p - *pp == strlen ("__deleting_dtor")
+ && strncmp (*pp, "__deleting_dtor",
+ strlen ("__deleting_dtor")) == 0)
+ skip_method = 1;
+
+ if (skip_method)
+ {
+ /* Skip past '::'. */
+ *pp = p + 2;
+ /* Read the type. */
+ read_type (pp, objfile);
+ /* Skip past the colon, mangled name, semicolon, flags, and final
+ semicolon. */
+ while (**pp != ';')
+ (*pp) ++;
+ (*pp) ++;
+ while (**pp != ';')
+ (*pp) ++;
+ (*pp) ++;
+
+ continue;
+ }
+
new_fnlist = (struct next_fnfieldlist *)
xmalloc (sizeof (struct next_fnfieldlist));
make_cleanup (xfree, new_fnlist);