From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7971 invoked by alias); 29 Dec 2010 10:42:25 -0000 Received: (qmail 7960 invoked by uid 22791); 29 Dec 2010 10:42:23 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Dec 2010 10:42:19 +0000 Received: (qmail 10771 invoked from network); 29 Dec 2010 10:42:17 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Dec 2010 10:42:17 -0000 From: Pedro Alves To: Joel Brobecker Subject: Re: [PATCH 7/8] ia64-hpux: unwinding bsp value from system call Date: Wed, 29 Dec 2010 12:05:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.33-29-realtime; KDE/4.4.5; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <1293511386-7384-1-git-send-email-brobecker@adacore.com> <201012281546.01099.pedro@codesourcery.com> <20101229032848.GE2396@adacore.com> In-Reply-To: <20101229032848.GE2396@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012291042.14627.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2010-12/txt/msg00543.txt.bz2 On Wednesday 29 December 2010 03:28:48, Joel Brobecker wrote: > > What is the underlying object you're getting those values from? > > I understood it to be whatever object TT_LWP_RUREGS accesses? > > You seem to call it save_state_t? Why not TARGET_OBJECT_HPUX_RUREGS > > or TARGET_OBJECT_HPUX_SAVE_STATE, or something along those lines? > > Then, the offset, and length passed to target_xfer would the > > the offset and length you're currently passing to > > ia64_hpux_read_register_from_save_state_t. This would allow > > (if useful) exporting this object similarly to the $_siginfo and > > $_tlb objects. > > I cannot determine the offset from the tdep code. The offset is > is a obtained by including one of the system hearders. Before you dismiss this completely on that ground, looking at hppa-hpux-tdep.c, I see: /* Bit in the `ss_flag' member of `struct save_state' that indicates that the 64-bit register values are live. From . */ #define HPPA_HPUX_SS_WIDEREGS 0x40 /* Offsets of various parts of `struct save_state'. From . */ #define HPPA_HPUX_SS_FLAGS_OFFSET 0 #define HPPA_HPUX_SS_NARROW_OFFSET 4 #define HPPA_HPUX_SS_FPBLOCK_OFFSET 256 #define HPPA_HPUX_SS_WIDE_OFFSET 640 /* The size of `struct save_state. */ #define HPPA_HPUX_SAVE_STATE_SIZE 1152 /* The size of `struct pa89_save_state', which corresponds to PA-RISC 1.1, the lowest common denominator that we support. */ #define HPPA_HPUX_PA89_SAVE_STATE_SIZE 512 ... * Bit in the `ss_flag' member of `struct save_state' that indicates the state was saved from a system call. From . */ #define HPPA_HPUX_SS_INSYSCALL 0x02 And e.g., see hppa_hpux_supply_save_state. When you implement core support for ia64-hpux, if done right (in tdep code, host-independent, supporting cross core debugging), you'll need to hardcode these offsets anyway. It looks like HPUX dumps each LWP's save_save in the cores. These offset are usually practically part of the ABI. Just adding this as a data point. -- Pedro Alves