美文网首页Linux
linux开发调试环境下的内核配置

linux开发调试环境下的内核配置

作者: 小桥流水啦啦啦 | 来源:发表于2020-06-14 20:51 被阅读0次
    1、针对常用的linux开发环境,汇总了debug所需的内核配置kgdb:
    #CONFIG_STRICT_KERNEL_RWX is not set
    #CONFIG_STRICT_MODULE_RWX is not set
    CONFIG_FRAME_POINTER=y
    CONFIG_KGDB=y
    CONFIG_KGDB_SERIAL_CONSOLE=y
    CONFIG_KGDB_KDB=y
    CONFIG_DEBUG_INFO=y
    CONFIG_KDB_KEYBOARD=y
    # CONFIG_RANDOMIZE_BASE is not set
    
    2、模块调试,可以打开如下选项:
    CONFIG_DEBUG_KERNEL
    CONFIG_DEBUG_SLAB
    CONFIG_DEBUG_PAGEALLOC
    CONFIG_DEBUG_SPINLOCK
    CONFIG_DEBUG_SPINLOCK_SLEEP
    CONFIG_INIT_DEBUG
    CONFIG_DEBUG_INFO
    CONFIG_MAGIC_SYSRQ
    CONFIG_DEBUG_STACKOVERFLOW
    CONFIG_DEBUG_STACK_USAGE
    CONFIG_KALLSYMS
    CONFIG_IKCONFIG
    CONFIG_IKCONFIG_PROC
    CONFIG_ACPI_DEBUG
    CONFIG_DEBUG_DRIVER
    CONFIG_SCSI_CONSTANTS
    CONFIG_INPUT_EVBUG
    CONFIG_PROFILING
    
    3、ebpf,打开如下选项:
    CONFIG_BPF=y
    CONFIG_BPF_SYSCALL=y
    # [optional, for tc filters]
    CONFIG_NET_CLS_BPF=m
    # [optional, for tc actions]
    CONFIG_NET_ACT_BPF=m
    CONFIG_BPF_JIT=y
    CONFIG_HAVE_BPF_JIT=y
    # [optional, for kprobes]
    CONFIG_BPF_EVENTS=y
    There are a few optional kernel flags needed for running bcc networking examples on vanilla kernel:
    CONFIG_NET_SCH_SFQ=m
    CONFIG_NET_ACT_POLICE=m
    CONFIG_NET_ACT_GACT=m
    CONFIG_DUMMY=m
    CONFIG_VXLAN=m
    
    Linux内核调试方法总结

    https://my.oschina.net/fgq611/blog/113249#OSC_h3_1

    https://www.cnblogs.com/alantu2018/p/8997149.html

    Linux journalctl命令使用

    https://www.cnblogs.com/sparkdev/p/8795141.html

    相关文章

      网友评论

        本文标题:linux开发调试环境下的内核配置

        本文链接:https://www.haomeiwen.com/subject/grmfxktx.html