problem while debuging

M

mohi

hello everyone ,
i don know is this question should be asked in gbd forums or here
itself:

the problem is that after i compile my program with gcc a lot of ^M
type of symbols are added in the source file
now when i try to debug the program with gdb it doesn't go the normal
way .

what possibly could be wrong here.
thank you
mohan
 
I

Ian Collins

mohi said:
hello everyone ,
i don know is this question should be asked in gbd forums or here
itself:

the problem is that after i compile my program with gcc a lot of ^M
type of symbols are added in the source file
now when i try to debug the program with gdb it doesn't go the normal
way .
Compilers read source files, they don't change them. Sounds like you
have a tool problem, not a C one.
what possibly could be wrong here.

Something beyond the scope of this group.
 
S

santosh

mohi said:
hello everyone ,
i don know is this question should be asked in gbd forums or here
itself:

the problem is that after i compile my program with gcc a lot of ^M
type of symbols are added in the source file
now when i try to debug the program with gdb it doesn't go the normal
way .

what possibly could be wrong here.
thank you
mohan

I think you are saving your files with "Windows" style line-endings on a
Unix system. But I could be wrong. In any case, as Ian said, compilers
do not modify their source files. It seems like an editor configuration
problem to me.
 
A

Antoninus Twink

Here is perfectly appropriate, despite what some bitter misanthropists
will try to tell you.
I think you are saving your files with "Windows" style line-endings on a
Unix system.

Yes. Besides fixing his editor setup, the OP could also try running
something like dos2unix on his source files, or do a good old-fashioned
tr -d '\r'
 
K

Kenny McCormack

I think you are saving your files with "Windows" style line-endings on a
Unix system. But I could be wrong. In any case, as Ian said, compilers
do not modify their source files. It seems like an editor configuration
problem to me.

I would imagine that it is possible to create a conforming C compiler
that does modify its source files. Thus, in the argot of this group,
such things do exist.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top