From patchwork Tue Jul 1 15:17:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 1838 Received: (qmail 18623 invoked by alias); 1 Jul 2014 15:17:43 -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 18570 invoked by uid 89); 1 Jul 2014 15:17:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 01 Jul 2014 15:17:37 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 9E2AA27ECC58 for ; Tue, 1 Jul 2014 17:17:34 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jzB_DumcnB8S for ; Tue, 1 Jul 2014 17:17:34 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 86F0C27E0032 for ; Tue, 1 Jul 2014 17:17:34 +0200 (CEST) From: Tristan Gingold Subject: [RFC]: append dwarf2 unwinder on sparc Message-Id: <7E528836-0667-4A7E-B902-5F17D88F9221@adacore.com> Date: Tue, 1 Jul 2014 17:17:34 +0200 To: " ml" Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) X-IsSubscribed: yes Hello, as gcc 4.9 has switched to dwarf-4 by default, it now emits DW_OP_call_frame_cfa. But gdb is able to handle it only if the frame was unwinded by dwarf2 (See dwarf2-frame.c:dwarf2_frame_cfa) Is there any reason not to append the dwarf2 unwinder on sparc ? Tristan. * sparc-tdep.c (sparc32_gdbarch_init): Call dwarf2_append_unwinders. diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index e7b3090..5b8ad38 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1739,6 +1739,11 @@ sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); + /* Hook in the DWARF CFI frame unwinder. This unwinder is appended + to the list before the prologue-based unwinders, so that DWARF + CFI info will be used if it is available. */ + dwarf2_append_unwinders (gdbarch); + frame_unwind_append_unwinder (gdbarch, &sparc32_frame_unwind); /* If we have register sets, enable the generic core file support. */