From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28585 invoked by alias); 3 Feb 2009 23:50:40 -0000 Received: (qmail 28577 invoked by uid 22791); 3 Feb 2009 23:50:40 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Feb 2009 23:50:35 +0000 Received: (qmail 10780 invoked from network); 3 Feb 2009 23:50:31 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Feb 2009 23:50:31 -0000 From: Pedro Alves To: Doug Evans Subject: Re: [0/2] Inspect extra signal information Date: Tue, 03 Feb 2009 23:50:00 -0000 User-Agent: KMail/1.9.10 Cc: Daniel Jacobowitz , Ulrich Weigand , gdb-patches@sourceware.org References: <200902031501.49657.pedro@codesourcery.com> <200902031951.44699.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902032350.31711.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: 2009-02/txt/msg00080.txt.bz2 On Tuesday 03 February 2009 23:18:40, Doug Evans wrote: > One can either read the struct info buffer returned by ptrace directly > (as in the above "mumble = siginfo.si_signo;") Right, this is something similar to what the kernel does in its conversion routines for 32-bit userspace support. > or one can use a > constructed gdbarch siginfo type that maps directly to a struct > siginfo buffer returned by ptrace and use that to access it. Then one > could write a routine that given either of those (pick one), and a > pointer to the desired siginfo type, and returns a new value in the > desired type. When connected to a 64-bit gdbserver that is debugging a 32-bit inferior, how would gdb know that the binary blob that is coming out of TARGET_OBJECT_SIGNAL_INFO has the 64-bit layout, and that it needs to be converted? All gdbarchs that we have accessible tell us about the inferior arch, which is 32-bit. gdb has no idea that the gdbserver is running a 64-bit ptrace. > > With this gdbserver can continue to just pass the raw buffer back to > gdb. I don't see how given that missing link. > Otherwise I guess you'd have to switch to passing back a > semi-formatted buffer of values from gdbserver that gdb can then > parse. > > > Does that make sense? -- Pedro Alves