bug-ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Data display oddities w/ structures under Solaris (Forte v6 compiler)


From: Charles Hines
Subject: Data display oddities w/ structures under Solaris (Forte v6 compiler)
Date: Tue, 6 Nov 2001 18:06:23 -0500

Howdy all.

I've been a fan of DDD for quite a while now, but when I started using it
under Solaris 7 along with Sun's Forte compiler (v6 update 1) I noticed some
problems with the Data Display of various (C++) classes/structures (especially
STL based ones).

For example, here is a structure that I'm investigating:

  struct HostType
  {
    std::string nickname;
    std::string host;
    std::string type;
  };

And here is what print shows for this one instance of the above structure I'm
looking at right now:

===========================================================================
(/auto/sunos/workshop/bin/../WS6U1/bin/sparcv9/dbx) print -r hostTypes[i]
hostTypes.operator[](i) = {
    HostType::nickname = {
        basic_string<char,std::char_traits<char>,std::allocator<char> 
>::__data_ = {
            __rw_basis<char*,std::allocator<char> >::__data_ = 0x9c4f38 
"LOCALHOST"
        }
        basic_string<char,std::char_traits<char>,std::allocator<char> 
>::__nullref = struct 
__rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char>
 > >
    }
    HostType::host = {
        basic_string<char,std::char_traits<char>,std::allocator<char> 
>::__data_ = {
            __rw_basis<char*,std::allocator<char> >::__data_ = 0x9bf588 
"foo.bar.com"
        }
        basic_string<char,std::char_traits<char>,std::allocator<char> 
>::__nullref = struct 
__rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char>
 > >
    }
    HostType::type = {
        basic_string<char,std::char_traits<char>,std::allocator<char> 
>::__data_ = {
            __rw_basis<char*,std::allocator<char> >::__data_ = 0x9bf610 "BLAH"
        }
        basic_string<char,std::char_traits<char>,std::allocator<char> 
>::__nullref = struct 
__rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char>
 > >
    }
}
===========================================================================

and here is a rather rough textual representation of how the above is graphed
in the data display area:

 Hosttypes.operator[](i) =
   +-------------------------------------------------------------------------
   |            +------------------------------------------------------------
   |            |             +----------------------------------------------
   | nickname = | __data_   = | __data_ = "LOCALHOST"
   |            |             +----------------------------------------------
   |            |             +----------------------------------------------
   |            |             |             +--------------------------------
   |            | __nullref = | __data_   = | __data_ = "foo.bar.com"
   |            |             |             +--------------------------------
   |            |             |             |             +------------------+
   |            |             | __nullref = | __data_   = | __data_ = "BLAH" |
   |            |             |             |             +------------------+
   |            |             |             | __nullref = ...
   |            |             |             | ...
   |            |             |             | ...
   |            |             |             | ...

Hm, I suppose I could have attached a gif there, but that's pretty
accurate. :)

Anyways, notice how the physical layout and correlation to structure element
names is lost in the above display...  Mildly annoying and a lot of wasted
screen real estate.

I searched through the archives of the mailing list but didn't see anyone with
a similar problem.  

So, I was wondering if anyone out there had seen something like this before or
if it's a new problem, or if there is some Forte dbx setting that I need to
toggle (tried several to no avail) or if I can compile ddd differently to make
it "do the right thing" with existing options, or if it would be necessary to
actually modify some ddd code to fix it properly (which I'm not afraid to
attempt if someone gives me a pointer or two on where to begin, although I
don't have a lot of time to work on it and perhaps it's a simple fix for
someone who knows the code), etc.

I suspect that it has something to do with the missing {} around the __nullref
stuff, but that's just a guess...

Note, I'm not subscribed to the list, so please copy me on any replies or I
can just periodically check the archives I guess.

Thanks,
Chuck

ps - wow that list gets a lot of spam.  I hope my email address doesn't get
harvested from this list and start giving my procmail filter more of a
workout. :)

-- 
Charles K. Hines   <address@hidden>   <address@hidden>
Principal Scientist at ReQuest Technologies Inc   (http://www.ReQuestTech.com/)

         "You tell him and I will smack you.  I will smack you like a
            bad bad donkey, okay!" - Pepe in 'Muppets From Space'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]