【问题标题】:How can I resolve eclipse content assist to show correct struct如何解决 Eclipse 内容辅助以显示正确的结构
【发布时间】:2017-11-07 03:19:02
【问题描述】:

从这张图片中,我们可以看到 eclipse 是如何识别宏的,但没有正确使用它..

我正在尝试使用来自

的 Eclipse 内容辅助来显示字段
#define current get_current()

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

get_current 返回一个指向结构 struct_task 的指针,如下所示:

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

例如,我想输入 current->state,以便填充来自struct task_struct { 的值,而不是(出于某种奇怪的原因)struct call_path; 的结构成员

【问题讨论】:

  • 重建索引解决了这个问题

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


【解决方案1】:

通过确保在“C/C++ 常规”部分中启用索引已解决此问题-> 启用索引器 [检查]

【讨论】:

    猜你喜欢
    • 2019-05-07
    • 1970-01-01
    • 1970-01-01
    • 2013-10-27
    • 2013-07-05
    • 1970-01-01
    • 2012-07-21
    • 2011-11-02
    • 1970-01-01
    相关资源
    最近更新 更多