From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: In dwarf2read, restore local_symbols and param_symbols
Date: Fri, 08 Nov 2002 11:32:00 -0000 [thread overview]
Message-ID: <vt2smybc1mz.fsf@zenia.red-bean.com> (raw)
2002-11-08 Jim Blandy <jimb@redhat.com>
* dwarf2read.c (read_func_scope): Restore local_symbols and
param_symbols after we finish the function context. (Based on a
patch from David Edelsohn.)
Index: gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.72
diff -c -r1.72 dwarf2read.c
*** gdb/dwarf2read.c 25 Oct 2002 22:25:55 -0000 1.72
--- gdb/dwarf2read.c 8 Nov 2002 19:30:13 -0000
***************
*** 2013,2018 ****
--- 2013,2026 ----
/* Make a block for the local symbols within. */
finish_block (new->name, &local_symbols, new->old_blocks,
lowpc, highpc, objfile);
+
+ /* In C++, we can have functions nested inside functions (e.g., when
+ a function declares a class that has methods). This means that
+ when we finish processing a function scope, we may need to go
+ back to building a containing block's symbol lists. */
+ local_symbols = new->locals;
+ param_symbols = new->params;
+
list_in_scope = &file_symbols;
}
next reply other threads:[~2002-11-08 19:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-08 11:32 Jim Blandy [this message]
2002-11-08 11:35 ` Andrew Cagney
2002-11-08 12:21 ` Jim Blandy
2002-11-08 12:35 ` Andrew Cagney
2002-11-13 11:41 ` Jim Blandy
2002-11-13 12:54 ` Andrew Cagney
2002-11-14 11:44 ` Jim Blandy
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=vt2smybc1mz.fsf@zenia.red-bean.com \
--to=jimb@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/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