avatar
x*e
1
1. when will core dump occur?
2. what can you get from core? and how to get it?
Any reference book? Thanks.
avatar
y*y
2
在精华区里找找,我看到过的。

【在 x****e 的大作中提到】
: 1. when will core dump occur?
: 2. what can you get from core? and how to get it?
: Any reference book? Thanks.

avatar
n*g
3
gdb -c core *.ou

【在 x****e 的大作中提到】
: 1. when will core dump occur?
: 2. what can you get from core? and how to get it?
: Any reference book? Thanks.

avatar
c*z
4

core dumped when process receive signal 9 or bus error
u can know the where the program break and the variable
value
by use gdb or ddd.

【在 y***y 的大作中提到】
: 在精华区里找找,我看到过的。
avatar
s*g
5
When you access an address beyond your own, i.e.
write other programs' memory, a core dump occurs
and the OS kill your program.
It usually happen when you use pointer in C. For
example:
main()
{
int *p;
*p = 1000;
printf("%d\n", p);
}
You forget to use malloc/new to allocate memory,
right?
If you compile program by adding -g, say,
$> gcc -g sample.c
Then you can trace the core dump happens in which
line, by using gdb.
$> gdb a.out core
When you are in gdb, use command "bt" or "backtrace"
t

【在 c*****z 的大作中提到】
:
: core dumped when process receive signal 9 or bus error
: u can know the where the program break and the variable
: value
: by use gdb or ddd.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。