* [patch] Reset 'using_directives' after block initialization
@ 2010-03-12 20:05 Sami Wagiaalla
2010-03-12 20:28 ` Tom Tromey
0 siblings, 1 reply; 2+ messages in thread
From: Sami Wagiaalla @ 2010-03-12 20:05 UTC (permalink / raw)
To: GDB Patches
[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]
The global pointer using_directives is used to temporarily store the
using_direct linked list until it is used to set the current blocks
using directives. The pointer must be reset to NULL every time after
block initialization. This patch fixes that.
2010-03-12 Sami Wagiaalla <swagiaal@redhat.com>
* buildsym.c (finish_block): Reset using_directives pointer
after block initialization.
2010-03-12 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/gdb2384-base.h: Created 'namespace B'.
* gdb.cp/gdb2384-base.cc: Use 'namespace B'.
Index: gdb/buildsym.c
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.78
diff -u -r1.78 buildsym.c
--- gdb/buildsym.c 1 Jan 2010 07:31:30 -0000 1.78
+++ gdb/buildsym.c 12 Mar 2010 16:45:37 -0000
@@ -387,6 +387,7 @@
}
block_set_using (block, using_directives, &objfile->objfile_obstack);
+ using_directives = NULL;
record_pending_block (objfile, block, opblock);
Index: gdb/testsuite/gdb.cp/gdb2384-base.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/gdb2384-base.cc,v
retrieving revision 1.5
diff -u -r1.5 gdb2384-base.cc
--- gdb/testsuite/gdb.cp/gdb2384-base.cc 1 Jan 2010 07:32:01 -0000 1.5
+++ gdb/testsuite/gdb.cp/gdb2384-base.cc 12 Mar 2010 16:45:38 -0000
@@ -23,6 +23,8 @@
{
}
+using namespace B;
+
int
base::meth ()
{
Index: gdb/testsuite/gdb.cp/gdb2384-base.h
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/gdb2384-base.h,v
retrieving revision 1.5
diff -u -r1.5 gdb2384-base.h
--- gdb/testsuite/gdb.cp/gdb2384-base.h 1 Jan 2010 07:32:01 -0000 1.5
+++ gdb/testsuite/gdb.cp/gdb2384-base.h 12 Mar 2010 16:45:38 -0000
@@ -16,6 +16,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+namespace B{
+ int x;
+}
+
class base
{
public:
[-- Attachment #2: using_directive.patch --]
[-- Type: text/plain, Size: 1708 bytes --]
2010-03-12 Sami Wagiaalla <swagiaal@redhat.com>
* buildsym.c (finish_block): Reset using_directives pointer
after block initialization.
2010-03-12 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/gdb2384-base.h: Created 'namespace B'.
* gdb.cp/gdb2384-base.cc: Use 'namespace B'.
Index: gdb/buildsym.c
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.78
diff -u -r1.78 buildsym.c
--- gdb/buildsym.c 1 Jan 2010 07:31:30 -0000 1.78
+++ gdb/buildsym.c 12 Mar 2010 16:45:37 -0000
@@ -387,6 +387,7 @@
}
block_set_using (block, using_directives, &objfile->objfile_obstack);
+ using_directives = NULL;
record_pending_block (objfile, block, opblock);
Index: gdb/testsuite/gdb.cp/gdb2384-base.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/gdb2384-base.cc,v
retrieving revision 1.5
diff -u -r1.5 gdb2384-base.cc
--- gdb/testsuite/gdb.cp/gdb2384-base.cc 1 Jan 2010 07:32:01 -0000 1.5
+++ gdb/testsuite/gdb.cp/gdb2384-base.cc 12 Mar 2010 16:45:38 -0000
@@ -23,6 +23,8 @@
{
}
+using namespace B;
+
int
base::meth ()
{
Index: gdb/testsuite/gdb.cp/gdb2384-base.h
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/gdb2384-base.h,v
retrieving revision 1.5
diff -u -r1.5 gdb2384-base.h
--- gdb/testsuite/gdb.cp/gdb2384-base.h 1 Jan 2010 07:32:01 -0000 1.5
+++ gdb/testsuite/gdb.cp/gdb2384-base.h 12 Mar 2010 16:45:38 -0000
@@ -16,6 +16,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+namespace B{
+ int x;
+}
+
class base
{
public:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] Reset 'using_directives' after block initialization
2010-03-12 20:05 [patch] Reset 'using_directives' after block initialization Sami Wagiaalla
@ 2010-03-12 20:28 ` Tom Tromey
0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2010-03-12 20:28 UTC (permalink / raw)
To: Sami Wagiaalla; +Cc: GDB Patches
>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:
Sami> The global pointer using_directives is used to temporarily store the
Sami> using_direct linked list until it is used to set the current blocks
Sami> using directives. The pointer must be reset to NULL every time after
Sami> block initialization. This patch fixes that.
Sami> 2010-03-12 Sami Wagiaalla <swagiaal@redhat.com>
Sami> * buildsym.c (finish_block): Reset using_directives pointer
Sami> after block initialization.
Ok.
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-12 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12 20:05 [patch] Reset 'using_directives' after block initialization Sami Wagiaalla
2010-03-12 20:28 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox