LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-06-2005, 02:28 PM   #1
morph_ind
Member
 
Registered: Feb 2005
Distribution: fedora 2/suse
Posts: 38

Rep: Reputation: 15
GCC GDB error codes


Hi
i m doin some programing in C and application involves extensive use of pointers
when i m running my program in gdb ,after printing the output the program prints a line which reads something as "program exited with code 050" . The number keeps on changing although output is correct .Can somebody please help me on these codes ,what do they signify or give some material on it
thanx
 
Old 07-06-2005, 02:56 PM   #2
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
Have a look at all the return clauses in the 'main' function and find out, which values are returned under which conditions.
 
Old 07-06-2005, 03:20 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
In other words, we're guessing that maybe you don't even *have* a "return" statement from your "main()", in which case the program is exiting with a random value.
 
Old 07-07-2005, 12:57 AM   #4
morph_ind
Member
 
Registered: Feb 2005
Distribution: fedora 2/suse
Posts: 38

Original Poster
Rep: Reputation: 15
yes u r right, no return 0; statement at the end of main ,really stupid of me
the problem is solved now thanx for help paulsm4,addy86
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CD Writer error codes akshunj Linux - Hardware 0 10-16-2005 08:23 PM
Are the hex codes for colors in a jpg the same codes as used in html? abefroman Linux - Security 3 07-31-2005 03:21 PM
gcc gdb errno & rpm difficulties jg167 Fedora 0 10-26-2004 04:46 AM
How to programmatically break into gdb from gcc C++ source cj12345 Programming 7 09-16-2004 05:15 AM
GCC, GDB GUIs Geeky_Kid Programming 4 12-28-2003 03:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration