From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org, Aleksandar Ristovski <ARistovski@qnx.com>
Subject: Re: [patchv3 1/8] Move utility functions to common/
Date: Fri, 28 Feb 2014 12:06:00 -0000 [thread overview]
Message-ID: <53107BBE.6040407@redhat.com> (raw)
In-Reply-To: <20140227213242.GB21121@host2.jankratochvil.net>
Looks fine to me, with a few nits.
On 02/27/2014 09:32 PM, Jan Kratochvil wrote:
> (strtoulst): Move decl from utils.h.
> (hex2bin, bin2hex): Move decls from remote.h.
This one looks stale.
> --- a/gdb/common/common-utils.h
> +++ b/gdb/common/common-utils.h
> @@ -25,6 +25,25 @@
> #include <stddef.h>
> #include <stdarg.h>
>
> +/* Static target-system-dependent parameters for GDB. */
> +
> +/* * Number of bits in a char or unsigned char for the target machine.
> + Just like CHAR_BIT in <limits.h> but describes the target machine. */
> +#if !defined (TARGET_CHAR_BIT)
> +#define TARGET_CHAR_BIT 8
> +#endif
> +
> +/* * If we picked up a copy of CHAR_BIT from a configuration file
> + (which may get it by including <limits.h>) then use it to set
Sounds like common-utils.h should include limits.h? defs.h does
include it.
> + the number of bits in a host char. If not, use the same size
> + as the target. */
> +
> +#if defined (CHAR_BIT)
> +#define HOST_CHAR_BIT CHAR_BIT
> +#else
> +#define HOST_CHAR_BIT TARGET_CHAR_BIT
> +#endif
I think host-defs.h might be a better home for this. (With the
target version placed in a new target-defs.h perhaps. I won't
insist though.)
--
Pedro Alves
next prev parent reply other threads:[~2014-02-28 12:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 21:32 Jan Kratochvil
2014-02-28 12:06 ` Pedro Alves [this message]
2014-02-28 20:11 ` Jan Kratochvil
2014-02-28 21:11 ` Pedro Alves
2014-02-28 21:34 ` Jan Kratochvil
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=53107BBE.6040407@redhat.com \
--to=palves@redhat.com \
--cc=ARistovski@qnx.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.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