From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13990 invoked by alias); 15 May 2012 21:30:53 -0000 Received: (qmail 13977 invoked by uid 22791); 15 May 2012 21:30:52 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 May 2012 21:30:39 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 9D22F1C686C; Tue, 15 May 2012 17:30:38 -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 ps2LDGzJ40fx; Tue, 15 May 2012 17:30:38 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 665351C67F9; Tue, 15 May 2012 17:30:38 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 3E72C145616; Tue, 15 May 2012 14:30:28 -0700 (PDT) Date: Tue, 15 May 2012 21:30:00 -0000 From: Joel Brobecker To: Thomas Schwinge Cc: Yao Qi , gdb-patches@sourceware.org, cltang@codesourcery.com Subject: Re: [PATCH 1/4] New gdb arch hook: return_with_first_hidden_param_p Message-ID: <20120515213028.GU10253@adacore.com> References: <1334755073-26528-1-git-send-email-yao@codesourcery.com> <20120503011435.GA3294@adacore.com> <4FA22D7B.1040707@codesourcery.com> <20120504175830.GQ15555@adacore.com> <4FA743EC.1080903@codesourcery.com> <20120507201345.GX15555@adacore.com> <4FAA2D25.4060700@codesourcery.com> <20120510212054.GA5886@adacore.com> <87havhsbib.fsf@schwinge.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87havhsbib.fsf@schwinge.name> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2012-05/txt/msg00589.txt.bz2 > Just a quick thought without having a lot of context on this issue -- > what about the case where there isn't even any debug information > available for the function to be called? Does this rule out the DWARF > route, or isn't that something to be prepared for? I am not actually entirely sure! This never really entered my mind. But a quick look at the sources seems to suggest that call the function with the arguments as provided... Note that the Ada expression parser does some function resolution based on parameter types, and could possibly narrow the matches down to nothing. This part only deals with functions for which we have debugging information, obviously, but does not preclude calling a function without debug info. And looking at eval.c, I think that we have the same sort of thing happening for C++ as well. Although, I suspect it's not so much about validation, but rather figuring out the right way of calling methods. Whether the debugger decides to check the debug info or not seems to be left to the -tdep code; in the "push_dummy_call" gdbarch routine, for instance. But even that doesn't validate the parameters, I wouldn't think. A quick look at the amd64 version, for instance, shows that the "function" parameter is not used. -- Joel