Files
binutils-gdb/gdb/testsuite/gdb.cp/gdb2384-base.cc
Sami Wagiaalla bae949ba0a PR 11408: Backport using_directives memory leak fix.
2010-04-08  Sami Wagiaalla  <swagiaal@redhat.com>

	PR Breakpoints/11408:
	* cp-namespace.c (cp_add_using): Deleted.
	(cp_add_using_directive): Use obstack allocations.
	Merged the function cp_add_using into this one.
	Added 'struct obstack *' argument.
	(cp_scan_for_anonymous_namespaces): Updated.
	* cp-support.h: Updated.
	* dwarf2read.c (read_import_statement): Updated.
	(read_namespace): Updated.
	* buildsym.c (finish_block): Reset using_directives pointer
	after block initialization.


2010-03-22  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/gdb2384-base.h: Created 'namespace B'.
	* gdb.cp/gdb2384-base.cc: Use 'namespace B'.
2010-04-08 17:15:12 +00:00

38 lines
925 B
C++

/* This testcase is part of GDB, the GNU debugger.
Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gdb2384-base.h"
base::base (int _x)
: x (_x)
{
}
using namespace B;
int
base::meth ()
{
return x;
}
derived::derived (int _x)
: base (_x)
{
}