473,795 Members | 3,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2485
news.fe.interne t.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**********@n s2.fe.internet. bosch.com>,
"news.fe.intern et.bosch.com" <mo**********@i n.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.interne t.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.interne t.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
3511
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 read error: address 0xff3e70a0 not available dbx: warning: could not initialize librtld_db.so.1 -- trying libDP_rtld_db.so Make sure this is the same version of Solaris where the core dump
0
1073
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 resonable because , I have seen in debug mode local varible unintialised would be initilised to 0 in case of debug mode , but this is not seen in static mode. My questions
10
4025
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 need it to generate a 300Mb file every time I add a new printf statement to debug the code. can i do something to prevent it from dumping the core file even when it seg faults? (is this a unix/linux thing, or a c thing?) thanks!
1
1693
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
584
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 parameters, it still produce the core. Thanks for any hints.
3
2459
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: There is not
10
7447
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 understand its output completely. e.g. How to interpret the stack trace to find out which line inside the coredump_func function of a test program caused the
14
3361
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 gdb but I have not succeeded in understanding what went wrong and where. I post the python script here is the error message and gdb output after reading the core file: ...... printout from with C extention.... Completed freeing 2D arrays.
5
6095
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 could use in python?
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7541
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.