From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23854 invoked by alias); 15 Aug 2011 20:38:57 -0000 Received: (qmail 23846 invoked by uid 22791); 15 Aug 2011 20:38:56 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Aug 2011 20:38:35 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7FKcYPl028287 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Aug 2011 16:38:34 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7FKcYtP013200; Mon, 15 Aug 2011 16:38:34 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p7FKcXbF030025; Mon, 15 Aug 2011 16:38:33 -0400 From: Tom Tromey To: Sanjoy Das Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 5/7] Add a proxy unwinder. References: <1312903509-25132-1-git-send-email-sanjoy@playingwithpointers.com> <1312903509-25132-6-git-send-email-sanjoy@playingwithpointers.com> Date: Mon, 15 Aug 2011 20:38:00 -0000 In-Reply-To: <1312903509-25132-6-git-send-email-sanjoy@playingwithpointers.com> (Sanjoy Das's message of "Tue, 9 Aug 2011 20:55:07 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-08/txt/msg00314.txt.bz2 >>>>> "Sanjoy" == Sanjoy Das writes: Sanjoy> Have the proxy unwinder pass down all calls to the functions the JIT Sanjoy> reader provides. Thank you. Sanjoy> +static void Sanjoy> +free_reg_value_impl (struct gdb_reg_value *reg_value) Sanjoy> +{ Sanjoy> + free (reg_value); xfree. Sanjoy> +static struct gdb_reg_value * Sanjoy> +jit_unwind_reg_get_impl (struct gdb_unwind_callbacks *cb, int regnum) Sanjoy> +{ Sanjoy> + struct jit_unwind_private *priv = cb->priv_data; Sanjoy> + int gdb_reg = gdbarch_dwarf2_reg_to_regnum (target_gdbarch, regnum); Sanjoy> + int size = register_size (target_gdbarch, gdb_reg); Sanjoy> + struct gdb_reg_value *value = malloc (sizeof (struct gdb_reg_value) + Sanjoy> + size - 1); xmalloc. Sanjoy> + While this is nominally a frame sniffer, in the case where the JIT Sanjoy> + reader actually recognizes the frame, it does a lot more work -- it Sanjoy> + unwinds the frame and saves the corresponding register values in Sanjoy> + the cache. jit_frame_prev_register simply returns the saved Sanjoy> + register values. */ I'm curious why you approached it this way. Sanjoy> +jit_frame_unwind_stop_reason (struct frame_info *this_frame, void **cache) Line too long. Tom