This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: FW: gnu source/assy listings
- To: "Same, Donald R." <donald_r_same at md dot northgrum dot com>,gcc-help at gcc dot gnu dot org
- Subject: Re: FW: gnu source/assy listings
- From: llewelly at edevnull dot com
- Date: 21 Sep 2000 07:41:43 -0600
- References: <8CA86C94DE8AD211B41300A0C9D722C50205594C@xcgmd006.md.essd.northgrum.com>
- Reply-To: gcc-help at gcc dot gnu dot org
"Same, Donald R." <donald_r_same@md.northgrum.com> writes:
> I have perused your website,
hm... It is not *my* website; I am just a random volunteer who
happened to answer your question.
The website I pointed you at is the gcc website.
By the way, this discussion should be kept on the gcc-help list, so
that others may learn from it; when you respond to someone who
atempts to answer a question from gcc-help. you should send your
replies to that list.
> > which I did not know existed, so that was very
> helpful. However, I still do not see a switch that allows the interspersing
> of source c code with the assy code generated for each c
> instruction.
I am perhaps slightly confused here. by 'assy code', do you mean assembly code?
> Sometimes of course, the c instruction culminates in multiple lines of assy
> code, etc. We want to see what assy code is generated ALONG WITH
> the c
I do not know of a way to make gcc generate mixed C source and
assembly.
However, gcc will give C functions, labels, and globals the same
assembler name they have in the C source, so if one knows asmmbler
it is not too hard to follow (though not as nice as mixed might
be.). Note that with -O2, gcc will sometimes do surprising ammounts
of code movement, etc.
btw, you should probably not use -g when generating assembler ;
it often makes the assembler more difficult to read.
> instructions in the same listing. I do not see this option in the website,
> but since there are a lot of options, maybe some combination in some crazy
> sequence of compiles could bring about the listing file that I am looking
> for.
>