This is the mail archive of the 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: MI: getting qualified type name

That's odd. If I define some struct in a namespace myself, like:

namespace bar
  struct whatever
       int someval;

then -var-create lists the type as bar::whatever. So it must be something funny about how "string" is defined, rather than a general bug or a decision to strip the namespace info.

(Note, however, if you are using stabs, you'll never get the namespace, since it isn't in the debug info. You probably aren't using stabs, but just to be clear...)


On Apr 13, 2006, at 1:20 AM, Vladimir Prus wrote:

is it possible, using MI, to obtain fully qualified type of a variable. Say,
I have variable of type std::string. I want KDevelop to invoke special
display code for all variables of that type. However, there's what MI gives

  (gdb) -var-create MYTEST * s
  (gdb) -var-info-type MYTEST

The name is not qualified, and it's not repliable to invoke special display
code for all types named 'string'. The only way to obtain the desired
information seems to be 'ptype' command, and parsing output of that CLI
command seems problematic.

Any ideas?

- Volodya

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