From: Sami Wagiaalla <swagiaal@redhat.com>
To: GDB Patches <gdb-patches@sourceware.org>
Subject: [patch] Reset 'using_directives' after block initialization
Date: Fri, 12 Mar 2010 20:05:00 -0000 [thread overview]
Message-ID: <4B9A9DB7.7060202@redhat.com> (raw)
[-- 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:
next reply other threads:[~2010-03-12 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 20:05 Sami Wagiaalla [this message]
2010-03-12 20:28 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B9A9DB7.7060202@redhat.com \
--to=swagiaal@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox