This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15559] Method call and calling convention


https://sourceware.org/bugzilla/show_bug.cgi?id=15559

--- Comment #3 from asmwarrior <asmwarrior at gmail dot com> ---
>From what Jon Y said [1]:

QUOTE START:

The previous call convention is __cdecl[1], arguments pushed to stack
right to left, caller unwinds the stack. This convention is used by
Linux SysV ABI and normal C code on Linux and Windows. __thiscall[2] is
a C++ variant of __stdcall[3] where stack is unwound by callee, however
the "this" C++ context is put on the ECX register rather than as a
normal first call argument.

GCC unfortunately does not mangle __cdecl vs __thiscall call convention
into the object symbol tables, this meant you can still link your old
code, but it would fall apart during runtime.

QUOTE END

My question is: how can GDB distinguish between normal functions and class
member functions? Is it possible to distinguish them from debug symbol tables?


[1] http://sourceforge.net/mailarchive/message.php?msg_id=30019808

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]