Fatal error (11)Segmentation fault when trying to

2019-09-22 06:17发布

What does the following segmentation fault mean?

Fatal error (11)Segmentation fault

What is a segmentation fault, and what can cause it to happen?

The issue arrises once I type, Mx gdb into Emacs,

The inputs are shown in this picture the output is shown here.

more details:

[a]: i build emacs 24.1 on centos 5.3 from source, this build cannot enter gdb mode

[b]: also i build emacs 24.1 on debian 5.0, it can use gdb mode without error

so i really don't know what happened that i cannot use gdb mode in emacs 24.1 on centos 5.3:(

标签: linux emacs gdb
1条回答
欢心
2楼-- · 2019-09-22 07:07

To debug Emacs, if you built it yourself, change to the project directory, then do:

$ gdb ./src/emacs
$ (gdb) set logging file ~/emacs-errors.log
$ (gdb) r -q
<... get to the point where error happens ...>
$ (gdb) bt full

Then, when you send the bug report, use the ~/emacs-errors.log file (gdb will print all errors into it).

Also note that you will need to configure it to preserve the debug information when you compile it. To do that,

$ CFLAGS='-O0 -ggdb -g3' ./configure --enable-checking --enable-asserts

and then recompile.

查看更多
登录 后发表回答