由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - interview question
相关主题
GCC 和 G++ 的区别在什么地方?alloc memory in UNIX
who knows how to view the core file?how to use function calloc of c in fortran?
core dump[转载] two programming questions
help for g77[转载] Perl高手请进
Funny articles about emacs and vi. (Zhuan)Abort(coredump) ??????????????
how to write a recursive fcn using ksh to find all the occurances of a file?Where to download dbx?
Re: how to write a recursive fcn using ksh to find all the occurances[转载] 大侠救命哪!!!
can't run a simple c codecode
相关话题的讨论汇总
话题: core话题: when话题: gdb话题: question话题: interview
进入Unix版参与讨论
1 (共1页)
x****e
发帖数: 8
1
1. when will core dump occur?
2. what can you get from core? and how to get it?
Any reference book? Thanks.
y***y
发帖数: 56
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.

n********g
发帖数: 10
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.

c*****z
发帖数: 1211
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 的大作中提到】
: 在精华区里找找,我看到过的。
s*****g
发帖数: 219
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.

1 (共1页)
进入Unix版参与讨论
相关主题
codeFunny articles about emacs and vi. (Zhuan)
How to redirect error messages to a file?how to write a recursive fcn using ksh to find all the occurances of a file?
I/O redirectRe: how to write a recursive fcn using ksh to find all the occurances
send_mailcan't run a simple c code
GCC 和 G++ 的区别在什么地方?alloc memory in UNIX
who knows how to view the core file?how to use function calloc of c in fortran?
core dump[转载] two programming questions
help for g77[转载] Perl高手请进
相关话题的讨论汇总
话题: core话题: when话题: gdb话题: question话题: interview