[gdbserver] Add missing include of gdbsupport/agent.h
authorTom de Vries <tdevries@suse.de>
Mon, 29 Jun 2020 10:14:10 +0000 (12:14 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 29 Jun 2020 10:14:10 +0000 (12:14 +0200)
The file gdbserver/ax.h contains:
...
 #ifdef IN_PROCESS_AGENT
 #define debug_threads debug_agent
 #endif
...
but does not declare debug_agent.

Fix this by adding an include of gdbsupport/agent.h.

[ If this fix would have been in place before commit 8118159c69 "[gdbserver] Fix
Wlto-type-mismatch for debug_agent", we would have simply run into this build
breaker with a regular, non-lto build:
...
src/gdbserver/ax.cc:28:5: error: conflicting declaration 'int debug_agent'
 int debug_agent = 0;
     ^~~~~~~~~~~
In file included from src/gdbserver/ax.h:25:0,
                 from src/gdbserver/ax.cc:20:
src/gdbsupport/agent.h:47:13: note: previous declaration as 'bool debug_agent'
 extern bool debug_agent;
             ^~~~~~~~~~~
... ]

Tested on x86_64-linux.

gdbserver/ChangeLog:

2020-06-29  Tom de Vries  <tdevries@suse.de>

* ax.h: Include gdbsupport/debug_agent.h.

gdbserver/ChangeLog
gdbserver/ax.h

index 43b8bc895dbd2cc12ff528fcdb3ea8d499d4c328..4ed5d6101612a086fd3d1bf9ac9efcd5db67a4a7 100644 (file)
@@ -1,3 +1,7 @@
+2020-06-29  Tom de Vries  <tdevries@suse.de>
+
+       * ax.h: Include gdbsupport/debug_agent.h.
+
 2020-06-23  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * tdesc.cc (struct tdesc_compatible_info): New struct.
index 1fba69e7ad1570cfd3dbb914da1495269bbc11be..b7ff7d8910ef81af0ccdf341376d25cc30c009e0 100644 (file)
@@ -22,6 +22,7 @@
 #include "regcache.h"
 
 #ifdef IN_PROCESS_AGENT
+#include "gdbsupport/agent.h"
 #define debug_threads debug_agent
 #endif
 
This page took 0.031672 seconds and 4 git commands to generate.