* how to debug
@ 2003-07-29 17:49 mla
2003-07-30 15:03 ` LLeweLLyn Reese
0 siblings, 1 reply; 3+ messages in thread
From: mla @ 2003-07-29 17:49 UTC (permalink / raw)
To: gcc-help
Hello all! Do you guys know how I could debug a
successful compilation? I have a program that I
compile in different platforms. The program works and
there are no bugs on it. And gcc/g++ finishes
compiling the program without errors. but when I run
the program it generates some error. is there a way to
find out which flags should I add to the compiling
process for the program to work? thanks!
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to debug
2003-07-29 17:49 how to debug mla
@ 2003-07-30 15:03 ` LLeweLLyn Reese
0 siblings, 0 replies; 3+ messages in thread
From: LLeweLLyn Reese @ 2003-07-30 15:03 UTC (permalink / raw)
To: mla; +Cc: gcc-help
mla <wyl_lyf@yahoo.com> writes:
> Hello all! Do you guys know how I could debug a
> successful compilation? I have a program that I
> compile in different platforms. The program works and
> there are no bugs on it. And gcc/g++ finishes
> compiling the program without errors. but when I run
> the program it generates some error. is there a way to
> find out which flags should I add to the compiling
> process for the program to work? thanks!
You need to use -g to make gcc produce debugging information. Also,
you should turn off optimizations, do not supply any -O flags, as
they make debugging quite confusing, especially for one not used
to the ways that optimizers transform code.
If you want help with a particular error, please:
(a) write a short but complete example program which reproduces
the error, and paste it directly into your mailer.
(b) paste the error directly into your mailer.
(c) explain what you did, including all commandline options and
input.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to debug
@ 2003-07-30 9:05 Saravanan T S
0 siblings, 0 replies; 3+ messages in thread
From: Saravanan T S @ 2003-07-30 9:05 UTC (permalink / raw)
To: mla, gcc-help
Use -g while compilation with gcc and use gdb. Assuming u r working in linux.
./tss
--- mla <wyl_lyf@yahoo.com> wrote:
>Hello all! Do you guys know how I could debug a
>successful compilation? I have a program that I
>compile in different platforms. The program works and
>there are no bugs on it. And gcc/g++ finishes
>compiling the program without errors. but when I run
>the program it generates some error. is there a way to
>find out which flags should I add to the compiling
>process for the program to work? thanks!
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>http://sitebuilder.yahoo.com
_____________________________________________________________
Powered by a short email address ... http://www.k.st
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-30 15:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-29 17:49 how to debug mla
2003-07-30 15:03 ` LLeweLLyn Reese
2003-07-30 9:05 Saravanan T S
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).