help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g++ 3.2.3 generates different code with and without symbol info


From: Grizlyk
Subject: Re: g++ 3.2.3 generates different code with and without symbol info
Date: Fri, 23 Feb 2007 01:32:46 +0300

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]