From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13007 invoked by alias); 29 May 2014 01:07:23 -0000 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 Received: (qmail 12995 invoked by uid 89); 29 May 2014 01:07:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oa0-f44.google.com Received: from mail-oa0-f44.google.com (HELO mail-oa0-f44.google.com) (209.85.219.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 29 May 2014 01:07:20 +0000 Received: by mail-oa0-f44.google.com with SMTP id o6so12040452oag.3 for ; Wed, 28 May 2014 18:07:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0HY6pHC3PjE9g8o1JeepQSEmYqhjFhRIwGaHnMYn7dQ=; b=PXZnOnN4QsrsoRoHkzEeoC2BURVvoPva67pXDtGVp1+mkVoSnMYj2GpY7qC30NavFH jgWH8Qm74kECBpKTGm7Pje8VJVslx6iXOxP85UnRbNFG6KYrozah1lRiGo9agumivfsW vxtqZ5UzJyr/Mbfryb0R2OR3sOAFIpB4uc6GV487lk21XjOklb/0AAyB4+oK94K9+4/r zLbKrJIkVoI7kxV3SbR9wTexMXvsTJqmQ7IrKtssq/ly0VH9+U6wuJA5t+ElzJ/GFD7b TvoCDJu84lio5jEhhHonI6VdpYF1/pwOkgQSFTLOyvXja6l71v6jRcR1eko4K7S3TYuQ s7MA== X-Gm-Message-State: ALoCoQnk2QrdTNAijsJ5bctPWtGuTO1RzaqHDglT67O7CR8DWPCXgUXlhaxISs7biHRU9/lHUtJF MIME-Version: 1.0 X-Received: by 10.182.114.194 with SMTP id ji2mr465391obb.25.1401325638799; Wed, 28 May 2014 18:07:18 -0700 (PDT) Received: by 10.182.144.133 with HTTP; Wed, 28 May 2014 18:07:18 -0700 (PDT) In-Reply-To: <535FC3AC.6030200@redhat.com> References: <20131226183618.D264CA18A0@sasha2.mtv.corp.google.com> <5359101B.1080603@redhat.com> <535FC3AC.6030200@redhat.com> Date: Thu, 29 May 2014 01:07:00 -0000 Message-ID: Subject: Re: [RFC][PATCH] Allow JIT unwinder provide symbol information From: Alexander Smundak To: Pedro Alves Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-05/txt/msg00716.txt.bz2 Ping. On Tue, Apr 29, 2014 at 8:22 AM, Pedro Alves wrote: > On 04/26/2014 12:39 AM, Alexander Smundak wrote: >> On Thu, Apr 24, 2014 at 6:22 AM, Pedro Alves wrote: >>> It seems to me that what you want to do here is what Python >>> frame filters were invented for. IOW, I think you should >>> be able to write a frame filter that interacts with the Java >>> JIT to expose the same info to the user your API extension >>> is proposing. >> The patch allows JIT readers to provide the symbol information to GDB. >> I am not sure how this can be achieved with Python frame filters. IMHO >> they have different purpose. > > But it doesn't actually provide symbol information. Not in the sense > that it hooks with GDB's symbol lookup mechanisms. > > E.g., the patch does this: > > @@ -1201,7 +1229,16 @@ print_frame (struct frame_info *frame, int print_level, > args_list_chain = make_cleanup_ui_out_list_begin_end (uiout, "args"); > TRY_CATCH (e, RETURN_MASK_ERROR) > { > - print_frame_args (func, frame, numargs, gdb_stdout); > + const struct frame_symbol_info *frame_symbol; > + frame_symbol = get_frame_symbol_info (frame); > + > + if (frame_symbol != NULL) > + { > + if (frame_symbol->arguments != NULL) > + ui_out_text (uiout, frame_symbol->arguments); > + } > + else > + print_frame_args (func, frame, numargs, gdb_stdout); > > This is just wrong. It's printing the frame arguments as > a single, and simple string. This simply doesn't work correctly > with MI frontends. Or what happens if the user selects > one of those JIT frames and tries to print one of the arguments? > > I really think the way this patch is hooking a bespoke > function/line/args mechanism into the frame machinery is > quite hacky as is, sorry. :-/ > > -- > Pedro Alves >