From: Doug Evans <dje@google.com>
To: Gary Benson <gbenson@redhat.com>
Cc: gdb-patches@sourceware.org, Pedro Alves <palves@redhat.com>,
Tom Tromey <tromey@redhat.com>
Subject: Re: [PATCH 02/11 v5] Introduce common-types.h
Date: Wed, 06 Aug 2014 16:34:00 -0000 [thread overview]
Message-ID: <21474.22819.191021.27602@ruffy.mtv.corp.google.com> (raw)
In-Reply-To: <1406888377-25795-3-git-send-email-gbenson@redhat.com>
Gary Benson writes:
> This introduces common-types.h. This file defines various standard
> types used by gdb and gdbserver.
Side discussion: It's a bit odd to see common-types.h and then see
errors.h spelled as errors.h and not common-errors.h.
[Or vice versa.]
Is consistency in the file names a goal?
I realize common-utils.h needs to be something other than utils.h
because gdb and gdbserver each still have their own.
And similarly for common-defs.h - gdb still has defs.h.
But nothing else in common/ is spelled common-foo,
and I wonder if less randomness would be useful.
I'd be happy with #include "common/errors.h", and so on.
That way when I see it used I know where to look without having to
rely on memory or ls.
> Currently these types are conditionally defined based on GDBSERVER.
> The long term goal is to remove all such tests; however, this is
> difficult as currently gdb uses definitions from BFD. In the meantime
> this is still a step in the right direction.
>
> gdb/
> 2014-08-01 Tom Tromey <tromey@redhat.com>
> Gary Benson <gbenson@redhat.com>
>
> * common/common-types.h: New file.
> * Makefile.in (HFILES_NO_SRCDIR): Add common/common-types.h.
> * common/common-defs.h: Include common-types.h.
> * defs.h (gdb_byte, CORE_ADDR, CORE_ADDR_MAX, LONGEST)
> (ULONGEST): Remove.
>
> gdb/gdbserver/
> 2014-08-01 Tom Tromey <tromey@redhat.com>
> Gary Benson <gbenson@redhat.com>
>
> * server.h: Add static assertion.
> (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
>[...]
> diff --git a/gdb/common/common-types.h b/gdb/common/common-types.h
> new file mode 100644
> index 0000000..9fa1c24
> --- /dev/null
> +++ b/gdb/common/common-types.h
> @@ -0,0 +1,61 @@
> +/* Declarations for common types.
> +
> + Copyright (C) 1986-2014 Free Software Foundation, Inc.
> +
> + This file is part of GDB.
> +
> + This program is free software; you can redistribute it and/or modify
> + it under the terms of the GNU General Public License as published by
> + the Free Software Foundation; either version 3 of the License, or
> + (at your option) any later version.
> +
> + This program is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + GNU General Public License for more details.
> +
> + You should have received a copy of the GNU General Public License
> + along with this program. If not, see <http://www.gnu.org/licenses/>. */
> +
> +#ifndef COMMON_TYPES_H
> +#define COMMON_TYPES_H
Nit, and I do mean nit :-): errors.h uses COMMON_ERRORS_H,
so should this be COMMON_COMMON_TYPES_H?
next prev parent reply other threads:[~2014-08-06 16:34 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 10:19 [PATCH 00/11 v5] Common code cleanups Gary Benson
2014-08-01 10:19 ` [PATCH 04/11 v5] Introduce and use debug_printf and debug_vprintf Gary Benson
2014-08-06 17:08 ` Doug Evans
2014-08-07 9:22 ` Gary Benson
2014-08-01 10:19 ` [PATCH 03/11 v5] Move print-utils.h to common-defs.h Gary Benson
2014-08-06 16:51 ` Doug Evans
2014-08-06 17:05 ` Gary Benson
2014-08-01 10:19 ` [PATCH 02/11 v5] Introduce common-types.h Gary Benson
2014-08-06 16:34 ` Doug Evans [this message]
2014-08-01 10:22 ` [PATCH 09/11 v5] Remove GDBSERVER uses from linux-btrace.c Gary Benson
2014-08-06 18:27 ` Doug Evans
2014-08-01 10:22 ` [PATCH 07/11 v5] Introduce get_thread_regcache_for_ptid Gary Benson
2014-08-06 18:15 ` Doug Evans
2014-08-01 10:27 ` [PATCH 08/11 v5] Include common-defs.h instead of defs.h/server.h in shared code Gary Benson
2014-08-06 18:16 ` Doug Evans
2014-08-01 10:27 ` [PATCH 10/11 v5] Remove GDBSERVER uses from i386-dregs.c Gary Benson
2014-08-06 18:32 ` Doug Evans
2014-08-07 12:28 ` Gary Benson
2014-08-01 10:28 ` [PATCH 06/11 v5] Add target/symbol.h Gary Benson
2014-08-06 18:08 ` Doug Evans
2014-08-07 10:42 ` Gary Benson
2014-08-20 11:16 ` Pedro Alves
2014-08-20 12:14 ` Gary Benson
2014-08-20 14:17 ` Pedro Alves
2014-08-01 10:28 ` [PATCH 05/11 v5] Add target/target.h Gary Benson
2014-08-06 17:49 ` Doug Evans
2014-08-07 13:48 ` Gary Benson
2014-08-20 14:49 ` Pedro Alves
2014-08-20 15:01 ` Gary Benson
2014-08-20 15:08 ` Pedro Alves
2014-08-20 12:00 ` Pedro Alves
2014-08-20 12:01 ` Pedro Alves
2014-08-20 13:38 ` Gary Benson
2014-08-01 10:30 ` [PATCH 01/11 v5] Introduce common/errors.h Gary Benson
2014-08-06 16:20 ` Doug Evans
2014-08-06 16:29 ` Gary Benson
2014-08-06 16:40 ` Doug Evans
2014-08-01 10:41 ` [PATCH 11/11 v5] Remove one GDBSERVER use from linux-waitpid.c Gary Benson
2014-08-06 18:35 ` Doug Evans
2014-08-07 12:39 ` Gary Benson
2014-08-20 15:04 ` Pedro Alves
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=21474.22819.191021.27602@ruffy.mtv.corp.google.com \
--to=dje@google.com \
--cc=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=tromey@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