diff options
author | Hannes Domani <ssbssa@yahoo.de> | 2020-04-27 15:58:09 +0200 |
---|---|---|
committer | Hannes Domani <ssbssa@yahoo.de> | 2020-04-30 14:36:55 +0200 |
commit | 627c7fb8ea16388f349b6b26e20bf017d71e51fe (patch) | |
tree | 6c3768b72f7861c80244e1cc16c1bebf88c76e7c /gdb/i386-tdep.h | |
parent | c578f16ef18fde35d5887909d5faaf0bd0118e9d (diff) | |
download | gdb-627c7fb8ea16388f349b6b26e20bf017d71e51fe.zip gdb-627c7fb8ea16388f349b6b26e20bf017d71e51fe.tar.gz gdb-627c7fb8ea16388f349b6b26e20bf017d71e51fe.tar.bz2 |
Use thiscall calling convention for class members
Non-static member functions for Windows 32bit programs need the thiscall
calling convention, so the 'this' pointer needs to be passed in ECX.
gdb/ChangeLog:
2020-04-30 Hannes Domani <ssbssa@yahoo.de>
PR gdb/15559
* i386-tdep.c (i386_push_dummy_call): Call
i386_thiscall_push_dummy_call.
(i386_thiscall_push_dummy_call): New function.
* i386-tdep.h (i386_thiscall_push_dummy_call): Declare.
* i386-windows-tdep.c (i386_windows_push_dummy_call): New function.
(i386_windows_init_abi): Call set_gdbarch_push_dummy_call.
Diffstat (limited to 'gdb/i386-tdep.h')
-rw-r--r-- | gdb/i386-tdep.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h index fa29e31..79b3b1f 100644 --- a/gdb/i386-tdep.h +++ b/gdb/i386-tdep.h @@ -399,6 +399,19 @@ extern CORE_ADDR i386_pe_skip_trampoline_code (struct frame_info *frame, extern CORE_ADDR i386_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc); +/* The "push_dummy_call" gdbarch method, optionally with the thiscall + calling convention. */ +extern CORE_ADDR i386_thiscall_push_dummy_call (struct gdbarch *gdbarch, + struct value *function, + struct regcache *regcache, + CORE_ADDR bp_addr, + int nargs, struct value **args, + CORE_ADDR sp, + function_call_return_method + return_method, + CORE_ADDR struct_addr, + bool thiscall); + /* Return whether the THIS_FRAME corresponds to a sigtramp routine. */ extern int i386_sigtramp_p (struct frame_info *this_frame); |