c++ - How do you read a segfault kernel log message -
This can be a very simple question, I'm trying to debug an application that has the following default error MyApp [8048000 + 24000] at kern.log
kernel: myapp [15514]: 794ef0 at segfault ip 080513b sp 794ef0 error 6
Here are my questions:
-
Is there a document that what are the difference error numbers on segfault, in this example this error is 6, but I've seen the error 4 , 5
-
Information > > Until I was able to compile symbols, and when I do a
x 0x8048000 + 24000
, then it gives a symbol, is it the right way to do it? My assumptions are so far as follows:- sp = stack pointer?
- ip = command prompt
- at = ????
- myapp [8048000 + 24000] = Icons address?
-
address
- Accessing the location in memory (It is possible that10
and11
are offset by a pointer which we expect to be set to a valid value, but instead of0
) -
ip
- Instruction indicator, that's where it is trying to make life -
sp
- Stack Pointer -
Error
- Iteccr-specific flags; Seearch / * / mm / fault.c
for your platform.
When the report points to a program, there is no shared library
Get better, debug-instrument build, and reproduce the problem as a debugger such as GDB.If it is a shared library
In the
libfoo.so [NNNNNNN + YYYY]
section, it isNNNNNN
where the library Was loaded. Subtract it from the instruction pointer (ip
) and you will get offset in the offset instruction.so
. After that you can use theobjdump -DCgl libfoo.so
and search for instructions on that offset. You will be able to easily find out which work is done with ASM labels. If there is no optimization in.so
then youaddr2line -e libfoo.so & lt; Offset & gt; You can also try using
.What is the meaning of error?
Here is the breakdown of the field:
Comments
Post a Comment