Re: [anjuta-devel] How to get the type of member that is a pointer using symbol-db
- From: Massimo Cora' <maxcvs email it>
- To: Marco Diego Aurélio Mesquita <marcodiegomesquita gmail com>
- Cc: anjuta-devel-list <anjuta-devel-list gnome org>
- Subject: Re: [anjuta-devel] How to get the type of member that is a pointer using symbol-db
- Date: Sun, 28 Jul 2013 18:54:09 +0200
On 07/26/2013 06:45 PM, Marco Diego Aurélio Mesquita wrote:
On Thu, Jul 25, 2013 at 6:40 PM, Massimo Cora' <maxcvs email it> wrote:
Hi,
On 07/25/2013 04:26 PM, Marco Diego Aurélio Mesquita wrote:
Hi devs,
While testing the "create getter" feature I'm implementing[1], I
stumbled upon a problem: I created a pointer to a GtkWidget in the
private struct of a class and, when I created the getter method, the
created method type was "GtkWidget" instead of "GtkWidget*".
Is there a way to correctly get the type of a member of an struct that
is a pointer using symbol-db?
IIRC this feature was implemented and was working.
In some ways it seems that a regression made it not working.
sdb_engine_extract_type_qualifier () in symbol-db-engine-core was the
function responsible for the type extraction.
Are you sure it has ever worked correctly? I took a look in the regex
in sdb_engine_extract_type_qualifier and it doesn't seems capable of
correctly getting the type name of pointer members.
hmm yes you're right, that function doesn't get the pointer type of the
variable.
Especially for the scoped variables there's no support to include the
pointer type. The static scan that ctags performs on the source file
does not include that information.
It's a missing feature of ctags I suppose.
I remember that I wrote a patch against ctags to get the return type of
a function, and that I implemented a way to get the pointer type of a
variable in the cxx-parser, using some code from CodeLite - and a lexer.
You can look at parser-cxx plugin.
Anyway please note that currently symbol-db won't give you the pointer
info because its ctags-backend doesn't provide it.
The best choice would be to replace totally ctags in view of a clang
based parser.
Regards,
Massimo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]