From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <binutils@sourceware.org>, <gdb-patches@sourceware.org>
Cc: "'Kai Tietz'" <ktietz70@googlemail.com>
Subject: PING [PATCH RFC] PR gdb/17445 fix
Date: Thu, 06 Nov 2014 09:13:00 -0000 [thread overview]
Message-ID: <001b01cff9a1$e8e4bfb0$baae3f10$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <005301cfdd4b$aefd3830$0cf7a890$@muller@ics-cnrs.unistra.fr>
Nobody reacted yet to my first email.
This email is about a fix to:
https://sourceware.org/bugzilla/show_bug.cgi?id=17445
The bug report is about a problem that arises if you
use xmm15 a register variable in windows 64-bit code.
The current GDB code overlaps xmm15 and pc saved addresses,
which leads a wrong backtrace.
The problem relates to an older thread
https://sourceware.org/ml/binutils/2011-01/msg00323.html
and
https://sourceware.org/ml/binutils/2013-12/msg00232.html
which mainly involved Kai.
Kai, did you see my previous email?
Could you comment on my analysis of the problem.
Pierre Muller
> -----Message d'origine-----
> De : binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] De la part de Pierre Muller
> Envoyé : mercredi 1 octobre 2014 09:46
> À : binutils@sourceware.org; gdb-patches@sourceware.org
> Objet : [RFC] PR gdb/17445 fix
>
> Bug report gdb/17445
> shows that use of explicit xmm15 register in windows x86_64
> code leads to wrong unwinding of stacktrace by GDB.
> This problem comes from the fact that
> the return address column is set to 32 for x86_64 pe objects,
> while it is 16 for other targets.
> Dwarf x86_64 register 16 is RIP,
> while register 32 is XMM15.
> The reason for this was apparently that the value of
> the return address column is also interpreted as the highest
> index of the register that needs to be saved according to the ABI
> which is indeed different for Microsoft.
> Nevertheless, I found nothing inside DWARF4 documentation
> that makes any relation between the resisters that should be saved
> and the return address column.
> I came to the conclusion that this is a mis-interpretation
> of the dwarf standard that is specific to GNU bfd-gas-gdb.
> The patch proposed below tries to fix the current PR
> by removing the above assumptions and restoring RIP
> as return address register for pe(i)-x86-64 targets.
>
> Comments most welcome,
>
> Pierre Muller
> Pascal language maintainer for GDB.
>
> PS: One problem is that I was not able to correctly run
> the testsuite before and after my patch, as
> there are still cygwin/mingw specific issues with testsuite runs.
>
>
> ChangeLog (needs to be split into binutils/gas/gdb directories)
>
> 2014-10-01 Pierre Muller <muller@sourceware.org>
>
> PR gdb/17445
> * binutils/dwarf.c (display_debug_frames): Handle return
> address
> column
> specifically, do not limit num_regs to the value of return
> address
> column.
> Modified handling of DW_CFA_restore{_extended} to check that
> a valid storage is present at restore point.
>
> * gas/config/tc-i386.c (x86_dwarf2_return_column): Remove
> special
> value for x86_64 pe coff return address column.
> This restores RIP register for return address column.
>
> * gdb/dwarf2-frame.c (dwarf2_frame_cache): Avoid double
> handling of
> return address column.
next prev parent reply other threads:[~2014-11-06 9:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 7:45 [RFC] " Pierre Muller
2014-11-06 9:13 ` Pierre Muller [this message]
2014-11-06 17:55 ` Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001b01cff9a1$e8e4bfb0$baae3f10$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=ktietz70@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).