This is the mail archive of the archer@sourceware.org mailing list for the Archer 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: [expr-cumulative] RFA fix PR 9708


On 01/26/2010 10:02 AM, Tom Tromey wrote:
@@ -2644,6 +2644,13 @@ die_needs_namespace (struct die_info *die, struct dwarf2_cu *cu)
  	attr = dwarf2_attr (die, DW_AT_external, cu);
  	if (attr == NULL&&  die->parent->tag != DW_TAG_namespace)
  	  return 0;
+	/* A variable in a lexical block of some kind does not need a
+	   namespace, even though in C++ such variables may be
+	   external and have a mangled name.  */
+	if (die->parent->tag ==  DW_TAG_lexical_block
+	    || die->parent->tag ==  DW_TAG_try_block
+	    || die->parent->tag ==  DW_TAG_catch_block)
+	  return 0;
  	return 1;
        }
        break;

One question: should one be able to print the value of this static OUTSIDE the specific block in which it is defined? "print K::m::themagicstatic"?


This would almost certainly be a contrivance on our part for the sake of debugging, but it seems a reasonable thing to be able to do.

In any case, I don't have a problem with your patch.

Keith


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