From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23590 invoked by alias); 10 Sep 2005 03:51:49 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23410 invoked by uid 22791); 10 Sep 2005 03:51:43 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 10 Sep 2005 03:51:43 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EDwOz-0006HT-K0; Fri, 09 Sep 2005 23:51:41 -0400 Date: Sat, 10 Sep 2005 03:51:00 -0000 From: Daniel Jacobowitz To: Kris Warkentin Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] Add QNX remote protocol headers. Message-ID: <20050910035141.GA24054@nevyn.them.org> Mail-Followup-To: Kris Warkentin , gdb-patches@sources.redhat.com References: <431DBF41.8050508@qnx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <431DBF41.8050508@qnx.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-09/txt/msg00063.txt.bz2 On Tue, Sep 06, 2005 at 12:09:37PM -0400, Kris Warkentin wrote: > Hi, > > I'm trying to break things up into smaller patches. The actual remote > support is the biggest patch. These headers are nice and bite sized and > most of our other targets are fairly discrete as well. > > The file dsmsgs.h describes the structures used by the remote protocol > (pdebug). This is identical to what the pdebug server uses on the > target side. > > The debug.h is a subset of our system header of the same name (and some > others) and describes the structures returned by various debug interface > system commands. Basically allows the same stuff as in our native > 'nto-procfs.c' to work in the absence of system headers. > > ChangeLog: > > 2005-09-06 Kris Warkentin > > * nto-share/debug.h: New file. > * nto-share/dsmsgs.h: New file. > > Look okay? No... First of all, what purpose do you intend for these interfaces to serve in GDB? Are they going to be used only by new code to implement the pdebug protocol, or shared between combined native/remote code? Assuming remote only, then this: > /* __DEBUG_H_INCLUDED is Neutrino's native debug.h header. We don't want > these duplicate definitions if we're compiling natively and have already > included it. */ > #ifndef __DEBUG_H_INCLUDED > #define __DEBUG_H_INCLUDED is pretty suspect - just give them different names from the system version, or avoid including the system header, preferably the latter. And basically everything else in the file is broken. You can't do anything even vaguely complicated involving cross-debugging using host system types. You're relying on the host's alignment and padding rules, and system types like clock_t. And whatever this does: > #ifdef __QNX__ > __BEGIN_DECLS > #include <_pack64.h> > #endif is similarly not OK. If it's intended to work cross, then it should work from everywhere, not just from x86 and QNX. I think I need a mile-high explanation of what you're trying to do, first. By the way, is pdebug publically documented? -- Daniel Jacobowitz CodeSourcery, LLC