This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Add QNX remote protocol headers.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Kris Warkentin <kewarken at qnx dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 9 Sep 2005 23:51:41 -0400
- Subject: Re: [patch] Add QNX remote protocol headers.
- References: <431DBF41.firstname.lastname@example.org>
On Tue, Sep 06, 2005 at 12:09:37PM -0400, Kris Warkentin wrote:
> 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.
> 2005-09-06 Kris Warkentin <email@example.com>
> * nto-share/debug.h: New file.
> * nto-share/dsmsgs.h: New file.
> Look okay?
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__
> #include <_pack64.h>
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?