Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to debug compile-time warnings for kernel module?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
PhiJ
Apprentice
Apprentice


Joined: 20 Dec 2005
Posts: 173
Location: UK

PostPosted: Fri Nov 02, 2018 7:37 am    Post subject: How to debug compile-time warnings for kernel module? Reply with quote

To connect to the internet, I use an external kernel module. This module is currently displaying some warnings when it compiles, and I'd like to investigate.

The first warning (below) appears to be associated with constprop. If I understand that right, it means the complier is taking functions which produce constants, and optimising them out (e.g. replace 1+1 with 2).

Code:
In function ‘memmove’,
    inlined from ‘ConstructEapolKeyData.constprop’ at /home/arch/Netgear/kaduke/port-to-4.15/Netgear-A6210/os/linux/../../common/cmm_wpa.c:3742:3,
    inlined from ‘ConstructEapolMsg.constprop’ at /home/arch/Netgear/kaduke/port-to-4.15/Netgear-A6210/os/linux/../../common/cmm_wpa.c:3638:2:
./include/linux/string.h:360:9: warning: argument 2 null where non-null expected [-Wnonnull]
  return __builtin_memmove(p, q, size);


I'm not quite sure where to start with this. I've inspected the code, and ConstructEapolMsg is called a number of times - I can only guess which call is the problem.

I can't see any way of debugging during a compile.

If this was a standard program, I might try removing optimisation, and running through gdb. But it's a kernel module, so I'm not sure how practical that is.

Sorry if this is a stupid question - I have had a search, and it's just making me more uncertain. Does anybody have any suggestions or hints?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum