Linux内核调试之Oops信息

LINUX内核调试相关--oops信息的… LINUX内核调试相关--oops信息的定位2 收藏 Ø  实验目的与意义 1 、掌握printk 的使用、设置及实现原理,理解分级别进行打印log 信息的实现方法 2 、掌握如何分析oops 的方法 3 、掌握strace 工具的移植和使用方法   Ø  基本原理和方法 1 、请回顾栈的工作原理,尤其是栈帧的作用 2 、请对照printk 的源代码来进行printk 相关实验,并在实验 阅读详情

Linux内核调试之Oops信息



Oops这个英文单词的意思是“哎呀”,当内核出错时(比如访问非法地址),输出的信息就成为Oops信息,下面用一个例子来介绍一下Oops信息:



例子:为了测试Oops信息,这里我们可以任意选择一个内核文件做测试,我以i2c为例:


1.
修改linux源代码/drivers/i2c/i2c-core.c
在函数static int __init i2c_init(void)的开头添加如下语句:
int * ptest = NULL;
*ptest = 0xabcd;

如下:


Linux内核执行到这里就会出错,产生Oops信息




2.
然后在menuconfig中将i2c编译进内核:
make menuconfig
在Device Drivers中选择I2C support,把I2C编译进内核




3.
重新编译内核,然后用该内核启动




4.
果然出现了Oops信息啦~~如下图:

上图中的从第7行Bug开始到最后就是Oops信息



5.

为了将Oops信息中的机器码地址和源文件相对应,我们还要将编译好的内核镜像反汇编以便对照,但由于我们之前用make bzImage命令来生成bzImage内核压缩镜像,无法反汇编,所以我们运行如下命令:

make vmlinux                    表示对生成的内核镜像不压缩


这样生成的内核镜像大约150M!



6.

将第5步生成的无压缩的内核镜像反汇编:

objdump -D vmlinux > vmlinux.dis


生成的vmlinux.dis大约500M!呵呵,如下:

vmlinux:     file format elf32-i386


Disassembly of section .text:

c1000000 <_text>:
c1000000:       f6 86 11 02 00 00 40    testb  $0x40,0x211(%esi)
c1000007:       75 14                   jne    c100001d <_text+0x1d>
c1000009:       0f 01 15 16 4e 6a 01    lgdtl  0x16a4e16
c1000010:       b8 18 00 00 00          mov    $0x18,%eax
c1000015:       8e d8                   mov    %eax,%ds
c1000017:       8e c0                   mov    %eax,%es
c1000019:       8e e0                   mov    %eax,%fs
c100001b:       8e e8                   mov    %eax,%gs
c100001d:       fc                      cld
c100001e:       31 c0                   xor    %eax,%eax
c1000020:       bf 00 90 7a 01          mov    $0x17a9000,%edi
c1000025:       b9 5c b8 83 01          mov    $0x183b85c,%ecx
c100002a:       29 f9                   sub    %edi,%ecx
c100002c:       c1 e9 02                shr    $0x2,%ecx
c100002f:       f3 ab                   rep stos %eax,%es:(%edi)
c1000031:       bf e0 99 73 01          mov    $0x17399e0,%edi
c1000036:       b9 00 04 00 00          mov    $0x400,%ecx
c100003b:       fc                      cld
c100003c:       f3 a5                   rep movsl %ds:(%esi),%es:(%edi)
c100003e:       8b 35 08 9c 73 01       mov    0x1739c08,%esi
c1000044:       21 f6                   and    %esi,%esi
c1000046:       74 0c                   je     c1000054 <_text+0x54>
c1000048:       bf 00 73 73 01          mov    $0x1737300,%edi
c100004d:       b9 00 02 00 00          mov    $0x200,%ecx
c1000052:       f3 a5                   rep movsl %ds:(%esi),%es:(%edi)
c1000054:       66 81 3d e6 9b 73 01    cmpw   $0x207,0x1739be6
c100005b:       07 02
c100005d:       72 1c                   jb     c100007b <default_entry>
c100005f:       a1 1c 9c 73 01          mov    0x1739c1c,%eax
c1000064:       3d 04 00 00 00          cmp    $0x4,%eax
c1000069:       73 0e                   jae    c1000079 <lguest_entry>
c100006b:       8b 04 85 c0 72 73 01    mov    0x17372c0(,%eax,4),%eax
c1000072:       2d 00 00 00 c0          sub    $0xc0000000,%eax
c1000077:       ff e0                   jmp    *%eax

               ..................................................






