From patchwork Fri Aug 1 13:59:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Brobecker X-Patchwork-Id: 2283 Received: (qmail 17992 invoked by alias); 1 Aug 2014 14:00:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 17827 invoked by uid 89); 1 Aug 2014 13:59:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 01 Aug 2014 13:59:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7C433116391 for ; Fri, 1 Aug 2014 09:59:56 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id P+j2-fhey5Bs for ; Fri, 1 Aug 2014 09:59:56 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 4D70B11637C for ; Fri, 1 Aug 2014 09:59:56 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 2AE16491C0; Fri, 1 Aug 2014 06:59:57 -0700 (PDT) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [PATCH 2/2] Add debug trace in amd64-windows-tdep.c::amd64_windows_frame_decode_insns Date: Fri, 1 Aug 2014 06:59:54 -0700 Message-Id: <1406901594-17642-3-git-send-email-brobecker@adacore.com> In-Reply-To: <1406901594-17642-1-git-send-email-brobecker@adacore.com> References: <1406901594-17642-1-git-send-email-brobecker@adacore.com> This is a trace which would have been useful when trying to understand why the debugger was not decoding the stream of unwind codes I was expecting. This patch adds a trace first informing us that we are following the unwind info to the next unwind record in that chain. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): Add debug trace. --- gdb/ChangeLog | 5 +++++ gdb/amd64-windows-tdep.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 939fd20..2d50d35 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,11 @@ 2014-08-01 Joel Brobecker * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): + Add debug trace. + +2014-08-01 Joel Brobecker + + * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): Remove "+ 8" offset in computation of CHAIN_VMA. 2014-07-31 Doug Evans diff --git a/gdb/amd64-windows-tdep.c b/gdb/amd64-windows-tdep.c index cb1bac7..f90bd5b 100644 --- a/gdb/amd64-windows-tdep.c +++ b/gdb/amd64-windows-tdep.c @@ -837,6 +837,15 @@ amd64_windows_frame_decode_insns (struct frame_info *this_frame, extract_unsigned_integer (d.rva_EndAddress, 4, byte_order); unwind_info = extract_unsigned_integer (d.rva_UnwindData, 4, byte_order); + + if (frame_debug) + fprintf_unfiltered + (gdb_stdlog, + "amd64_windows_frame_decodes_insn (next in chain):" + " unwind_data=%s, start_rva=%s, end_rva=%s\n", + paddress (gdbarch, unwind_info), + paddress (gdbarch, cache->start_rva), + paddress (gdbarch, cache->end_rva)); } /* Allow the user to break this loop. */