Jun Koi wrote:
> On Wed, Apr 28, 2010 at 5:12 PM, Jan Kiszka wrote:
>> Jun Koi wrote:
>>> Hi,
>>>
>>> In x86, GETPC() is implemented as below:
>>>
>>> # define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 1))
>>>
>>> As I understand, it gets the returned address on the stack, the
On Wed, Apr 28, 2010 at 5:12 PM, Jan Kiszka wrote:
> Jun Koi wrote:
>> Hi,
>>
>> In x86, GETPC() is implemented as below:
>>
>> # define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 1))
>>
>> As I understand, it gets the returned address on the stack, then
>> subtract 1 to get ba
Jun Koi wrote:
> Hi,
>
> In x86, GETPC() is implemented as below:
>
> # define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 1))
>
> As I understand, it gets the returned address on the stack, then
> subtract 1 to get back to the above address.
>
> Imagine we have code like thi