maett wrote:
>
> I noticed that my g++ 3.2.3 generates different code with and without
> symbol info (switch "-g").
>
> If I compile with
>     g++ -Os
> I get this assembler code for MyClass::MyFunction1:
>
> pushl %ebp
> movl %esp, %ebp
> popl %ebp
> jmp _ZN7MyClass11MyFunction2ERK7Message

I think there is no std function frame (call-enter-leave-ret) here.

> If I compile with
>     g++ -Os -g
> I get
>
> pushl %ebp
> movl %esp, %ebp
> pushl 12(%ebp)
> pushl 8(%ebp)
> call _ZN7MyClass11MyFunction2ERK7Message
> leave
> ret
>
> Is there a way to get the same code with and without symbol information ?

But for debug purpose std function frame often must exist. See for example 
"info -fomit-frame-pointer".

-- 
Maksim A. Polyanin
http://grizlyk1.narod.ru/cpp_new



_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to