如何解决eclipse内容辅助以显示正确的结构

时间:2017-11-07 03:19:03

标签: c linux-kernel eclipse-cdt content-assist

从这张图片中,我们可以看到eclipse如何识别宏,但没有正确使用它。eclipse content assist wrong struct

我正在尝试使用

中的eclipse内容辅助显示字段
#define current get_current()

在/arch/x86/include/asm/current.h中定义的宏

get_current返回指向struct struct_task的指针,如下所示:

static __always_inline struct task_struct *get_current(void)
{
    return this_cpu_read_stable(current_task);
}

我想输入current->状态,例如,struct task_struct {的值填充而不是(出于某些奇怪的原因)struct call_path;

的结构成员

1 个答案:

答案 0 :(得分:1)

这可以通过确保在“C / C ++ General” - >部分中启用索引来解决。启用索引器[检查]