From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10396 invoked by alias); 14 Feb 2012 18:09:21 -0000 Received: (qmail 10381 invoked by uid 22791); 14 Feb 2012 18:09:20 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_NV,T_RP_MATCHES_RCVD 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; Tue, 14 Feb 2012 18:09:06 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1EI8rfq012117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Feb 2012 13:08:54 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1EI8qVa022059; Tue, 14 Feb 2012 13:08:53 -0500 Message-ID: <4F3AA334.8000409@redhat.com> Date: Tue, 14 Feb 2012 18:09:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Tristan Gingold CC: "gdb-patches@sourceware.org ml" , Rupp Douglas Subject: Re: RFA: New port: ia64-hp-openvms - the stub References: <6AD2487F-8409-4F4E-93A6-9DB7FD195E71@adacore.com> <35B93121-2F70-4E7C-B415-E691138D6698@adacore.com> In-Reply-To: <35B93121-2F70-4E7C-B415-E691138D6698@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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-02/txt/msg00277.txt.bz2 On 02/10/2012 01:43 PM, Tristan Gingold wrote: > Hi, > > this is the debugger stub for ia64 VMS. > Because it is independent of gdb (not unlike gdbserver) and because it isn't a one file stub, I think it is worth creating a subdirectory. Sounds fine to me. > I think we should also move the existing stubs there. > > The interesting part is that on OpenVMS, the debugger is a shared library that is loaded with the application when debugging is needed (either from the start or during the run - like attach). Just think about catching SIGTRAP, SIGSEGV, SIGBUS,… from a LD_PRELOAD binary. > > The stub was written from scratch because it is highly OpenVMS dependent and in particular the standard C library shouldn't be used. > The stub is not complete: some registers are partially or not handled, I couldn't really tell, but you may want to consider looking into xml target descriptions. At least reporting a description with the openvms osabi would be good. and inferior procedure call is not yet implemented (will be the funny part). But it has already be extremely useful to debug some applications. It's fine with me to put it in and improve it as we go. I skimmed it, but all the dollar signs distract a bit too much. :-) OOC, > +#if 1 > + /* What a mess. Gdb and linux expects bsp to point after the current > + register frame. Adjust. */ What does this mean? Are we committing to a hack that will make our lives hard when we want to fix it? > + { > + unsigned __int64 bsp = intstk->intstk$q_bsp; > + unsigned int sof = intstk->intstk$q_ifs & 0x7f; > + unsigned int delta = ((bsp >> 3) & 0x3f) + sof; > + regs.bsp.v = bsp + ((sof + delta / 0x3f) << 3); > + } > +#else > + regs.bsp.v = intstk->intstk$q_bsp; > +#endif -- Pedro Alves