This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gdbserver/patch] Z packet support


On Sun, Jan 30, 2005 at 02:55:15PM -0500, Paul Schlie wrote:
> (with respect to "redundant", you're likely correct in questioning my use
>  of that word, as I had mistakenly assumed that many of the declarations
>  in server.h, also logically appeared in their corresponding source file
>  headers; as opposed to being disassociated with them.)
> 
>  where for for example in server.h:
> 
>    /* Functions from remote-utils.c */
> 
>    int putpkt (char *buf);
>    ...
> 
> where putpkt implementations matching that prototype are defined in both
> remote.c and remote-utils.c, but prototyped in remote.h, and server.h;
> where it would have seemed simpler and more consistent to declare public
> prototypes in the corresponding header files associated with a function's
> implementation, which may then be included by source files as required,
> thereby establishing a clear dependency, which would seem to help make
> file dependency generation, etc. not to mention general clarity affecting
> maintainability of the of the sources. (as just an opinion)

You seem to be somewhat confused about one thing, which explains your
comment better.  GDB and gdbserver are completely independent programs. 
There are a few bits of shared code, e.g. the signals/ directory, but
they are compiled separately for each.

"remote.h" and "remote.c" are part of GDB.  "server.h" and
"remote-utils.c" are is part of gdbserver.  Therefore, there is no
redundancy; the overlap in function names is basically coincidence.
server.h provides prototypes for most of the target-independent files
in gdbserver.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]