Bug #17768 2010-12-04 07:22
jiminy
Parser does not get all symbols in an include
Code Blocks v 10.05 Gentoo Include file linux/videodev2.h A section in this include file lists some #defines in the middle of a structure definition, see below. All declarations in the include after this point did not make it into the symbol database. By moving the semicolon up before the #defines, the include file was able to be fully parsed. line 457 struct v4l2_jpegcompression { int quality; int APPn; /* Number of APP segment to be written, * must be 0..15 */ int APP_len; /* Length of data in JPEG APPn segment */ char APP_data[60]; /* Data in the JPEG APPn segment. */ int COM_len; /* Length of data in JPEG COM segment */ char COM_data[60]; /* Data in JPEG COM segment */ __u32 jpeg_markers; /* Which markers should go into the JPEG * output. Unless you exactly know what * you do, leave them untouched. * Inluding less markers will make the * resulting code smaller, but there will * be fewer aplications which can read it. * The presence of the APP and COM marker * is influenced by APP_len and COM_len * ONLY, not by this property! */ #define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ #define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ #define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ #define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */ #define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will * allways use APP0 */ };
- Category
- Plugin::CodeCompletion
- Group
- Status
- Open
- Close date
- Assigned to
- ollydbg
History
I meant closing bracket and semicolon :)
I would like to check this bug. did you mean that the member variables of the struct v4l2_jpegcompression was missing after several
#define
??
Am I right?
ollydbg
ollydbg
No, the v4l2_jpegcompression was fine. But every symbol declared after it in the include was missing, until I moved the #defines out of the struct. However, I was unable to recreate the behavior tonight, even after moving the defines back into the struct.
I've been playing with this some more, and the issue is not whether the #defines are inside the structure or not. The original include file looks like this at the end of v4l2_jpegcompression:
#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will
* allways use APP0 */
};
If I insert a space after the last "*/", or insert a line before the last "};", then everything is fine.
I confirmed this with the following code:
struct test {
int a;
int b;
#define something 1 /* something */
};
struct test2 {
int c;
int d;
};
int main()
{
struct test t;
struct test2 t2;
t.
}
the code completion for t in this case will include structure test2 as well as function main as members of structure test. If I put a space after the comment or a blank line after it, everything is ok.
@jiminy
It seems I did not receive any notification when you reply here, so my comment was a bit late.
If you still use 10.05 version, can you try the latest nightly build version. because the CodeCompletion has improved a lot after the 10.05.
and if the problem still exist, I will check it and try to fix it.
It would be better that you can wrote a post in the Codeblocks' forum discussion.
asmwarrior
ollydbg @ Codeblocks' forum
@jiminy
It seems I did not receive any notification when you reply here, so my comment was a bit late.
If you still use 10.05 version, can you try the latest nightly build version. because the CodeCompletion has improved a lot after the 10.05.
and if the problem still exist, I will check it and try to fix it.
It would be better that you can wrote a post in the Codeblocks' forum discussion.
asmwarrior
ollydbg @ Codeblocks' forum