Re: Not able to debug Core, SunOS 5.10, Gdb also crash.
- From: raxitsheth2000@xxxxxxxxxxx
- Date: 29 Jan 2007 21:06:52 -0800
On Jan 30, 8:26 am, Ian Collins <ian-n...@xxxxxxxxxxx> wrote:
raxitsheth2...@xxxxxxxxxxx wrote:
I am getting core dump (of Cprogram --No C++ ), and i Try to debug the
core using gdb, GDB itself crashes and gives core.
following are the OS/GDB details
I tried both (gcc and Sun Studio's cc, but same result)
If you are using Studio cc, use dbx, not gdb.
Yes I tried both.
I come to know about one more stuff. Below program is always crash ( I
know why) but gdb/dbx is not helpful. I want to ask that is this known
gdb bug or gdb limitation. ( i am just posting to relavant group also)
here is test program, always crash, not able to use GDB. (or dont know
problem of libc etc or what,)
Below program Also crash on linux but i am able to debug the stuff.
(please note i am having different version of gdb on linux)
/*START*/
#include<stdio.h>
#include<string.h>
void f1(char *a)
{
int i;
/* Write in to a without thinking the capacity of a --*/
strcpy(a,"raxitshethraxitshethraxitshethraxitsheth");
for(i=0;i<1000;i++)
{
strcat(a,"raxitshethraxitshethraxitshethraxitsheth");
}
}
int main()
{
char a[5];
f1(a);
printf("\n Output=%s",a);
return 0;
}
/*END*/
( I am compilng/linking using normally used -g or -g3, Unfortuantely i
got so many warnings but currenty I need to Ignore compilers warning--
(I know I should not), I am **NOT** compiling for 64-bit).
Fix the warnings first, then you might be able to see the wood from the
trees.
bash-3.00$ /usr/local/bin/gcc --version
2.95.3
Very, very old.
--
Ian Collins.
--Raxit
.
- Follow-Ups:
- Re: Not able to debug Core, SunOS 5.10, Gdb also crash.
- From: Ian Collins
- Re: Not able to debug Core, SunOS 5.10, Gdb also crash.
- From: raxitsheth2000
- Re: Not able to debug Core, SunOS 5.10, Gdb also crash.
- Prev by Date: Re: problem in linking object files (c++/HP-UX)
- Next by Date: Re: Not able to debug Core, SunOS 5.10, Gdb also crash.
- Previous by thread: Byte alignment at compile time
- Next by thread: Re: Not able to debug Core, SunOS 5.10, Gdb also crash.
- Index(es):
Relevant Pages
|