Visar Zejnullahu | 22 Jul 2012 00:06
Picon

semantic-ia-fast-jump: could not find suitable jump point

Hi everyone.

I have this problem with semantic-ia-fast-jump on a particular
variable (tag), which in my project is called GPIOC. When I tried to
execute the very first time on finding the place where the GPIOC
variable is defined, it found it. But when I try to find it again, it
doesn't. semantic-ia-fast-jump works fine on finding the other
variables and functions in my project. I deleted all the contents in
~/.semanticdb and then it works well, but just for one time.

This is what I get:

M-x semantic-ia-fast-jump:
Could not find suitable jump point for GPIOC

M-x semantic-analyze-current-context:

Context Type: #<semantic-analyze-context context>
Bounds: (1560 . 1565)
Prefix: "GPIOC"
Prefix Classes: 'function
                'variable
                'type
Encountered Errors: '(error "Cannot find definition for \"GPIOC\"")
--------
-> Local Args: void
-> Local Vars: void

I call semantic-ia-fast-jump in the main.c, while the GPIOC is defined
in a header file.
(Continue reading)

Eric M. Ludlam | 25 Jul 2012 03:48
Picon
Gravatar

Re: semantic-ia-fast-jump: could not find suitable jump point

Hi,

Are you using a ctags or GNU Global extension with your project?  Those 
databases don't obey pre-processor macros well, and I suppose could 
trick semantic to jumping into a file, but once Emacs opens the buffer, 
Semantic would parse it and obey the preprocessor symbols.

I think you need to add _GPIOC into some preprocessor table.  If your 
project has a file with lots of #define declarations, you can add it to 
semantic-lex-c-preprocessor-symbol-file.  Use customize to set this 
variable.  Alternately, just add that one symbol to 
semantic-lex-c-preprocessor-symbol-map, also with customize.

Good Luck
Eric

On 07/21/2012 06:06 PM, Visar Zejnullahu wrote:
> Hi everyone.
>
> I have this problem with semantic-ia-fast-jump on a particular
> variable (tag), which in my project is called GPIOC. When I tried to
> execute the very first time on finding the place where the GPIOC
> variable is defined, it found it. But when I try to find it again, it
> doesn't. semantic-ia-fast-jump works fine on finding the other
> variables and functions in my project. I deleted all the contents in
> ~/.semanticdb and then it works well, but just for one time.
>
> This is what I get:
>
> M-x semantic-ia-fast-jump:
(Continue reading)


Gmane