This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] always use demangled name to set scope


On Thu, Jun 12, 2003 at 03:26:34PM -0700, David Carlton wrote:
> As per recent discussions, it seems likely that the variable
> 'processing_current_namespace' isn't always valid: if a function is
> declared in a namespace but defined outside the body of that
> namespace, then probably sometimes dwarf2read.c won't notice that,
> because of a DW_AT_specification tag, the current namespace is
> different from what is given by the immediate hierarchical structure.
> 
> I'm trying to sort this out on my branch, but I think I'd prefer a
> less intrusive fix on the mainline, since we're about to branch for
> GDB 6.0.  Fortunately, the mainline currently only uses that variable
> in once place, namely cp_set_block_scope.  And, in that situation, it
> has the fallback strategy of looking at the demangled name.
> 
> So this patch tells GDB to just always use that fallback strategy for
> now.  It should work fine in the short term; we can get this all
> straightened out fully for 6.1, as part of merging in the rest of my
> branch (in particular nested types support).
> 
> Tested on GCC 3.2, DWARF 2, i686-pc-linux-gnu; no new regressions.  I
> also ran gdb.c++/namespace.exp with a version of GCC patched to
> generated DW_TAG_namespace entries, and I didn't get any regressions
> there, either.  OK to commit?

Yes.  By 6.1 I want to rip out all uses of the demangled name along the
DWARF-2 code path though.  If I can find the time...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]