|
Subject: Re: MI: type prefixes for values Newsgroups: gmane.comp.gdb.devel Date: 2006-02-17 14:35:13 GMT (2 years, 28 weeks, 6 days and 35 minutes ago)
On Friday 17 February 2006 17:26, Bob Rossi wrote:
> > if (*start == '{')
> > {
> > // Gdb uses '{' in two cases:
> > // - composites (arrays and structures)
> > // - pointers to functions. In this case type is
> > // enclosed in "{}". Not sure why it's so, as
> > // when printing pointer, type is in parenthesis.
> > if (type == typePointer)
> > {
> > // Looks like type in braces at the beginning. Strip it.
> > start = skipDelim(start, '{', '}');
> > }
> > else
> > {
> > // Looks like composite, strip the braces and return.
> > return QCString(start+1, end - start -1);
> > }
>
Hi Bob,
> I have to say, this looks like a problem with the way you parse the
> output of GDB. There should be no "stripping". If you parse it into a
> data structure, you simply walk that structure and get the info you
> want.
I'm afraid I don't get you. If I'm given literal string
"{int (*)(int)} 0x12345678" by gdb, and I want to display it without "{}",
then I surely have to remove the "{}" part, no?
Or you wanted to say I should use variable objects and traverse the tree
structure they have? If so, can you expand on this?
Thanks,
Volodya
|
|
|