下面开始详细介绍Oops信息:


BUG: unable to handle kernel NULL pointer dereference at (null)

这是Oops信息的字符串说明,说明我们访问了NULL指针



IP: [<c172f60b>] i2c_init+0x9/0x63

<c172f60b>表示内核错误处的ip指针,在vmlinux.dis中搜索“c172f60b”,找到如下:

c172f5fe:       5e                      pop    %esi
c172f5ff:       5f                      pop    %edi
c172f600:       5d                      pop    %ebp
c172f601:       c3                      ret

c172f602 <i2c_init>:
c172f602:       55                      push   %ebp
c172f603:       b8 20 c0 6d c1          mov    $0xc16dc020,%eax
c172f608:       89 e5                   mov    %esp,%ebp
c172f60a:       53                      push   %ebx
c172f60b:       c7 05 00 00 00 00 cd    movl   $0xabcd,0x0
c172f612:       ab 00 00
c172f615:       e8 c6 92 bd ff          call   c13088e0 <bus_register>
c172f61a:       85 c0                   test   %eax,%eax
c172f61c:       89 c3                   mov    %eax,%ebx
c172f61e:       75 40                   jne    c172f660 <i2c_init+0x5e>
c172f620:       b8 67 ee 63 c1          mov    $0xc163ee67,%eax
c172f625:       e8 36 ab bd ff          call   c130a160 <class_compat_register>
c172f62a:       85 c0                   test   %eax,%eax
c172f62c:       a3 d4 76 83 c1          mov    %eax,0xc18376d4
c172f631:       74 1e                   je     c172f651 <i2c_init+0x4f>
这正好是在i2c_init函数中。



i2c_init+0x9/0x63
表示出错的是在i2c_init函数的起始地址(0xc172f602)偏移0x9的位置,而i2c_init函数的大小为0x63个字节,出错处的ip=c172f60b,正好等于0xc172f602+0x9



Pid: 1

发生错误的进程ID



[    0.992003] EIP: 0060:[<c172f60b>] EFLAGS: 00010246 CPU: 0                   
[    0.992003] EIP is at i2c_init+0x9/0x63                                      
[    0.992003] EAX: c16dc020 EBX: c1785e34 ECX: 00000000 EDX: 00000000          
[    0.992003] ESI: c16fe164 EDI: 00000000 EBP: df071f98 ESP: df071f94          
[    0.992003]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068                    
[    0.992003] Process swapper (pid: 1, ti=df070000 task=df068000 task.ti=df070)

发生错误时的各个寄存器的值,其中的CPU: 0表示发生错误的CPU编号,对于单处理器系统来说,编号为0



[    1.240004] Call Trace:
[    1.240004]  [<c1001272>] ? do_one_initcall+0x32/0x1a0
[    1.240004]  [<c172f602>] ? i2c_init+0x0/0x63
[    1.240004]  [<c17018d9>] ? kernel_init+0x12d/0x183
[    1.240004]  [<c17017ac>] ? kernel_init+0x0/0x183
[    1.240004]  [<c1003e67>] ? kernel_thread_helper+0x7/0x10
发生错误时的堆栈调用,最下面的是最上层的调用




Code: 89 18 83 7d ec 00 0f 85 64 ff ff ff 31 db b8 00 c0 6d c1 e8
出错指令附近的指令的机器码


利用上面这些信息,我们就可以很快的找到错误的位置啦~~




完成!




scGPT学习资料汇总 - 单细胞多组学基础模型 scGPT(single-cell Generative Pre-trained Transformer)是一个针对单细胞多组学数据的基础模型,由多伦多大学Wang Bo实验室开发。该模型通过在超过3300万个细胞上进行生成式预训练,捕捉了基因和细胞之间的复杂关系,为多种下游任务提供了强大的基础。scGPT为单细胞分析提供了强大的基础模型和丰富的资源。通过本文汇总的学习材料,读者可以快速掌握scGPT的使用,并将其应用到自己的研究中。 阅读详情

相关推荐

ControlCAN.dll开发适配USBCAN_E/2E_U设备

