Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@gnu.org>
To: kewarken@qnx.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Revised: [patch] general updates and improvements to QNX NTO support
Date: Thu, 09 Dec 2004 22:31:00 -0000	[thread overview]
Message-ID: <200412092205.iB9M5Vde000872@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <41B85B91.7090504@qnx.com> (message from Kris Warkentin on Thu, 09 Dec 2004 09:05:05 -0500)

   Date: Thu, 09 Dec 2004 09:05:05 -0500
   From: Kris Warkentin <kewarken@qnx.com>

   Mark Kettenis wrote:

   >   Date: Mon, 06 Dec 2004 10:30:46 -0500
   >   From: Kris Warkentin <kewarken@qnx.com>
   >
   >   Based on Mark's comments, I've refactored this patch to provide a 
   >   cleaner interface to nto_tdep.c.  I created an nto_set_target function 
   >   so that the targets can initialize their own nto_target_ops and set the 
   >   target properly rather than initializing current_nto_target.
   >
   >Thanks.  That looks good!  I still think you should avoid the
   >
   >   #define nto_xxx_yyy (current_nto_target.xxx_yyy)
   >
   >defines.  They're hiding the fact that you're using a global variable.
   >Consider a patch that uses current_nto_target.xxx_yyy directly
   >pre-approved.  I've got one additional nit, please see below.
   >  
   >
   Question.  I use the nto_xxx_yyy functions _everywhere_ in our code.  
   Would it be acceptable if I changed the define to be like target.h as in:

   #define nto_xxx_yyy(args) (*current_nto_target.xxx_yyy) (args)

   Then the only time I would do the full current_nto_target.xxx_yyy is in 
   cases like below where it needs to be obvious that I'm testing or 
   setting a global variable.  Its just that there are so many instances of 
   these macros in our target support that the syntactic sugar is very 
   attractive for code readability.

Bugger.  I let that patch fool me again.  Thought the defines were
new, but of course they're not.  Forget what I said about them and
check your patch in as is.  That is...

   >   +enum gdb_osabi
   >   +nto_elf_osabi_sniffer (bfd *abfd)
   >   +{
   >   +  if (nto_is_nto_target)
   >   +    {
   >   +      return nto_is_nto_target (abfd);
   >   +    }
   >   +  return GDB_OSABI_UNKNOWN;
   >   +}
   >   +
   >
   >Could you remove the redundant braces here?  With that change, this is
   >OK.
   >
   No problem.  Thanks.

with that change please.

Cheers,

Mark


      reply	other threads:[~2004-12-09 22:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19 20:47 Kris Warkentin
2004-11-26 20:37 ` Ping: " Kris Warkentin
2004-12-03 16:09   ` Kris Warkentin
2004-12-03 16:17     ` Mark Kettenis
2004-12-03 17:01       ` Kris Warkentin
2004-12-03 17:23         ` Kris Warkentin
2004-12-03 17:44         ` Mark Kettenis
2004-12-06 16:53           ` Revised: " Kris Warkentin
2004-12-09  0:52             ` Mark Kettenis
2004-12-09 15:45               ` Kris Warkentin
2004-12-09 22:31                 ` Mark Kettenis [this message]

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=200412092205.iB9M5Vde000872@elgar.sibelius.xs4all.nl \
    --to=kettenis@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kewarken@qnx.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