------- Comment #2 from tromey at gcc dot gnu dot org  2008-09-19 18:59 -------
Consider this code:

#include <string>
std::string zardoz1;

using std::string;
string zardoz2;


In this case, IMO, 'whatis' should print 'std::string' for zardoz1,
but just 'string' for zardoz2.

This is simply not possible given today's dwarf output, as the two variables
share a type:
 <1><24ef>: Abbrev Number: 63 (DW_TAG_variable)
  <24f0>     DW_AT_name        : (indirect string, offset: 0x47b): zardoz1      
  <24f4>     DW_AT_decl_file   : 1      
  <24f5>     DW_AT_decl_line   : 2      
  <24f6>     DW_AT_type        : <27b>  
  <24fa>     DW_AT_external    : 1      
  <24fb>     DW_AT_location    : 5 byte block: 3 0 0 0 0        (DW_OP_addr: 0)
 <1><2501>: Abbrev Number: 63 (DW_TAG_variable)
  <2502>     DW_AT_name        : (indirect string, offset: 0x483): zardoz2      
  <2506>     DW_AT_decl_file   : 1      
  <2507>     DW_AT_decl_line   : 5      
  <2508>     DW_AT_type        : <27b>  
  <250c>     DW_AT_external    : 1      
  <250d>     DW_AT_location    : 5 byte block: 3 0 0 0 0        (DW_OP_addr: 0)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37590

Reply via email to