摘要:本文提供了USBCAN_E/2E_U设备的配置指南:1)安装专用驱动;2)获取最新的ControlCAN.dll文件;3)修改VCI调用顺序,新增VCI_SetReference函数设置波特率;4)使用工具计算波特率配置值,并给出了常见波特率对应的代码参考值(如500K对应0x060007)。配置过程强调使用特定工具计算精确的波特率参数,并提供了相关软件下载链接。

weixin_43969033的博客 405

linux之Oops原理及解析

linux之Oops原理和分析

gy794627991的博客 1万+

IEEE Access投稿全流程解析:从初次提交到最终接收的完整指南

本文详细解析了IEEE Access期刊从初次投稿到最终接收的全流程,包括ORCID注册、论文投稿七步法、回稿再投流程及最终版提交等关键步骤。特别强调了4-6周快速同行评审的特点,为研究者提供了一份实用的投稿指南,帮助高效完成IEEE Access期刊投稿。

weixin_29273849的博客 923

嵌入式Linux——oops:根据oops信息,找到错误的产生位置以及函数的调用关系

简介:     本文主要介绍通过oops信息找到程序中出错位置的方法。并结合自己代码中的错误来讲解如何找到出错位置。同时还会介绍使用栈信息来推到函数间的调用关系。  Linux内核:linux-2.6.22.6  所用开发板:JZ2440 V3(S3C2440A) 声明:     本文主要是对韦东山老师视频的总结,同时看了一些网友的博文来对这方面...

Neil驱动的博客 2575

【QT+PCL】串口读取单线激光雷达数据并在QVtkWidget组件中实时刷新(一)

(本文主要记录开发过程以及遇到的困难及解决方式)

2301_76329543的博客 3075

告别‘小爱同学’:用ESP32-S3和esp-sr SDK,从零打造一个离线语音助手(含完整代码)

本文详细介绍了如何利用ESP32-S3芯片和esp-sr SDK从零构建一个离线语音助手,涵盖硬件选型、声学设计、SDK配置及低功耗优化等关键步骤。通过实战案例和完整代码,帮助开发者实现自定义唤醒词和命令词,打造低成本、高隐私的本地语音控制解决方案。

weixin_29041195的博客 383

Oops信息及栈回溯

http://blog.chinaunix.net/uid-14753126-id-2980100.html 1. Oops信息来源及格式 Oops这个单词含义为“惊讶”,当内核出错时(比如访问非法地址)打印出来的信息被称为Oops信息。 Oops信息包含以下几部分内容: (1)一段文本描述信息。       比如类似“Unable to handle kernel NULL point

adaptiver的专栏 1435

python实现下载和离线安装包环境

导出当前电脑python安装的所有包列表requirement.txt。

m0_60352504的博客 1688

Linux内核oops

记录一次在一次调试摄像头的过程中,在运行应用程序打开双路摄像头采集图像时出现程序崩溃,出现oops的解决调试。

Linux驱动开发工程师,熟悉Linux/Android底层驱动、TP、显示、IIC、网络等通用外设调试适配,Linux上层应用开发。常用平台瑞芯微、全志、恩智浦等。 1438

MIPI D-PHY的校准测试

MIPI的校准测试困扰了很久,今天终于得以解决!

一只豌豆象的博客 3935

SAPGUI excel 导出时遇到的运行时错误:STRING_SIZE_TOO_LARGE

当报表导出需求远超单一 XLSX 文件的物理承载力时,与其在 SAPGUI 中硬拼 2 GB 限制,不如把分页、过滤、流式写入作为设计前提。掌握 ABAP2XLSX 或 CSV + Power Query 等工具链,既能满足审计合规,又能让应用服务器远离的噩梦。祝你在下一次导出海量数据时,既高效又优雅。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 649

LINUX内核调试相关--oops信息的定位

http://blog.csdn.net/pulpdog/article/details/6087857 第一篇 :定位Oops的具体代码行 作者: albcamus (百無一用書生)  ( 来自Linus Torvalds的讨论: [url]https://groups.google.com/group/linux.kernel/browse_thread/thread/b70b

星辉斑斓 1285

AMD KFD的SDMA Packet 类型和定义解析

本文详细分析了AMD GPU架构中的SDMA(System Direct Memory Access)数据传输机制,重点介绍了其核心数据结构——SDMA Packet。SDMA通过8种主要Packet类型(包括内存拷贝、数据写入、屏障同步、中断触发等)实现高效主机-设备通信。每种Packet采用位域结构和联合体封装设计,在保证功能完整性的同时实现空间优化。这些Packet支持丰富的访问属性和扩展字段,适用于高性能数据搬运、内存初始化、任务同步、性能分析等场景,为GPU计算提供了灵活高效的数据传输解决方案。

