2004-03-05 David Carlton <carlton@kealia.com>
* cp-namespace.c (cp_lookup_transparent_type_loop): Fix recursion bug. 2004-03-05 David Carlton <carlton@kealia.com> * gdb.cp/rtti.exp: Add 'print *obj3' test. * gdb.cp/rtti.h: Update copyright. (namespace n2::n3): New. * gdb.cp/rtti1.cc: (refer_to (n2::n3::C3 *)): New. (n2::n3::func3): New. (main): Call n2::n3::func3. * gdb.cp/rtti2.cc: Update copyright. (n2::create3): New.
This commit is contained in:
parent
bae25f1962
commit
1198ecbe71
@ -1,3 +1,8 @@
|
|||||||
|
2004-03-05 David Carlton <carlton@kealia.com>
|
||||||
|
|
||||||
|
* cp-namespace.c (cp_lookup_transparent_type_loop): Fix recursion
|
||||||
|
bug.
|
||||||
|
|
||||||
2004-03-05 Mark Kettenis <kettenis@gnu.org>
|
2004-03-05 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* sparc-tdep.c: Fix typo in comment.
|
* sparc-tdep.c: Fix typo in comment.
|
||||||
|
@ -603,7 +603,7 @@ static struct type *
|
|||||||
cp_lookup_transparent_type_loop (const char *name, const char *scope,
|
cp_lookup_transparent_type_loop (const char *name, const char *scope,
|
||||||
int length)
|
int length)
|
||||||
{
|
{
|
||||||
int scope_length = cp_find_first_component (scope + length);
|
int scope_length = length + cp_find_first_component (scope + length);
|
||||||
char *full_name;
|
char *full_name;
|
||||||
|
|
||||||
/* If the current scope is followed by "::", look in the next
|
/* If the current scope is followed by "::", look in the next
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2004-03-05 David Carlton <carlton@kealia.com>
|
||||||
|
|
||||||
|
* gdb.cp/rtti.exp: Add 'print *obj3' test.
|
||||||
|
* gdb.cp/rtti.h: Update copyright.
|
||||||
|
(namespace n2::n3): New.
|
||||||
|
* gdb.cp/rtti1.cc: (refer_to (n2::n3::C3 *)): New.
|
||||||
|
(n2::n3::func3): New.
|
||||||
|
(main): Call n2::n3::func3.
|
||||||
|
* gdb.cp/rtti2.cc: Update copyright.
|
||||||
|
(n2::create3): New.
|
||||||
|
|
||||||
2004-03-04 Mark Kettenis <kettenis@gnu.org>
|
2004-03-04 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* gdb.asm/openbsd.inc: Fix typo.
|
* gdb.asm/openbsd.inc: Fix typo.
|
||||||
|
@ -140,5 +140,10 @@ gdb_continue_to_breakpoint "end of constructors in func"
|
|||||||
|
|
||||||
gdb_test "print *obj" "\\$\[0-9\]* = {<n2::Base2> = .*}"
|
gdb_test "print *obj" "\\$\[0-9\]* = {<n2::Base2> = .*}"
|
||||||
|
|
||||||
|
gdb_breakpoint [gdb_get_line_number "func3-constructs-done"]
|
||||||
|
gdb_continue_to_breakpoint "end of constructors in func3"
|
||||||
|
|
||||||
|
gdb_test "print *obj3" "\\$\[0-9\]* = {<n2::C2> = .*}"
|
||||||
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
return 0
|
return 0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Code to go along with tests in rtti.exp.
|
/* Code to go along with tests in rtti.exp.
|
||||||
|
|
||||||
Copyright 2003 Free Software Foundation, Inc.
|
Copyright 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
|
Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
|
||||||
Inc.
|
Inc.
|
||||||
@ -45,4 +45,12 @@ namespace n2 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern C2 *create2();
|
extern C2 *create2();
|
||||||
|
|
||||||
|
namespace n3 {
|
||||||
|
class C3 : public C2 {
|
||||||
|
public:
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
extern n3::C3 *create3();
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,11 @@ void refer_to (n2::C2 *obj)
|
|||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void refer_to (n2::n3::C3 *obj)
|
||||||
|
{
|
||||||
|
// Do nothing.
|
||||||
|
}
|
||||||
|
|
||||||
namespace n2
|
namespace n2
|
||||||
{
|
{
|
||||||
void func ()
|
void func ()
|
||||||
@ -73,6 +78,18 @@ namespace n2
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace n3
|
||||||
|
{
|
||||||
|
void func3 ()
|
||||||
|
{
|
||||||
|
C3 *obj3 = create3 ();
|
||||||
|
|
||||||
|
refer_to (obj3); // func3-constructs-done
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
@ -84,6 +101,7 @@ int main()
|
|||||||
C2 *e2 = create2();
|
C2 *e2 = create2();
|
||||||
|
|
||||||
n2::func(); // main-constructs-done
|
n2::func(); // main-constructs-done
|
||||||
|
n2::n3::func3();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Code to go along with tests in rtti.exp.
|
/* Code to go along with tests in rtti.exp.
|
||||||
|
|
||||||
Copyright 2003 Free Software Foundation, Inc.
|
Copyright 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
|
Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
|
||||||
Inc.
|
Inc.
|
||||||
@ -33,4 +33,8 @@ namespace n2 {
|
|||||||
return new D2(0, 0);
|
return new D2(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
n3::C3 *create3() {
|
||||||
|
return new n3::C3();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user