SlickEdit Community

Archived Read Only Forums => SlickEdit 2016 v21 Beta Discussion => Topic started by: jporkkahtc on August 05, 2016, 09:27:07 pm

Title: Workspace preprocessing and symbols
Post by: jporkkahtc on August 05, 2016, 09:27:07 pm
If I have this #define in my code:
   #define THINGS(arg1, arg2, arg3, arg4)  \
         typedef struct arg1\
         {\
            union\
            {\
               uint8_t         buf[arg3];\
            };\
         } arg1

And this in my CPP file:
   THINGS(my_data_type2, void, 123, void);


Then, from Workspaceproperties, I add the preprocessor symbol:
   #define THINGS(arg1, arg2, arg3, arg4) typedef struct arg1{union{uint8_t buf[arg3];};}arg1
(I copied it out of the workspace_cpp.h file).

It doesn't work - Slick cannot find the symbl "my_data_type_2".

If I put this:
   typedef struct my_data_type3{union{uint8_t buf[arg3];};}my_data_type3;

   my_data_type3;

in the same source file, now Slick can find my_data_type3.

Title: Re: Workspace preprocessing and symbols
Post by: Dennis on August 06, 2016, 12:02:11 am
I'll look into this.

This could be a caching problem.  If you close and restart the editor, does the #define work for you?
Title: Re: Workspace preprocessing and symbols
Post by: jporkkahtc on August 06, 2016, 12:05:59 am
Nope.
Title: Re: Workspace preprocessing and symbols
Post by: Dennis on August 06, 2016, 12:15:26 am
So the define is in your workspace_cpp.h file, you have the workspace open, and when you create a test file with just "THINGS(my_data_type2, void, 123, void);" in it, nothing shows up in the Defs tool window?
Title: Re: Workspace preprocessing and symbols
Post by: jporkkahtc on August 06, 2016, 12:25:16 am
thats right.


I just selected RebuildTagFile for the workspace tag file from the tags dialog.
After a few minutes, Slick crashed.


Where can I upload the minidump?

Title: Re: Workspace preprocessing and symbols
Post by: jporkkahtc on August 16, 2016, 10:10:14 pm
Working with Beta3 now .... this is still a problem.

I have a workspace made of about 8 projects, all the projects a wildcard files.
In FileX.cpp (which is in PrjX)
   THINGS(my_data_type2, void, 123, void);

"THINGS" is defined in the workspace C preprocessing as I showed before, but after retagging the workspace my_data_type2 still isn't recognized as a symbol.
I tried having PrjX tags be in the workspace and in a separate tag file -- no difference.

I created a new workspace and added only PrjX to it. (same PRJ file - I didn't create a new project, just a new workspace).
I put the same definition for THINGS into C preprocessing for the new workspace, and now it works!

But, it doesn't work in the workspace I'd like it to work in :-(

OK .... I started playing with it more.

I found that THINGS would only work for defining that symbol if I made the workspace "TagFilesDirectory" be the same as where the workspace file itself lives.


Using PROCMON I verified:
Tagging is done with TAGGINGDIR\workspace_cpp.h

But, C/C++ Preprocessing editor in Workspace properties uses
WORKSPACEDIR\workspace_cpp.h
Title: Re: Workspace preprocessing and symbols
Post by: Dennis on August 17, 2016, 06:13:37 pm
Good catch.  This will be fixed in the next beta.

Did you ever send that mini dump from August 6 into support?
Title: Re: Workspace preprocessing and symbols
Post by: jporkkahtc on August 17, 2016, 06:34:24 pm
where to send it to?
Title: Re: Workspace preprocessing and symbols
Post by: Dennis on August 17, 2016, 06:44:49 pm
Send it into support as usual, they'll forward it to me.
Title: Re: Workspace preprocessing and symbols
Post by: jporkkahtc on August 17, 2016, 07:53:48 pm
I've uploaded it.CAS-68786-XB38