From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: palves@redhat.com (Pedro Alves)
Cc: dje@google.com (Doug Evans), gdb-patches@sourceware.org (gdb-patches)
Subject: Re: [PATCH v2] C++: dlsym casts in gdb/linux-thread-db.c and gdb/gdbserver/thread-db.c
Date: Wed, 05 Aug 2015 14:35:00 -0000 [thread overview]
Message-ID: <20150805143508.206EB22DD@oc7340732750.ibm.com> (raw)
In-Reply-To: <55C214E7.6090506@redhat.com> from "Pedro Alves" at Aug 05, 2015 02:51:35 PM
Pedro Alves wrote:
> On 08/05/2015 02:34 PM, Ulrich Weigand wrote:
> > It seems this is caused by the nat/gdb_thread_db.h header file
> > being included twice into gdbserver/thread-db.c:
> >
> > 1) via line 23:
> > #include "linux-low.h"
> > (which includes "nat/gdb_thread_db.h" at line 20)
> >
> > 2) directly in line 30:
> > #include "nat/gdb_thread_db.h"
> >
> > and the file not being guarded against double inclusion.
>
> Yeah, I think we should just add the guards.
>
> Are you already taking care of that, or would you like me to?
I've now checked in the patch below. (Also adding the missing
copyright header while I was at it.)
Tested on i686-linux.
Bye,
Ulrich
ChangeLog:
* nat/gdb_thread_db.h: Add copyright header.
Protect against multiple inclusion.
diff --git a/gdb/nat/gdb_thread_db.h b/gdb/nat/gdb_thread_db.h
index 2938eaf..3be4170 100644
--- a/gdb/nat/gdb_thread_db.h
+++ b/gdb/nat/gdb_thread_db.h
@@ -1,3 +1,23 @@
+/* Copyright (C) 2000-2015 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 GDB_THREAD_DB_H
+#define GDB_THREAD_DB_H 1
+
#ifdef HAVE_THREAD_DB_H
#include <thread_db.h>
#else
@@ -52,3 +72,5 @@ typedef td_err_e (td_thr_tlsbase_ftype) (const td_thrhandle_t *th,
typedef const char ** (td_symbol_list_ftype) (void);
typedef td_err_e (td_ta_delete_ftype) (td_thragent_t *);
+
+#endif /* GDB_THREAD_DB_H */
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2015-08-05 14:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 18:49 [PATCH] " Pedro Alves
2015-08-03 18:54 ` Doug Evans
2015-08-03 19:28 ` [PATCH v2] " Pedro Alves
2015-08-03 19:35 ` Doug Evans
2015-08-04 8:47 ` Pedro Alves
2015-08-05 13:34 ` Ulrich Weigand
2015-08-05 13:51 ` Pedro Alves
2015-08-05 14:35 ` Ulrich Weigand [this message]
2015-08-05 14:36 ` 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=20150805143508.206EB22DD@oc7340732750.ibm.com \
--to=uweigand@de.ibm.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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