473,408 Members | 1,874 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

can not acess memory at address ox0

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

Apr 17 '06 #1
4 2002
gogo wrote:
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.

Apr 17 '06 #2
Ico
gogo <yo*************@gmail.com> wrote:
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.

--
:wq
^X^Cy^K^X^C^C^C^C
Apr 17 '06 #3
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

Apr 17 '06 #4
gogo wrote:
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.

Apr 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: lupher cypher | last post by:
Hi, I'm trying to access memory directly at 0xb800 (text screen). I tried this: char far* screen = (char far*)0xb8000000; but apparently c++ compiler doesn't know "far" (says "syntax error...
30
by: jimjim | last post by:
Hello, This is a simple question for you all, I guess . int main(){ double *g= new double; *g = 9; delete g; cout<< sizeof(g)<<" "<<sizeof(double)<<" "<<sizeof(*g)<<" "<<*g<<" "<<endl; *g =...
62
by: ivan.leben | last post by:
How can I really delete a preloaded image from memory/disk cache? Let's say I preload an image by creating an Image object and setting its src attribute to desired URL: var img = new Image();...
0
by: Hypnotik | last post by:
My program is to simulate cache memory. I read in the info from 2 external files, 1) access 2) data in memory. When I read the information in I display the info...and it is all correct. However...
5
by: erfan | last post by:
vc++6.0,winxp. I use this code to see the memory address and the real value`s address below: #include<stdio.h> int main() { int a=22; int *p; int i; p=&a;
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS...
2
by: =?Utf-8?B?bWFycmNoaWU=?= | last post by:
Hi ther can anyone help me, I was able to acess my employers website, up until a few days ago, I have all the help from theit it support they can give me, they say its my provider, but I have been...
1
by: lokeshreddy16 | last post by:
'this is my code plz guys help how to save data from vb 2005 and other this that i am able to view the data from acess but i am not able save to acess i dont whether my code for save is correct of...
1
by: jack turner | last post by:
I'm currently creating a database for a travel agency firm in Acess 2003. I'd like to know how I can create a combo box where I select the "holiday Number" and the "holiday destination" and "holiday...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.