0

Hi All,

I'm running a C code on cygwin compiled with gcc, the code basically does file processing, it runs fine on my PC, but when run on a Solaris machine, it gives Bus error and core dumps. Is it a known issue? If not, is there any way i can debug the core file?

The file i'm trying to process is 45MB in size.
I'm newbie with using the debuggers. Any suggestions are welcome

Thanks
Santosh

6
Contributors
13
Replies
14
Views
7 Years
Discussion Span
Last Post by sanushks
Featured Replies
  • 1
    John A 1,896   7 Years Ago

    >Is it possible for the code to have bugs Yes. >y didn't it core dump on the cygwin too? Different platform, different system, different architecture. But if you *really* want to find out the reason, you'll have to post some code, because our guessing isn't going to get you very … Read More

0

Did you recompile all the code on your solaris machine?

Or did you simply copy the .exe file and hoped it would work. IT WON'T.

> Is it a known issue?
Yes, your code has bugs.

0

Hi,

I did recompile.

Is it possible for the code to have bugs, if yes, y didn't it core dump on the cygwin too?

1

>Is it possible for the code to have bugs
Yes.

>y didn't it core dump on the cygwin too?
Different platform, different system, different architecture.

But if you *really* want to find out the reason, you'll have to post some code, because our guessing isn't going to get you very far.

Votes + Comments
random guessing is the fun part of debugging
0

Hi,

Its a 800 line code, can i post it here? Or could i send it as a attachment?

0

Definitely better as an attachment, but 800 lines is probably a bit much for a forum.

Some of us would probably have a quick look for some of the obvious mistakes. But if it's involved, it's several hours work on just one problem.

Do you have a debugger on the solaris box?

Yes, you can use a debugger to examine (not interact with) a core file, but this is "last resort" territory. It's a post mortem on a corpse.

Compiling the code with debug, then running that in the debugger will tell you a lot more (the patient is intensive care, but still alive).
Setting breakpoints at suspect areas of code for example will allow you to see what's really going on.

0

the problem is the code is working fine until a certain point.. I mean it processes about 24,000 records before it fails.. So will it help setting breakpoints.. N i'm not familiar with debugging

0

the problem is the code is working fine until a certain point.. I mean it processes about 24,000 records before it fails..

Debugging is indeed the answer. But I also what to place a bet on what could be wrong. Are you using dynamic memory? Does the PC on which it runs have (a lot) more memory then your Solaris PC?

0

Yep i'm using malloc and free, Not sure how to find the memory in the Solaris box, its not a PC. Its a server running on Sun OS 5.9

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.