Mail Archives: djgpp/2001/08/06/10:18:26
Sterten <sterten AT aol DOT com> wrote:
[...]
> However, for that "assembly and C-code together" problem
> I'm disappointed. With the -g switch I do get the C-code ,
> although not the included .h files ,
That's to be expected: .h files shouldn't contain any active code, so
you shouldn't be getting any assembly output from them. And unless
you use -gstabs instead of -g, you can't, anyway.
> but sometimes I have many C-lines (upto 500) followed by many
> assembly lines (upto thousands).
> It's still very difficult to figure out how a special C-line is
> translated into assembly.
Please note that there is no 1:1 correspondence between C source lines
and assembly mnemonics. Not all C source lines generate any effect in
the assembly output (commends, type definitions, ...), in the first
place. Neither does a single C statement have to create a single
contiguous block of assembly statements.
That's what having an optimizing C compiler is about. It may reorder
parts of statements, or it may inline complete functions called; it
expands macros and eliminates unnecessary code.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -