473,320 Members | 1,930 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,320 software developers and data experts.

regarding core dump

Hi,

I have c++ application which dumps core only static mode and not in
debug mode , I used gdb debugger to know which function is reason for
core dump , is there other ways to find it out.

Mohan
Feb 6 '06 #1
4 2465
news.fe.internet.bosch.com wrote:
I have c++ application which dumps core only static mode and not in
debug mode , I used gdb debugger to know which function is reason for
core dump , is there other ways to find it out.


If debugging doesn't help (which is possible), I use the tried-and-true
bisection method: introduce output statements clearly before (a) and after
(b) the place where it might be failing, then place yet another point in
the middle (c) and see which ones you actually get. If it's only (a),
move the (c) up, if it's both (a) and (c), move (c) down. Yes, I know,
seems like neither (b) nor (a) are actually necessary, but I say, put them
in anyway, perhaps when you feel like it you might want to tighten the
range by moving (a) down and/or (b) up.

Yes, having output in your program does change its behaviour and will, no
doubt, affect the result of the program execution to the point when the
failure may actually never show up. Well, you'll have to deal with that
then, I guess.

Victor
--
Please remove capital As from my address when replying by mail
Feb 6 '06 #2
In article <ds**********@ns2.fe.internet.bosch.com>,
"news.fe.internet.bosch.com" <mo**********@in.bosch.com> wrote:
Hi,

I have c++ application which dumps core only static mode and not in
debug mode , I used gdb debugger to know which function is reason for
core dump , is there other ways to find it out.


Chances are, you are overwriting memory somewhere in your code. Knowing
in which function the core dump occurs will in no way let you know what
code has the error. You need to go through your code (by hand) and find
the spot where you went past the bounds of an array, or assigned to an
invalid pointer.

Sorry for the bad news...

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 6 '06 #3
news.fe.internet.bosch.com wrote:
Hi,

I have c++ application which dumps core only static mode and not in
debug mode , I used gdb debugger to know which function is reason for
core dump , is there other ways to find it out.

A common cause for debug/release disparity has to do with
initialization of automatic variables. Many implementations will
default initialize to 0 (or equivalent) in debug but leave the vars
uninitialized in release mode. A good first step is to go through and
make sure all variables are initialized one way or another.

Otherwise, I'd proceed as Victor suggested.

Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Feb 6 '06 #4
news.fe.internet.bosch.com wrote:
Hi,

I have c++ application which dumps core only static mode and not in
debug mode , I used gdb debugger to know which function is reason for
core dump , is there other ways to find it out.

Mohan


After having the other suggestions that have been posted I got the
following idea:
print the addresses of all variables in the "faulty" function and
compare against the values when debugging: check for unreasonable
differences.

Regards, Stephan

Feb 6 '06 #5

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

Similar topics

1
by: Martin | last post by:
I use dbx and i got the following error: Reading GL_CliConnMgr core file header read successfully Reading ld.so.1 dbx: core file read error: address 0xff3e6000 not available dbx: core file...
0
by: invincible | last post by:
hi , I have a problem where in I get core dump if i build my appln in static mode , but I dont get any core dump if if my application is compiled in debug mode. I think , this problem is quite...
10
by: ken | last post by:
hello, i'm writing a c program on a linux system. i'm debugging a segmentation fault but i don't want it to dump a core file because the memory footprint of the program is over 300Mb and i don't...
1
by: invincible | last post by:
hi, assume my program is running , is there a way I can dump its core in solaris, in linux i think u can use gcore Mohan
10
by: John Liu | last post by:
We upgraded from 7.2 to 7.4, it looks like everything working, but when I issue a query such as select * from tab (tab has about 2-3 million records), it causes core dump. I tuned some the...
3
by: John Liu | last post by:
AIX pg version 7.4 Select * from document2 core dump. Did a few more experiments with select * from document2 limit... I limit to 500000 it works, 600000 it exits but says "calloc:...
10
by: wong_powah | last post by:
I want to find out where (which line) my C program core dump. How to do that? Is there a web site describing the procedure? One approach is to use stack trace of the mdb debugger, but I does not...
14
by: Sheldon | last post by:
Hi, I have a python script that uses a C extention. I keep getting a recurring problem that causes a core dump a few lines after the C extention return data back tp python. I tried using pbd and...
5
by: johnericaturnbull | last post by:
Hi - I am very new to python. I get this random core dump and am looking for a good way to catch the error. I know the function my core dump occurs. Is there any error catching/handling that I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.