can not acess memory at address ox0

G

gogo

my C program crashes due to segfault .
And on using gdb it shows message
"can not acess memory at address ox0"
what could be the possible problem.
Program is vary complecated so i can not simple debug using my own
debug statments.
and PC's value is 0x00000 which is no way helpful for backtracking the
problem.
Sp please guide me .

Regard,
Gogo
 
I

Ico

gogo said:
my C program crashes due to segfault .
And on using gdb it shows message
"can not acess memory at address ox0"
what could be the possible problem.

I guess your program tries to access memory at address 0.
Program is vary complecated so i can not simple debug using my own
debug statments.

Given enough time and effort, this should always be possible.
and PC's value is 0x00000 which is no way helpful for backtracking the
problem.

There might be a simple way; run your program in a debugger, trigger the
problem and make a stack backtrace. If you are lucky, the faulty code
has not completely messed up the stack, and the debugger can give you an
indication where the problem occured.
 
?

=?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?=

gogo said:
my C program crashes due to segfault .
And on using gdb it shows message
"can not acess memory at address ox0"
what could be the possible problem.
The problem is a bug. Perhaps that sounds vague, but so is
your question and problem.

Likely you are dereferencing a NULL pointer, which could
be the result of any of some thousand different problems.
Program is vary complecated so i can not simple debug using my own
debug statments.
and PC's value is 0x00000 which is no way helpful for backtracking the
problem.

Improve your debugging skills. Atleast try to get a backtrace from
'gdb', try to inspect which variable that has an unexpected value.
A backtrace might show the line of the source code where things
failed - that's always a nice start.

For further help, post the problematic code. If it isn't standard
C, ask in a news group for your platform.
 
G

gogo

I've already tried backtrace(bt) and where options of gdb for my
problem .
but for every command gdb shows message "can not access memory at 0x0"
..
And I'm not sure that this problem is about NULL pointer dereferancing
,because i triedNULL pointer dereferancing in saparate sample
application .
but inthat can PC(program counters) value and bt of gdb both were
useful for tracing exact instruction in which NULL pointer
dereferancing was done .
So only basic knowlege of debuging (which i alredy have :) ) will not
do.I need some expert's Help
What is significance of all Other Register Vlaues printed along with PC
after program crash??

I'm using gdb ported for arm-linux
 
?

=?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?=

gogo said:
I've already tried backtrace(bt) and where options of gdb for my
problem .
but for every command gdb shows message "can not access memory at 0x0"
.
And I'm not sure that this problem is about NULL pointer dereferancing
,because i triedNULL pointer dereferancing in saparate sample
application .
but inthat can PC(program counters) value and bt of gdb both were
useful for tracing exact instruction in which NULL pointer
dereferancing was done .
So only basic knowlege of debuging (which i alredy have :) ) will not
do.I need some expert's Help
What is significance of all Other Register Vlaues printed along with PC
after program crash??

I'm using gdb ported for arm-linux

Did you compile with debugging support ?

It is ofcourse possible your program has a nasty enough bug it
makes debugging just not possible.(e.g. it overwrites vital parts of a
stack frame).

At this point, unless you show some standard C code, your problem is
off topic here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,177
Messages
2,570,953
Members
47,507
Latest member
codeguru31

Latest Threads

Top