gcc-python-plugin icon indicating copy to clipboard operation
gcc-python-plugin copied to clipboard

no way to look up a struct by tag

Open davidmalcolm opened this issue 8 years ago • 3 comments

I could not find a way to look up a structure type by tag. E.g., I wanted to look up 'struct buffer'. I could do this by introducing typedefs, but I'd rather not have to do that.

davidmalcolm avatar Feb 09 '17 20:02 davidmalcolm

Imported from trac issue 28. Created by tromey on 2012-01-08T15:58:28, last modified: 2012-01-10T11:37:38

davidmalcolm avatar Feb 09 '17 20:02 davidmalcolm

Trac comment by dmalcolm on 2012-01-09 15:42:47:

(oops; added this to ticket #26 by mistake)

I added an example of extracting them in bd03e3b0845fa785330af3916f4253d505a9fa16

However, it looks like gcc.Block.vars is misnamed; it corresponds to: {{{ #define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars) }}} from tree.h, but this seems to contain all declarations, not just variables (but see ticket #21).

I'm inclined to rename it to "decls" - does this sound sane?

davidmalcolm avatar Feb 09 '17 20:02 davidmalcolm

Trac comment by tromey on 2012-01-10 11:37:38:

Thanks for adding the example.

I think renaming this attribute would be fine.

davidmalcolm avatar Feb 09 '17 20:02 davidmalcolm