Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » some macro could not be resolved but CDT can explore the macro expansion in linux kernel code
some macro could not be resolved but CDT can explore the macro expansion in linux kernel code [message #1817141] Sat, 16 November 2019 00:29 Go to next message
Eclipse UserFriend
In linux kernel code, some macro can be explored by CDT, but they are indicated "could not be resolved" , see the attached screenshot.
index.php/fa/36769/0/
Is there a way to fix this issue?
Re: some macro could not be resolved but CDT can explore the macro expansion in linux kernel code [message #1817420 is a reply to message #1817141] Thu, 21 November 2019 16:11 Go to previous messageGo to next message
Eclipse UserFriend
Not sure which kernel version you have so I wasn't able to duplicate this.
The ubifs in my version (from the current torvalds master branch, 5.4.0-rc8) is different.
And ubifs_assert is defined differently.
You also haven't given the Eclipse and CDT versions you are using nor the actual error.

It's unlikely that an undefined macro would be flagged as "could not be resolved".
It would just look like a string of garbage or (in this case) an undefined function.
It's more likely that something in the expansion couldn't be resolved.

In the latest CDT release (with Eclipse 2019-09), there are a number of possible "could not be resolved" flags:

    o) Field cannot be resolved
    o) Function cannot be resolved
    o) Method cannot be resolved
    o) Symbol is not resolved
    o) Type cannot be resolved

So it's probably important to know which was meant.

Re: some macro could not be resolved but CDT can explore the macro expansion in linux kernel code [message #1817505 is a reply to message #1817420] Mon, 25 November 2019 02:34 Go to previous message
Eclipse UserFriend
Hi David,
Thanks, the linux kernel version is 4.12.29, CDT is the latest release (9.9.0.201909091956) with Eclipse 2019-09, Problem description: Field 'ubifs_assert(0)' could not be resolved, ubifs_assert is a mcro, and defined at fs/ubifs/debug.h

There are lots of debug.h in linux kernel code, maybe the corrected debug.h is not loaded when analysis ubifs_assert mcro.

./net/mac80211/debug.h
./kernel/irq/debug.h
./arch/s390/include/asm/debug.h
./arch/s390/include/uapi/asm/debug.h
./arch/powerpc/include/asm/debug.h
./arch/mips/include/asm/debug.h
./include/linux/sched/debug.h
./include/linux/wimax/debug.h
./include/linux/lockd/debug.h
./include/linux/sunrpc/debug.h
./include/uapi/linux/nfsd/debug.h
./include/uapi/linux/sunrpc/debug.h
./fs/jffs2/debug.h
./fs/ntfs/debug.h
./fs/ubifs/debug.h
./fs/aufs/debug.h
./tools/perf/util/debug.h
./tools/lib/api/debug.h
./sound/usb/debug.h
./drivers/net/wireless/st/cw1200/debug.h
./drivers/net/wireless/realtek/rtlwifi/debug.h
./drivers/net/wireless/ti/wlcore/debug.h
./drivers/net/wireless/intel/iwlwifi/fw/api/debug.h
./drivers/net/wireless/ath/carl9170/debug.h
./drivers/net/wireless/ath/wcn36xx/debug.h
./drivers/net/wireless/ath/ath6kl/debug.h
./drivers/net/wireless/ath/ath9k/debug.h
./drivers/net/wireless/ath/ath10k/debug.h
./drivers/net/wireless/ath/ath5k/debug.h
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
./drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.h
./drivers/net/ethernet/ibm/emac/debug.h
./drivers/mtd/ubi/debug.h
./drivers/video/fbdev/via/debug.h
./drivers/usb/storage/debug.h
./drivers/usb/dwc2/debug.h
./drivers/usb/dwc3/debug.h
./drivers/hwtracing/intel_th/debug.h
./drivers/gpu/host1x/debug.h
./drivers/gpu/drm/nouveau/include/nvkm/core/debug.h
./drivers/gpu/drm/i915/gvt/debug.h
./drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/debug.h
./drivers/md/bcache/debug.h
Previous Topic:Eclipse can't find clang (Win10)
Next Topic:Formatting braces nested statements in a macro call
Goto Forum:
  


Current Time: Thu Jun 19 03:24:19 EDT 2025

Powered by FUDForum. Page generated in 0.06966 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top