gtags (Global) 6.6.9
Powered by Berkeley DB 1.85 and SQLite3 3.40.1.



on  macOS big sur 11.7.4/ubuntu 20.04    work with latest vim  universal-tags




analysis C/C++ code 


1、ctrl+]  should jump to the implementation of a function . but current version 
of gtags jump to declaration of the function in .h file .It works inefficiently


2、all this code can be found in 
https://www.st.com/en/embedded-software/x-cube-spn5.html package
 void BSP_MotorControl_Init(uint16_t id, void* initDeviceParameters)            
    3 {                                                                         
     
    2   if ((motorDrvHandle != 0)&&(motorDrvHandle->Init != 0))                 
     
    1   {                                                                       
     
 197      motorDrvHandle->Init(initDeviceParameters);                           
                                                                             
    1   }                                                                       
     
    2   else                                                                    
      
    3   {                                                                       
     
    4     MOTOR_CONTROL_ERROR_UNDEFINED_FUNCTION(0);                            
      
    5   }                                                                       
     
    6 }   

cursor on Init(),ctrl+] or C-_ s , tags return a wrong declaration. It goes to 
struct CAN_HandleTypeDef   instead of struct motorDrv_t 


and more, in struct motorDrv_t ,cursor on function pointer (*Init),C-_ s  
should list the references of motorDrv_t.Init() . But it returns all references 
of tag ‘init()’ .This information is useless and confusing.






| |
龚泽 13884465286
|
|
mgon...@163.com
|

Reply via email to