CONFIG_DEBUG_USER【转】
转自:https://blog.csdn.net/adaptiver/article/details/12778621
关于CONFIG_DEBUG_USER
把menuconfig中查到的 CONFIG_DEBUG_USER 信息copy在下面:
| CONFIG_DEBUG_USER:
|
| When a user program crashes due to an exception, the kernel can
| print a brief message explaining what the problem was. This is
| sometimes helpful for debugging but serves no purpose on a
| production system. Most people should say N here.
|
| In addition, you need to pass user_debug=N on the kernel command
| line to enable this feature. N consists of the sum of:
|
| 1 - undefined instruction events
| 2 - system calls
| 4 - invalid data aborts
| 8 - SIGSEGV faults
| 16 - SIGBUS faults
|
| Symbol: DEBUG_USER [=n]
| Type : boolean
| Prompt: Verbose user fault messages
| Defined at arch/arm/Kconfig.debug:49
| Location:
| -> Kernel hacking
要试用该功能:
首先在config文件中添加该选项,然后在 kernel 的cmdline中添加 user_debug=1 或者 user_debug=31
类似:
console=ttyS2 quiet user_debug=31
setenv bootargs console=ttySAC0,115200 user_debug=1 saveenv
user_debug的值可根据情况选定,下面这几个宏与上面的粗体部分可对照一下,可得知各个bit使能之后能得到的信息。
#define UDBG_UNDEFINED (1 << 0)
#define UDBG_SYSCALL (1 << 1)
#define UDBG_BADABORT (1 << 2)
#define UDBG_SEGV (1 << 3)
#define UDBG_BUS (1 << 4)
有一篇文章就这一点而言有参考意义:
CONFIG_DEBUG_USER【转】的更多相关文章
- Arm Linux系统调用流程详细解析
Linux系统通过向内核发出系统调用(system call)实现了用户态进程和硬件设备之间的大部分接口. 系统调用是操作系统提供的服务,用户程序通过各种系统调用,来引用内核提供的各种服务,系统调用的 ...
- ARM应用调试思路、方法总结、笔记
一.应用调试1:使用strace命令来跟踪系统调用 二.应用调试2:使用GDB来调试应用程序 编译gdb,gdbservertar xjf gdb-7.4.tar.bz2cd gdb-7.4/./co ...
- 41.Linux应用调试-修改内核来打印用户态的oops
1.在之前第36章里,我们学习了通过驱动的oops定位错误代码行 第36章的oops代码如下所示: Unable to handle kernel paging request at //无法处理内核 ...
- 应用调试(三)oops
目录 应用调试(三)oops 引入 配置内核打开用户oops CONFIG_DEBUG_USER user_debug 设置启动参数测试 打印用户堆栈 分析栈 main的调用 title: 应用调试( ...
- linux c段错误分析方法
from:http://blog.csdn.net/adaptiver/article/details/37656507 一. 段错误原因分析 1 使用非法的指针,包括使用未经初始化及已经释放的指针( ...
- ARM Linux系统调用的原理
转载自:http://blog.csdn.net/hongjiujing/article/details/6831192 ARM Linux系统调用的原理 操作系统为在用户态运行的进程与硬件设备进行交 ...
随机推荐
- Leetcode 28.实现strStr() By Python
实现 strStr() 函数. 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始).如果不存在,则返 ...
- Word Ladder - LeetCode
目录 题目链接 注意点 解法 小结 题目链接 Word Ladder - LeetCode 注意点 每一个变化的字母都要在wordList中 解法 解法一:bfs.类似走迷宫,有26个方向(即26个字 ...
- PendingIntent的使用
1, 构造intent Intent mIntent = new Intent("android.intent.action.MAIN"); ComponentName comp ...
- A1085. Perfect Sequence
Given a sequence of positive integers and another positive integer p. The sequence is said to be a & ...
- mysql自定义函数与过程中写法的注意事项
BEGIN #Routine body goes here... /* update szzx_goods_common set gc_id=i where gc_name=(SELECT gc_na ...
- 弹指之间 -- Polychord
CHAPTER 19 复合和弦 Polychord 示例歌曲:爱很简单,恰是你的温柔
- list 删除一个元素的三种做法--python
我们以一个字符串为元素类型的 list 为例,进行列表元素的删除: l = ['no surfing', 'flippers'] 法一:remove(val) >>> l.remov ...
- Post和get请求时中文乱码
在web.xml中加入: <filter> <filter-name>CharacterEncodingFilter</filter-name> <filte ...
- P4315 月下“毛景树”
P4315 月下"毛景树" 题目描述 毛毛虫经过及时的变形,最终逃过的一劫,离开了菜妈的菜园. 毛毛虫经过千山万水,历尽千辛万苦,最后来到了小小的绍兴一中的校园里. 爬啊爬~爬啊爬 ...
- 纯js异步无刷新请求(只支持IE)【原】
纯js异步无刷新请求 下载地址:http://pan.baidu.com/s/1slakL1F 所以因为非IE浏览器都禁止跨域请求,所以以只支持IE. <HTML> <!-- 乱码( ...