aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/gdb2384.cc
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2008-02-03 22:13:30 +0000
committerDoug Evans <dje@google.com>2008-02-03 22:13:30 +0000
commit81fe80802cc3746401e3393b6edc884151c83881 (patch)
tree4ccb189b615a0da1f09ebd1e5a9cdf9cb2905da0 /gdb/testsuite/gdb.cp/gdb2384.cc
parentcda4ce5a1080f6a6e3143cae4534fe60214365d2 (diff)
downloadgdb-81fe80802cc3746401e3393b6edc884151c83881.zip
gdb-81fe80802cc3746401e3393b6edc884151c83881.tar.gz
gdb-81fe80802cc3746401e3393b6edc884151c83881.tar.bz2
PR 2384
* gdbtypes.c (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno. Return basetype, fieldno if found. All callers updated. Don't cache TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE if from different objfile. * gdbtypes.h (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno. * symfile.h (fill_in_vptr_fieldno): Delete. * gdb.cp/gdb2384.exp: New file. * gdb.cp/gdb2384.cc: New file. * gdb.cp/gdb2384-base.h: New file. * gdb.cp/gdb2384-base.cc: New file.
Diffstat (limited to 'gdb/testsuite/gdb.cp/gdb2384.cc')
-rw-r--r--gdb/testsuite/gdb.cp/gdb2384.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/gdb2384.cc b/gdb/testsuite/gdb.cp/gdb2384.cc
new file mode 100644
index 0000000..81cfcb5
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/gdb2384.cc
@@ -0,0 +1,22 @@
+#include "gdb2384-base.h"
+
+class derived : public base
+{
+ public:
+ derived (int);
+};
+
+derived::derived (int _x)
+ : base (_x)
+{
+}
+
+int g;
+
+int
+main ()
+{
+ derived d (42);
+ g = d.meth (); // set breakpoint here
+ return 0;
+}