Linux driver Debugging--Oops information analysis of segment error

Source: Internet
Author: User

Linux driver Debugging--Oops information analysis of segment error http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=29401328&id=4923447

1. Analyze Coredump printing Information

2. Identify the function that has the error

See the function and the PC where the error occurred

PC is at segment_test_open+0x14/0x1c [Segdrv]

Look at the PC value:

PC: [<7f000014>] LR: [<800d958c>] psr:20070013

See BackTrace:

[<7f000014>] (Segment_test_open [Segdrv]) from [<800d958c>] (chrdev_open+0xa4/0x178)
[<800d958c>] (Chrdev_open) from [<800d3e1c>] (do_dentry_open.isra.17+0x110/0x294)

First, directly determine the function that the error occurred
See this phrase "PC is at segment_test_open+0x14/0x1c [Segdrv]"We are most concerned about the PC value when an error occurs because it is an error
The address of the instruction, where we can see that the error occurred at the Segment_test_open of the function, 0x1c represents the total length of the function (assembly code)

Second, according to the PC value to determine the function of the error
Sometimes it doesn't tell you directly which function is happening, but instead tells you the value of the PC.

If the error function that occurs is a driver module

# arm-none-linux-gnueabi-objdump-d First_drv.ko > First_drv.dis

If the error function that occurs is the kernel of
this time is similar to what happened in the module, but the entire kernel is disassembled:
# arm-none-linux-gnueabi-objdump-d vmlinux > Vmlinux.dis

Linux driver Debugging--Oops information analysis of segment error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.