diff options
Diffstat (limited to 'gdb/common')
41 files changed, 140 insertions, 73 deletions
diff --git a/gdb/common/agent.c b/gdb/common/agent.c index ae495a86b81..4040a21e9d6 100644 --- a/gdb/common/agent.c +++ b/gdb/common/agent.c @@ -17,12 +17,19 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "target/target.h" -#include "common/symbol.h" +#include "common/common-defs.h" +#include "common/agent.h" + +/* Standard C includes. */ #include <unistd.h> + +/* Local non-gdb includes. */ #include "filestuff.h" +/* Local subdirectory includes. */ +#include "common/symbol.h" +#include "target/target.h" + #define IPA_SYM_STRUCT_NAME ipa_sym_addresses_common #include "agent.h" diff --git a/gdb/common/array-view.h b/gdb/common/array-view.h index ad7933bc1fb..2edd3cf979f 100644 --- a/gdb/common/array-view.h +++ b/gdb/common/array-view.h @@ -18,9 +18,11 @@ #ifndef COMMON_ARRAY_VIEW_H #define COMMON_ARRAY_VIEW_H -#include "traits.h" #include <type_traits> +/* Local non-gdb includes. */ +#include "traits.h" + /* An array_view is an abstraction that provides a non-owning view over a sequence of contiguous objects. diff --git a/gdb/common/btrace-common.c b/gdb/common/btrace-common.c index 13f1f1a0fdd..b2c7c4dea05 100644 --- a/gdb/common/btrace-common.c +++ b/gdb/common/btrace-common.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "btrace-common.h" +#include "common/common-defs.h" +#include "common/btrace-common.h" /* See btrace-common.h. */ diff --git a/gdb/common/buffer.c b/gdb/common/buffer.c index 3c919e70979..2408648597d 100644 --- a/gdb/common/buffer.c +++ b/gdb/common/buffer.c @@ -17,10 +17,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "xml-utils.h" -#include "buffer.h" +#include "common/common-defs.h" +#include "common/buffer.h" + +/* Local non-gdb includes. */ #include "inttypes.h" +#include "xml-utils.h" + void buffer_grow (struct buffer *buffer, const char *data, size_t size) { diff --git a/gdb/common/cleanups.c b/gdb/common/cleanups.c index 121720d3c0f..242fb173975 100644 --- a/gdb/common/cleanups.c +++ b/gdb/common/cleanups.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "cleanups.h" +#include "common/common-defs.h" +#include "common/cleanups.h" /* The cleanup list records things that have to be undone if an error happens (descriptors to be closed, memory to be freed, etc.) diff --git a/gdb/common/common-debug.c b/gdb/common/common-debug.c index 11aee3ad5e3..0417818be3d 100644 --- a/gdb/common/common-debug.c +++ b/gdb/common/common-debug.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "common-debug.h" +#include "common/common-defs.h" +#include "common/common-debug.h" /* See common/common-debug.h. */ diff --git a/gdb/common/common-exceptions.c b/gdb/common/common-exceptions.c index 4e67e898bda..a2dd837c9d4 100644 --- a/gdb/common/common-exceptions.c +++ b/gdb/common/common-exceptions.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "common-exceptions.h" +#include "common/common-defs.h" +#include "common/common-exceptions.h" const struct gdb_exception exception_none = { (enum return_reason) 0, GDB_NO_ERROR, NULL }; diff --git a/gdb/common/common-exceptions.h b/gdb/common/common-exceptions.h index 471e7c5cf81..a5d57b7e1a3 100644 --- a/gdb/common/common-exceptions.h +++ b/gdb/common/common-exceptions.h @@ -21,6 +21,8 @@ #define COMMON_COMMON_EXCEPTIONS_H #include <setjmp.h> + +/* Standard C++ includes. */ #include <new> /* Reasons for calling throw_exceptions(). NOTE: all reason values diff --git a/gdb/common/common-regcache.c b/gdb/common/common-regcache.c index 4bdadffb824..acc23e82136 100644 --- a/gdb/common/common-regcache.c +++ b/gdb/common/common-regcache.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "common-regcache.h" +#include "common/common-defs.h" +#include "common/common-regcache.h" /* Return the register's value or throw if it's not available. */ diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c index 74ca93810c7..b70e7403389 100644 --- a/gdb/common/common-utils.c +++ b/gdb/common/common-utils.c @@ -17,11 +17,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "common-utils.h" -#include "host-defs.h" +#include "common/common-defs.h" +#include "common/common-utils.h" + +/* Standard C includes. */ #include <ctype.h> +/* Local non-gdb includes. */ +#include "host-defs.h" + /* The xmalloc() (libiberty.h) family of memory management routines. These are like the ISO-C malloc() family except that they implement diff --git a/gdb/common/common-utils.h b/gdb/common/common-utils.h index 52bf3437b1c..0562b4dd7b9 100644 --- a/gdb/common/common-utils.h +++ b/gdb/common/common-utils.h @@ -23,6 +23,7 @@ #include <string> #include <vector> +/* Local non-gdb includes. */ #include "poison.h" /* If possible, define FUNCTION_NAME, a macro containing the name of diff --git a/gdb/common/def-vector.h b/gdb/common/def-vector.h index 90c9ff577a7..115195fbf33 100644 --- a/gdb/common/def-vector.h +++ b/gdb/common/def-vector.h @@ -19,6 +19,8 @@ #define COMMON_DEF_VECTOR_H #include <vector> + +/* Local subdirectory includes. */ #include "common/default-init-alloc.h" namespace gdb { diff --git a/gdb/common/environ.c b/gdb/common/environ.c index 0c4106cbf6e..a05e5d7f3c8 100644 --- a/gdb/common/environ.c +++ b/gdb/common/environ.c @@ -15,8 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "environ.h" +#include "common/common-defs.h" +#include "common/environ.h" + +/* Standard C++ includes. */ #include <algorithm> #include <utility> diff --git a/gdb/common/environ.h b/gdb/common/environ.h index 8a6b907c9b4..005d441e9f0 100644 --- a/gdb/common/environ.h +++ b/gdb/common/environ.h @@ -17,8 +17,8 @@ #ifndef COMMON_ENVIRON_H #define COMMON_ENVIRON_H -#include <vector> #include <set> +#include <vector> /* Class that represents the environment variables as seen by the inferior. */ diff --git a/gdb/common/errors.c b/gdb/common/errors.c index 22080124d4b..02f16ec5ecf 100644 --- a/gdb/common/errors.c +++ b/gdb/common/errors.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "errors.h" +#include "common/common-defs.h" +#include "common/errors.h" /* See common/errors.h. */ diff --git a/gdb/common/fileio.c b/gdb/common/fileio.c index 28d97fc2f26..eddf4b1f944 100644 --- a/gdb/common/fileio.c +++ b/gdb/common/fileio.c @@ -17,10 +17,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "fileio.h" -#include <sys/stat.h> +#include "common/common-defs.h" +#include "common/fileio.h" + +/* Standard C includes. */ #include <fcntl.h> +#include <sys/stat.h> /* See fileio.h. */ diff --git a/gdb/common/fileio.h b/gdb/common/fileio.h index 7a2e7c2817e..d31f47feb81 100644 --- a/gdb/common/fileio.h +++ b/gdb/common/fileio.h @@ -20,9 +20,11 @@ #ifndef COMMON_FILEIO_H #define COMMON_FILEIO_H -#include "gdb/fileio.h" #include <sys/stat.h> +/* Local non-gdb includes. */ +#include "gdb/fileio.h" + /* Convert a host-format errno value to a File-I/O error number. */ extern int host_to_fileio_error (int error); diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c index 1ca62482a7e..4c79367f6dc 100644 --- a/gdb/common/filestuff.c +++ b/gdb/common/filestuff.c @@ -16,15 +16,21 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "filestuff.h" -#include "gdb_vecs.h" +#include "common/common-defs.h" +#include "common/filestuff.h" + +/* Standard C includes. */ #include <fcntl.h> -#include <unistd.h> -#include <sys/types.h> #include <sys/stat.h> +#include <sys/types.h> +#include <unistd.h> + +/* Standard C++ includes. */ #include <algorithm> +/* Local non-gdb includes. */ +#include "gdb_vecs.h" + #ifdef USE_WIN32API #include <winsock2.h> #include <windows.h> diff --git a/gdb/common/format.c b/gdb/common/format.c index fb3421e62bf..cf42ce0c1ba 100644 --- a/gdb/common/format.c +++ b/gdb/common/format.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "format.h" +#include "common/common-defs.h" +#include "common/format.h" format_pieces::format_pieces (const char **arg) { diff --git a/gdb/common/forward-scope-exit.h b/gdb/common/forward-scope-exit.h index bffc6e683ba..13fc8249a52 100644 --- a/gdb/common/forward-scope-exit.h +++ b/gdb/common/forward-scope-exit.h @@ -18,9 +18,11 @@ #ifndef COMMON_FORWARD_SCOPE_EXIT_H #define COMMON_FORWARD_SCOPE_EXIT_H -#include "common/scope-exit.h" #include <functional> +/* Local subdirectory includes. */ +#include "common/scope-exit.h" + /* A forward_scope_exit is like scope_exit, but instead of giving it a callable, you instead specialize it for a given cleanup function, and the generated class automatically has a constructor with the diff --git a/gdb/common/gdb_tilde_expand.c b/gdb/common/gdb_tilde_expand.c index fc338ff6ecb..153442ec07b 100644 --- a/gdb/common/gdb_tilde_expand.c +++ b/gdb/common/gdb_tilde_expand.c @@ -17,8 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "gdb_tilde_expand.h" +#include "common/common-defs.h" +#include "common/gdb_tilde_expand.h" + +/* Standard C includes. */ #include <glob.h> /* RAII-style class wrapping "glob". */ diff --git a/gdb/common/gdb_vecs.c b/gdb/common/gdb_vecs.c index 38f42f54c9a..ab8f7a97c92 100644 --- a/gdb/common/gdb_vecs.c +++ b/gdb/common/gdb_vecs.c @@ -17,8 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "gdb_vecs.h" +#include "common/common-defs.h" +#include "common/gdb_vecs.h" + +/* Local non-gdb includes. */ #include "host-defs.h" /* Worker function to split character delimiter separated string of fields diff --git a/gdb/common/job-control.c b/gdb/common/job-control.c index fc3de684904..d186e834e26 100644 --- a/gdb/common/job-control.c +++ b/gdb/common/job-control.c @@ -18,8 +18,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "job-control.h" +#include "common/common-defs.h" +#include "common/job-control.h" + +/* Standard C includes. */ #ifdef HAVE_TERMIOS_H #include <termios.h> #endif diff --git a/gdb/common/mingw-strerror.c b/gdb/common/mingw-strerror.c index 6386330062c..75c1635a21a 100644 --- a/gdb/common/mingw-strerror.c +++ b/gdb/common/mingw-strerror.c @@ -17,8 +17,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" +#include "common/common-defs.h" +/* Standard C includes. */ #include <windows.h> /* Implementation of safe_strerror as defined in common-utils.h. diff --git a/gdb/common/netstuff.c b/gdb/common/netstuff.c index 27fdc739ffd..b72d3499b3e 100644 --- a/gdb/common/netstuff.c +++ b/gdb/common/netstuff.c @@ -16,8 +16,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "netstuff.h" +#include "common/common-defs.h" +#include "common/netstuff.h" + +/* Standard C++ includes. */ #include <algorithm> #ifdef USE_WIN32API diff --git a/gdb/common/pathstuff.c b/gdb/common/pathstuff.c index 2b1669a5b99..3c33b970020 100644 --- a/gdb/common/pathstuff.c +++ b/gdb/common/pathstuff.c @@ -17,11 +17,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "pathstuff.h" -#include "host-defs.h" +#include "common/common-defs.h" +#include "common/pathstuff.h" + +/* Local non-gdb includes. */ #include "filenames.h" #include "gdb_tilde_expand.h" +#include "host-defs.h" #ifdef USE_WIN32API #include <windows.h> diff --git a/gdb/common/poison.h b/gdb/common/poison.h index 699de513bab..79b7955a03f 100644 --- a/gdb/common/poison.h +++ b/gdb/common/poison.h @@ -20,8 +20,8 @@ #ifndef COMMON_POISON_H #define COMMON_POISON_H -#include "traits.h" #include "obstack.h" +#include "traits.h" /* Poison memset of non-POD types. The idea is catching invalid initialization of non-POD structs that is easy to be introduced as diff --git a/gdb/common/posix-strerror.c b/gdb/common/posix-strerror.c index a8651b706d7..1e7c78c2a3d 100644 --- a/gdb/common/posix-strerror.c +++ b/gdb/common/posix-strerror.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" +#include "common/common-defs.h" /* Implementation of safe_strerror as defined in common-utils.h. */ diff --git a/gdb/common/print-utils.c b/gdb/common/print-utils.c index 051c4541b28..9d8ce288bad 100644 --- a/gdb/common/print-utils.c +++ b/gdb/common/print-utils.c @@ -17,8 +17,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "print-utils.h" +#include "common/common-defs.h" +#include "common/print-utils.h" + /* Temporary storage using circular buffer. */ /* Number of cells in the circular buffer. */ diff --git a/gdb/common/ptid.c b/gdb/common/ptid.c index c025511a37b..202370aa2db 100644 --- a/gdb/common/ptid.c +++ b/gdb/common/ptid.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "ptid.h" +#include "common/common-defs.h" +#include "common/ptid.h" /* See ptid.h for these. */ diff --git a/gdb/common/rsp-low.c b/gdb/common/rsp-low.c index 4bb49418499..fa20fba7b63 100644 --- a/gdb/common/rsp-low.c +++ b/gdb/common/rsp-low.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "rsp-low.h" +#include "common/common-defs.h" +#include "common/rsp-low.h" /* See rsp-low.h. */ diff --git a/gdb/common/run-time-clock.c b/gdb/common/run-time-clock.c index 26378a05d91..96565241040 100644 --- a/gdb/common/run-time-clock.c +++ b/gdb/common/run-time-clock.c @@ -16,8 +16,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "run-time-clock.h" +#include "common/common-defs.h" +#include "common/run-time-clock.h" + +/* Standard C includes. */ #if defined HAVE_SYS_RESOURCE_H #include <sys/resource.h> #endif diff --git a/gdb/common/scope-exit.h b/gdb/common/scope-exit.h index 8cdbec305ac..003ba9fd6aa 100644 --- a/gdb/common/scope-exit.h +++ b/gdb/common/scope-exit.h @@ -20,6 +20,8 @@ #include <functional> #include <type_traits> + +/* Local subdirectory includes. */ #include "common/preprocessor.h" /* scope_exit is a general-purpose scope guard that calls its exit diff --git a/gdb/common/scoped_fd.h b/gdb/common/scoped_fd.h index c4a494b7018..1b6f4c9b2ac 100644 --- a/gdb/common/scoped_fd.h +++ b/gdb/common/scoped_fd.h @@ -21,6 +21,8 @@ #define COMMON_SCOPED_FD_H #include <unistd.h> + +/* Local non-gdb includes. */ #include "filestuff.h" /* A smart-pointer-like class to automatically close a file descriptor. */ diff --git a/gdb/common/scoped_mmap.c b/gdb/common/scoped_mmap.c index 1bd980c09a5..1141b3a8b72 100644 --- a/gdb/common/scoped_mmap.c +++ b/gdb/common/scoped_mmap.c @@ -17,11 +17,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "defs.h" -#include "scoped_mmap.h" +#include "common/common-defs.h" +#include "common/scoped_mmap.h" + +/* Local non-gdb includes. */ #include "scoped_fd.h" + +/* Local subdirectory includes. */ #include "common/filestuff.h" +/* Local includes. */ +#include "defs.h" + #ifdef HAVE_SYS_MMAN_H scoped_mmap diff --git a/gdb/common/selftest.c b/gdb/common/selftest.c index fe060ff64f1..113b8b33c3d 100644 --- a/gdb/common/selftest.c +++ b/gdb/common/selftest.c @@ -16,12 +16,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "common-exceptions.h" -#include "common-debug.h" -#include "selftest.h" +#include "common/common-defs.h" +#include "common/selftest.h" + +/* Standard C++ includes. */ #include <map> +/* Local non-gdb includes. */ +#include "common-debug.h" +#include "common-exceptions.h" + namespace selftests { /* All the tests that have been registered. Using an std::map allows keeping diff --git a/gdb/common/signals-state-save-restore.c b/gdb/common/signals-state-save-restore.c index c66d2ddc62f..737ebe3f778 100644 --- a/gdb/common/signals-state-save-restore.c +++ b/gdb/common/signals-state-save-restore.c @@ -15,9 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "signals-state-save-restore.h" +#include "common/common-defs.h" +#include "common/signals-state-save-restore.h" +/* Standard C includes. */ #include <signal.h> /* The original signal actions and mask. */ diff --git a/gdb/common/signals.c b/gdb/common/signals.c index 707bbe9fa3b..beba0531ced 100644 --- a/gdb/common/signals.c +++ b/gdb/common/signals.c @@ -17,12 +17,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" +#include "common/common-defs.h" +/* Standard C includes. */ #ifdef HAVE_SIGNAL_H #include <signal.h> #endif +/* Local non-gdb includes. */ #include "gdb_signals.h" struct gdbarch; diff --git a/gdb/common/tdesc.c b/gdb/common/tdesc.c index fe63a36c339..8c7b618dc5b 100644 --- a/gdb/common/tdesc.c +++ b/gdb/common/tdesc.c @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" +#include "common/common-defs.h" #include "common/tdesc.h" tdesc_reg::tdesc_reg (struct tdesc_feature *feature, const std::string &name_, diff --git a/gdb/common/vec.c b/gdb/common/vec.c index a8895449495..c57812153d1 100644 --- a/gdb/common/vec.c +++ b/gdb/common/vec.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "vec.h" +#include "common/common-defs.h" +#include "common/vec.h" struct vec_prefix { diff --git a/gdb/common/xml-utils.c b/gdb/common/xml-utils.c index 79f040e2b0f..c6b09ab2ab6 100644 --- a/gdb/common/xml-utils.c +++ b/gdb/common/xml-utils.c @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "common-defs.h" -#include "xml-utils.h" +#include "common/common-defs.h" +#include "common/xml-utils.h" /* See xml-utils.h. */ |