* [PATCH OBV 07/10] Include signal.h in nat/amd64-linux-siginfo.h
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-06 14:19 ` [PATCH OBV 10/10] Include gdb_proc_service.h in x86-linux-nat.h Yao Qi
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="nat/amd64-linux-siginfo.h"
....
../../binutils-gdb/gdb/nat/amd64-linux-siginfo.h:52:39: error: 'siginfo_t' was not declared in this scope
int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* nat/amd64-linux-siginfo.h: Include signal.h.
---
gdb/nat/amd64-linux-siginfo.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/nat/amd64-linux-siginfo.h b/gdb/nat/amd64-linux-siginfo.h
index 452a9f1..ccc71c8 100644
--- a/gdb/nat/amd64-linux-siginfo.h
+++ b/gdb/nat/amd64-linux-siginfo.h
@@ -20,6 +20,8 @@
#ifndef AMD64_LINUX_SIGINFO_H
#define AMD64_LINUX_SIGINFO_H 1
+#include <signal.h> /* For siginfo_t. */
+
/* When GDB is built as a 64-bit application on Linux, the
PTRACE_GETSIGINFO data is always presented in 64-bit layout. Since
debugging a 32-bit inferior with a 64-bit GDB should look the same
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH OBV 03/10] Include doublest.h and expression.h in dfp.h
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
` (7 preceding siblings ...)
2017-01-06 14:19 ` [PATCH OBV 02/10] Include ax.h in ax-gdb.h Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-13 14:41 ` [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="dfp.h"
...
../../binutils-gdb/gdb/dfp.h:39:8: error: 'DOUBLEST' does not name a type
extern DOUBLEST decimal_to_doublest (const gdb_byte *from, int len,
^
../../binutils-gdb/gdb/dfp.h:41:33: error: use of enum 'exp_opcode' without previous declaration
extern void decimal_binop (enum exp_opcode,
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* dfp.h: Include "dboulest.h" and "expression.h".
---
gdb/dfp.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gdb/dfp.h b/gdb/dfp.h
index 9f37b8c..c8ff5a1 100644
--- a/gdb/dfp.h
+++ b/gdb/dfp.h
@@ -25,6 +25,9 @@
#ifndef DFP_H
#define DFP_H
+#include "doublest.h" /* For DOUBLEST. */
+#include "expression.h" /* For enum exp_opcode. */
+
/* When using decimal128, this is the maximum string length + 1
* (value comes from libdecnumber's DECIMAL128_String constant). */
#define MAX_DECIMAL_STRING 43
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH OBV 04/10] Include target.h in inf-loop.h
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
` (5 preceding siblings ...)
2017-01-06 14:19 ` [PATCH OBV 06/10] Include break-common.h in nat/aarch64-linux-hw-point.h Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-06 14:19 ` [PATCH OBV 02/10] Include ax.h in ax-gdb.h Yao Qi
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="target.h inf-loop.h"
...
../../binutils-gdb/gdb/inf-loop.h:23:42: error: use of enum 'inferior_event_type' without previous declaration
extern void inferior_event_handler (enum inferior_event_type event_type,
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* inf-loop.c: Don't include "target.h".
* inf-loop.h: Include it here.
---
gdb/inf-loop.c | 1 -
gdb/inf-loop.h | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c
index 679149e..bb9fa01 100644
--- a/gdb/inf-loop.c
+++ b/gdb/inf-loop.c
@@ -20,7 +20,6 @@
#include "defs.h"
#include "inferior.h"
#include "infrun.h"
-#include "target.h" /* For enum inferior_event_type. */
#include "event-loop.h"
#include "event-top.h"
#include "inf-loop.h"
diff --git a/gdb/inf-loop.h b/gdb/inf-loop.h
index b76c2ee..a5d0747 100644
--- a/gdb/inf-loop.h
+++ b/gdb/inf-loop.h
@@ -20,6 +20,8 @@
#ifndef INF_LOOP_H
#define INF_LOOP_H
+#include "target.h" /* For enum inferior_event_type. */
+
extern void inferior_event_handler (enum inferior_event_type event_type,
void* client_data);
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH OBV 10/10] Include gdb_proc_service.h in x86-linux-nat.h
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
2017-01-06 14:19 ` [PATCH OBV 07/10] Include signal.h in nat/amd64-linux-siginfo.h Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-06 14:19 ` [PATCH OBV 05/10] Include mi-cmds.h in mi-parse.h Yao Qi
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="x86-linux-nat.h"
...
../../binutils-gdb/gdb/x86-linux-nat.h:29:8: error: 'ps_err_e' does not name a type
extern ps_err_e x86_linux_get_thread_area (pid_t pid, void *addr,
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* x86-linux-nat.h: Include gdb_proc_service.h.
---
gdb/x86-linux-nat.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/x86-linux-nat.h b/gdb/x86-linux-nat.h
index 7d952aa..897f989 100644
--- a/gdb/x86-linux-nat.h
+++ b/gdb/x86-linux-nat.h
@@ -20,6 +20,8 @@
#ifndef X86_LINUX_NAT_H
#define X86_LINUX_NAT_H 1
+#include "gdb_proc_service.h" /* For ps_err_e. */
+
\f
/* Helper for ps_get_thread_area. Sets BASE_ADDR to a pointer to
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 01/10] 'make check-headers' for c++ header
@ 2017-01-06 14:19 Yao Qi
2017-01-06 14:19 ` [PATCH OBV 07/10] Include signal.h in nat/amd64-linux-siginfo.h Yao Qi
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
If I run 'make check-headers', I get these errors,
....
In file included from ../../binutils-gdb/gdb/common/common-defs.h:78:0,
from ../../binutils-gdb/gdb/defs.h:28,
from <command-line>:0:
../../binutils-gdb/gdb/common/common-utils.h:23:18: fatal error: string: No such file or directory
#include <string>
^
because we still parse headers as c file with a c compiler, which is no
longer true after we moved to C++. This patch changes it to use C++
compiler and parse headers as c++ headers.
The rest of 9 patches are obvious, and I'll push them in.
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
of CC. Pass "-x c++-header" instead of "-x c".
---
gdb/Makefile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ae5a80e..3ce7d69 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1988,8 +1988,8 @@ CHECK_HEADERS = $(HFILES_NO_SRCDIR)
check-headers:
@echo Checking headers.
for i in $(CHECK_HEADERS) ; do \
- $(CC) -x c -c -fsyntax-only $(INTERNAL_CFLAGS) \
- -include defs.h $(srcdir)/$$i ; \
+ $(CXX) $(CXX_DIALECT) -x c++-header -c -fsyntax-only \
+ $(INTERNAL_CFLAGS) -include defs.h $(srcdir)/$$i ; \
done
.PHONY: check-headers
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH OBV 02/10] Include ax.h in ax-gdb.h
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
` (6 preceding siblings ...)
2017-01-06 14:19 ` [PATCH OBV 04/10] Include target.h in inf-loop.h Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-06 14:19 ` [PATCH OBV 03/10] Include doublest.h and expression.h in dfp.h Yao Qi
2017-01-13 14:41 ` [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="ax-gdb.h"
...
../../binutils-gdb/gdb/ax-gdb.h:104:8: error: 'agent_expr_up' does not name a type
extern agent_expr_up gen_trace_for_expr (CORE_ADDR, struct expression *,
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* ax-gdb.h: Include "ax.h"
---
gdb/ax-gdb.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/ax-gdb.h b/gdb/ax-gdb.h
index 5c74a0e..8b5ab46 100644
--- a/gdb/ax-gdb.h
+++ b/gdb/ax-gdb.h
@@ -19,6 +19,8 @@
#ifndef AX_GDB_H
#define AX_GDB_H
+#include "ax.h" /* For agent_expr_up. */
+
struct expression;
union exp_element;
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH OBV 09/10] Include serial.h in ser-base.h.
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
` (2 preceding siblings ...)
2017-01-06 14:19 ` [PATCH OBV 05/10] Include mi-cmds.h in mi-parse.h Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-06 14:19 ` [PATCH OBV 08/10] Include ppc-tdep.h in ppc-linux-tdep.h Yao Qi
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="ser-base.h"
...
../../binutils-gdb/gdb/ser-base.h:33:8: error: 'serial_ttystate' does not name a type
extern serial_ttystate ser_base_get_tty_state (struct serial *scb);
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* ser-base.h: Include serial.h.
---
gdb/ser-base.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/ser-base.h b/gdb/ser-base.h
index 06f9895..964d640 100644
--- a/gdb/ser-base.h
+++ b/gdb/ser-base.h
@@ -20,6 +20,8 @@
#ifndef SER_BASE_H
#define SER_BASE_H
+#include "serial.h" /* For serial_ttystate. */
+
struct serial;
struct ui_file;
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH OBV 06/10] Include break-common.h in nat/aarch64-linux-hw-point.h
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
` (4 preceding siblings ...)
2017-01-06 14:19 ` [PATCH OBV 08/10] Include ppc-tdep.h in ppc-linux-tdep.h Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-06 14:19 ` [PATCH OBV 04/10] Include target.h in inf-loop.h Yao Qi
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="nat/aarch64-linux-hw-point.h"
...
../../binutils-gdb/gdb/nat/aarch64-linux-hw-point.h:169:37: error: use of enum 'target_hw_bp_type' without previous declaration
int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr,
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* nat/aarch64-linux-hw-point.h: Include break-common.h.
---
gdb/nat/aarch64-linux-hw-point.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/nat/aarch64-linux-hw-point.h b/gdb/nat/aarch64-linux-hw-point.h
index 4d115ba..610a5f1 100644
--- a/gdb/nat/aarch64-linux-hw-point.h
+++ b/gdb/nat/aarch64-linux-hw-point.h
@@ -19,6 +19,8 @@
#ifndef AARCH64_LINUX_HW_POINT_H
#define AARCH64_LINUX_HW_POINT_H 1
+#include "break-common.h" /* For enum target_hw_bp_type. */
+
/* Macro definitions, data structures, and code for the hardware
breakpoint and hardware watchpoint support follow. We use the
following abbreviations throughout the code:
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH OBV 08/10] Include ppc-tdep.h in ppc-linux-tdep.h
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
` (3 preceding siblings ...)
2017-01-06 14:19 ` [PATCH OBV 09/10] Include serial.h in ser-base.h Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-06 14:19 ` [PATCH OBV 06/10] Include break-common.h in nat/aarch64-linux-hw-point.h Yao Qi
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="ppc-linux-tdep.h"
...
../../binutils-gdb/gdb/ppc-linux-tdep.h:34:24: error: 'PPC_NUM_REGS' was not declared in this scope
PPC_ORIG_R3_REGNUM = PPC_NUM_REGS,
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* ppc-linux-tdep.h: Include ppc-tdep.h.
---
gdb/ppc-linux-tdep.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdb/ppc-linux-tdep.h b/gdb/ppc-linux-tdep.h
index f60dba2..fa8a464 100644
--- a/gdb/ppc-linux-tdep.h
+++ b/gdb/ppc-linux-tdep.h
@@ -20,6 +20,8 @@
#ifndef PPC_LINUX_TDEP_H
#define PPC_LINUX_TDEP_H
+#include "ppc-tdep.h" /* For PPC_NUM_REGS. */
+
struct regset;
/* From ppc-linux-tdep.c ... */
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH OBV 05/10] Include mi-cmds.h in mi-parse.h
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
2017-01-06 14:19 ` [PATCH OBV 07/10] Include signal.h in nat/amd64-linux-siginfo.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 10/10] Include gdb_proc_service.h in x86-linux-nat.h Yao Qi
@ 2017-01-06 14:19 ` Yao Qi
2017-01-06 14:19 ` [PATCH OBV 09/10] Include serial.h in ser-base.h Yao Qi
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-06 14:19 UTC (permalink / raw)
To: gdb-patches
$ make check-headers CHECK_HEADERS="mi/mi-parse.h"
...
../../binutils-gdb/gdb/mi/mi-parse.h:77:6: error: use of enum 'print_values' without previous declaration
enum print_values mi_parse_print_values (const char *name);
^
gdb:
2017-01-06 Yao Qi <yao.qi@linaro.org>
* mi/mi-parse.h: Include mi-cmds.h.
---
gdb/mi/mi-parse.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/mi/mi-parse.h b/gdb/mi/mi-parse.h
index 247fbb3..b11e5d3 100644
--- a/gdb/mi/mi-parse.h
+++ b/gdb/mi/mi-parse.h
@@ -22,6 +22,7 @@
#include "run-time-clock.h"
#include <chrono>
+#include "mi-cmds.h" /* For enum print_values. */
/* MI parser */
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 01/10] 'make check-headers' for c++ header
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
` (8 preceding siblings ...)
2017-01-06 14:19 ` [PATCH OBV 03/10] Include doublest.h and expression.h in dfp.h Yao Qi
@ 2017-01-13 14:41 ` Yao Qi
9 siblings, 0 replies; 11+ messages in thread
From: Yao Qi @ 2017-01-13 14:41 UTC (permalink / raw)
To: gdb-patches
On 17-01-06 14:18:51, Yao Qi wrote:
> gdb:
>
> 2017-01-06 Yao Qi <yao.qi@linaro.org>
>
> * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
> of CC. Pass "-x c++-header" instead of "-x c".
I pushed it in.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-01-13 14:41 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 14:19 [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
2017-01-06 14:19 ` [PATCH OBV 07/10] Include signal.h in nat/amd64-linux-siginfo.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 10/10] Include gdb_proc_service.h in x86-linux-nat.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 05/10] Include mi-cmds.h in mi-parse.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 09/10] Include serial.h in ser-base.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 08/10] Include ppc-tdep.h in ppc-linux-tdep.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 06/10] Include break-common.h in nat/aarch64-linux-hw-point.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 04/10] Include target.h in inf-loop.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 02/10] Include ax.h in ax-gdb.h Yao Qi
2017-01-06 14:19 ` [PATCH OBV 03/10] Include doublest.h and expression.h in dfp.h Yao Qi
2017-01-13 14:41 ` [PATCH 01/10] 'make check-headers' for c++ header Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).