图形/计算GPU的驱动与虚拟化技术分享园地 1286

LINUX内核调试相关--oops信息的定位2

<br />Ø  实验目的与意义<br />1、掌握printk 的使用、设置及实现原理,理解分级别进行打印log 信息的实现方法<br />2、掌握如何分析oops 的方法<br />3、掌握strace 工具的移植和使用方法<br /> <br />Ø  基本原理和方法<br />1、请回顾栈的工作原理,尤其是栈帧的作用<br />2、请对照printk 的源代码来进行printk 相关实验,并在实验中进一步理解源代码<br /> <br />Ø  实验内容及步骤  <br />一.Prin

pulpdog的专栏 5042

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

LINUX内核调试相关--oops信息的定位1

<br />一个简单的linux crackme的逆向<br /><br />前言<br /><br />     最不喜欢的就是写破解教程,酒后一时冲动,老夫卿发少年狂,许下将写一篇linux平台逆向的文章的诺言,作此文实非颇不得已。<br />     在此申明:本文在技术上非常初级,并没有用到什么高深的技术,本人水平亦有限,如有差错,还请见谅!<br />     <br />开始之前的准备<br /><br />     正如C语言教程从 hello world 开始,我们也由一个 crac

pulpdog的专栏 1637

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

防爆机器人EMC整改实战:从DCS误报到稳定运行的排查与设计

电磁兼容性(EMC)是工业自动化系统稳定运行的基础,其核心在于控制干扰源、耦合路径与敏感设备三要素之间的平衡。在石化、电力等高危场景中,DCS与SIS系统对4-20mA等信号完整性要求极高,共模电流通过传导或辐射耦合极易引发数据跳变甚至误联锁。防爆机器人因隔爆外壳、本安电路功率限制及运动特性,面临更严峻的EMC挑战。通过抑制共模干扰、优化屏蔽接地与滤波设计,可显著提升现场抗扰度。本文结合防爆巡检机器人项目,详解EMC问题定位、整改措施与预防策略,为工业设备电磁兼容设计提供工程实践参考。

weixin_33834075的博客 375

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

linux中Oops信息的调试及栈回溯

Oops 信息包含以下几部分内容。 1 一段文本描述信息。 比如类似“Unable to handle kernel NULL pointer dereference at virtual address 00000000” 的信息,它说明了发生的是哪类错误。 2 Oops 信息的序号。 比如是第 1 次、第 2 次等。这些信息与下面类似,中括号内的数据表示序号。 Internal

沉淀 603

从oops信息查找出错代码行

(1)从oops crash的地方开始查起,首先找到指针访问错误的代码行a)重新编译内核时,选上kernel hacking--->compile the kernel with debug info                                                                     ---->kernel debugging使得内核包含调试信息,b)然后从Oops信息中找到“PC is at free_block+0x8c/0x168”#######

ykqnjust的专栏 4686

linux oops问题调试

36.Linux驱动调试-根据oops定位错误代码行 1.当驱动有误时,比如,访问的内存地址是非法的,便会打印一大串的oops出来 1.1以LED驱动为例 将open()函数里的ioremap()屏蔽掉,直接使用物理地址的GPIOF,如下图所示: 1.2然后编译装载26th_segmentfault并执行测试程序后,内核便打印了oops出来,如下图所示: 2.接下来,我...

osnet的博客 1986

一文搞懂Linux内核Oops调试方法

常在河边走,哪能不湿鞋。用Linux,总有死机的时候,如果运气好,会看到一些所谓”Oops”信息(在屏幕上或系统日志中),Oops这个英文单词的意思是“哎呀”,当内核出错时(比如访问非法地址),输出的信息就成为Oops信息,Oops可以看成是内核级的Segmentation Fault。内核开发比用户空间开发更难的一个因素就是内核调试艰难。内核错误往往会导致系统宕机,很难保留出错时的现场,调试内核的关键在于你的对内核的深刻理解。

深度Linux 1939
上一篇: 使用kgdb进行Linux内核调试(未完成!)
下一篇: Linux下静态库与动态库的使用
htttw
博客等级 码龄18年 378粉丝 73原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值