Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Schlie <schlie@comcast.net>
To: Daniel Jacobowitz <drow@false.org>
Cc: Orjan Friberg <orjan.friberg@axis.com>, <gdb-patches@sources.redhat.com>
Subject: Re: [gdbserver/patch] Z packet support
Date: Sun, 30 Jan 2005 19:55:00 -0000	[thread overview]
Message-ID: <BE22A5D3.8D4E%schlie@comcast.net> (raw)
In-Reply-To: <20050130173604.GA7745@nevyn.them.org>

> From: Daniel Jacobowitz <drow@false.org>
>> On Sun, Jan 30, 2005 at 10:57:17AM -0500, Paul Schlie wrote:
>>>   2. Please re-read the comment; it should not be void *.  It is also
>>>      required that it be harmless for CORE_ADDR to be too large; see
>>>      MIPS n32 vs n64.
>> [ Regarding: And while at it, move CORE_ADDR tweak server.h to wherever
>>   it likely belongs? (and/or redefine it to void* if more appropriate)? ]
>> 
>> - sorry, it simply seemed implied by your own comment on the subject:
>> 
>>   "CORE_ADDR is always a long long in gdbserver, so your sizeof (addr)
>>    probably doesn't work right for 32-bit targets.  I guess sizeof
>>    (void *) is always right for this, though... at least for the kinds
>>    of targets gdbserver supports now."
>> 
>>   combined with it's own FIXME comment:
>> 
>>   /* FIXME: This should probably be autoconf'd for.  It's an integer type
>>    at least the size of a (void *).  */
>>   typedef long long CORE_ADDR;
> 
> See the second sentence? :-)  It has to be an integer type, which void
> * is not.  CORE_ADDR has to be at least as large as a target address.

- fair enough, missed that; so Orjan's use of sizeof(addr), which is a
  CORE_ADDR, is basically correct; assuming the host platform's long long
  is long enough as you point out, which seems like a reasonably safe bet?

> When talking back to GDB, we should endeavour to use the actual size of
> a target address, because sometimes 32-bit GDBs will get annoyed when
> they receive 64-bit numbers.
> 
>>>   3. There are nowhere near enough exported functions to justify
>>>      proliferating headers.
>> 
>> - sorry, guess I always considered "proliferating headers" as required
>>   a superior alternative to the maintenance problems which proliferating
>>   redundant declarations otherwise creates.
> 
> I guess I don't understand you.  In what way are these declarations
> "redundant"?

(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)

> -- 
> Daniel Jacobowitz




  reply	other threads:[~2005-01-30 19:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-30 15:32 Paul Schlie
2005-01-30 15:38 ` Daniel Jacobowitz
2005-01-30 15:57   ` Paul Schlie
2005-01-30 17:36     ` Daniel Jacobowitz
2005-01-30 19:55       ` Paul Schlie [this message]
2005-01-30 20:38         ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2004-12-01 15:13 Orjan Friberg
2004-12-07  2:44 ` Daniel Jacobowitz
2004-12-16 18:46   ` Orjan Friberg
2005-01-12 13:35   ` Orjan Friberg
2005-01-30  4:40     ` Daniel Jacobowitz
2005-02-01 12:09       ` Orjan Friberg
2005-02-14 14:42         ` Orjan Friberg
2005-02-24 20:53         ` Daniel Jacobowitz
2005-05-12 12:34           ` Orjan Friberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BE22A5D3.8D4E%schlie@comcast.net \
    --to=schlie@comcast.net \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=orjan.friberg@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox