This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Add dll trampoline code handling for windows 64bit
- From: Roland Schwingel <roland at onevision dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 14 Mar 2012 14:35:51 +0100
- Subject: [PATCH] Add dll trampoline code handling for windows 64bit
Hi...
When single stepping a 64bit windows application gdb at present does not
step into
functions residing in a dll. This is due to the fact that handling of
dll trampoline code
for win64 is missing.
I added a new function to amd64-windows-tdep.c to handle this similar to
the existing function (i386_pe_skip_trampoline_code()). With some
differences:
- On 32bit windows dll trampoline code is expressed as jmp *(dest) while on
64bit windows this is expressed as jmp *<offset>(%rip). Took care of
this.
- The jump destination is on 64bit windows of course 8 byte long. I
could not
find a function that transforms this into a CORE_ADDR like
read_memory_unsigned_integer()
it is doing in the 32bit case. So I did the transformation on my
own. While this is
high performant it might not be the "official" gdb way. If someone
can give me a
hint on how to the transformation the "official" way I will adjust my
patch - if wished.
Now single stepping into dll code works.
ChangeLog:
2012-03-14 Roland Schwingel<roland.schwingel@onevision.com>
* amd64-windows-tdep.c: #include "frame.h"
(amd64_windows_skip_trampoline_code): New function.
(amd64_windows_init_abi): Add trampoline registration.
Roland
Attachment:
amd64-windows-tdep.c.patch
Description: Text document