aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgdb/configure6
-rw-r--r--gdb/dwarf2/cooked-index.c3
-rw-r--r--gdb/dwarf2/cooked-index.h2
-rw-r--r--gdb/dwarf2/index-write.c4
-rw-r--r--gdb/dwarf2/read.c5
-rw-r--r--gdb/dwarf2/read.h1
-rw-r--r--gdb/elfread.c2
-rw-r--r--gdb/mi/mi-out.c1
-rw-r--r--gdb/mi/mi-out.h1
-rw-r--r--gdb/symfile-debug.c18
-rwxr-xr-xgdbserver/configure6
-rwxr-xr-xgdbsupport/configure6
-rw-r--r--gdbsupport/warning.m46
13 files changed, 27 insertions, 34 deletions
diff --git a/gdb/configure b/gdb/configure
index f4f0262..3080413 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -31295,7 +31295,13 @@ build_warnings=" \
-Wsuggest-override \
-Wunused-but-set-parameter \
-Wunused-but-set-variable \
+-Wunused-const-variable=1 \
-Wunused-function \
+-Wunused-label \
+-Wunused-lambda-capture \
+-Wunused-local-typedefs \
+-Wunused-member-function \
+-Wunused-private-field \
-Wunused-value \
-Wunused-variable \
-Wvla \
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index 13f0540..9626b2c 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -714,8 +714,7 @@ cooked_index_worker::write_to_cache (const cooked_index *idx,
cooked_index::cooked_index (dwarf2_per_objfile *per_objfile,
cooked_index_worker_up &&worker)
- : m_state (std::move (worker)),
- m_per_bfd (per_objfile->per_bfd)
+ : m_state (std::move (worker))
{
/* ACTIVE_VECTORS is not locked, and this assert ensures that this
will be caught if ever moved to the background. */
diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h
index 02f4512..be67a83 100644
--- a/gdb/dwarf2/cooked-index.h
+++ b/gdb/dwarf2/cooked-index.h
@@ -651,8 +651,6 @@ private:
that the state is CACHE_DONE -- it's important to note that only
the main thread may change the value of this pointer. */
cooked_index_worker_up m_state;
-
- dwarf2_per_bfd *m_per_bfd;
};
/* An implementation of quick_symbol_functions for the cooked DWARF
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index 8fb5931..da1f6cd 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -887,8 +887,7 @@ private:
/* Object constructor to be called for current DWARF2_PER_BFD. */
debug_str_lookup (dwarf2_per_bfd *per_bfd)
- : m_abfd (per_bfd->obfd),
- m_per_bfd (per_bfd)
+ : m_per_bfd (per_bfd)
{
}
@@ -922,7 +921,6 @@ private:
private:
gdb::unordered_map<c_str_view, size_t, c_str_view_hasher> m_str_table;
- bfd *const m_abfd;
dwarf2_per_bfd *m_per_bfd;
/* Data to add at the end of .debug_str for new needed symbol names. */
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 85e4d59..fd178e9 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -3050,7 +3050,6 @@ cutu_reader::cutu_reader (dwarf2_per_cu *this_cu,
bool skip_partial,
enum language pretend_language,
const abbrev_table_cache *cache)
- : m_this_cu (this_cu)
{
struct objfile *objfile = per_objfile->objfile;
struct dwarf2_section_info *section = this_cu->section;
@@ -3279,7 +3278,6 @@ cutu_reader::cutu_reader (dwarf2_per_cu *this_cu,
enum language pretend_language,
struct dwarf2_cu *parent_cu,
struct dwo_file *dwo_file)
- : m_this_cu (this_cu)
{
struct objfile *objfile = per_objfile->objfile;
struct dwarf2_section_info *section = this_cu->section;
@@ -16192,9 +16190,6 @@ private:
/* Additional bits of state we need to track. */
- /* The last file that we called dwarf2_start_subfile for.
- This is only used for TLLs. */
- unsigned int m_last_file = 0;
/* The last file a line number was recorded for. */
struct subfile *m_last_subfile = NULL;
diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h
index ced8154..d498eeb 100644
--- a/gdb/dwarf2/read.h
+++ b/gdb/dwarf2/read.h
@@ -1037,7 +1037,6 @@ private:
struct die_info *m_top_level_die = nullptr;
bool m_dummy_p = false;
- dwarf2_per_cu *m_this_cu;
dwarf2_cu_up m_new_cu;
/* The ordinary abbreviation table. */
diff --git a/gdb/elfread.c b/gdb/elfread.c
index e81233c..5be3118 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -592,7 +592,7 @@ elf_rel_plt_read (minimal_symbol_reader &reader,
std::string string_buffer;
/* Does ADDRESS reside in SECTION of OBFD? */
- auto within_section = [obfd] (asection *section, CORE_ADDR address)
+ auto within_section = [] (asection *section, CORE_ADDR address)
{
if (section == NULL)
return false;
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index 9ad26e7..a704535 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -323,7 +323,6 @@ mi_ui_out::version ()
mi_ui_out::mi_ui_out (int mi_version)
: ui_out (make_flags (mi_version)),
m_suppress_field_separator (false),
- m_suppress_output (false),
m_mi_version (mi_version)
{
string_file *stream = new string_file ();
diff --git a/gdb/mi/mi-out.h b/gdb/mi/mi-out.h
index 0112d5a..c6aad00 100644
--- a/gdb/mi/mi-out.h
+++ b/gdb/mi/mi-out.h
@@ -139,7 +139,6 @@ private:
}
bool m_suppress_field_separator;
- bool m_suppress_output;
int m_mi_version;
std::vector<ui_file *> m_streams;
};
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c
index dda3efe..9378398 100644
--- a/gdb/symfile-debug.c
+++ b/gdb/symfile-debug.c
@@ -789,24 +789,6 @@ debug_sym_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf)
return retval;
}
-/* Template of debugging version of struct sym_fns.
- A copy is made, with sym_flavour updated, and a pointer to the real table
- installed in real_sf, and then a pointer to the copy is installed in the
- objfile. */
-
-static const struct sym_fns debug_sym_fns =
-{
- debug_sym_new_init,
- debug_sym_init,
- debug_sym_read,
- debug_sym_finish,
- debug_sym_offsets,
- debug_sym_segments,
- debug_sym_read_linetable,
- debug_sym_relocate,
- &debug_sym_probe_fns,
-};
-
/* Install the debugging versions of the symfile functions for OBJFILE.
Do not call this if the debug versions are already installed. */
diff --git a/gdbserver/configure b/gdbserver/configure
index 0deb146..b45b55f 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -13692,7 +13692,13 @@ build_warnings=" \
-Wsuggest-override \
-Wunused-but-set-parameter \
-Wunused-but-set-variable \
+-Wunused-const-variable=1 \
-Wunused-function \
+-Wunused-label \
+-Wunused-lambda-capture \
+-Wunused-local-typedefs \
+-Wunused-member-function \
+-Wunused-private-field \
-Wunused-value \
-Wunused-variable \
-Wvla \
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 63619d7..bcfae34 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -14254,7 +14254,13 @@ build_warnings=" \
-Wsuggest-override \
-Wunused-but-set-parameter \
-Wunused-but-set-variable \
+-Wunused-const-variable=1 \
-Wunused-function \
+-Wunused-label \
+-Wunused-lambda-capture \
+-Wunused-local-typedefs \
+-Wunused-member-function \
+-Wunused-private-field \
-Wunused-value \
-Wunused-variable \
-Wvla \
diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
index b7c2dc5..04b58f1 100644
--- a/gdbsupport/warning.m4
+++ b/gdbsupport/warning.m4
@@ -57,7 +57,13 @@ build_warnings=" \
-Wsuggest-override \
-Wunused-but-set-parameter \
-Wunused-but-set-variable \
+-Wunused-const-variable=1 \
-Wunused-function \
+-Wunused-label \
+-Wunused-lambda-capture \
+-Wunused-local-typedefs \
+-Wunused-member-function \
+-Wunused-private-field \
-Wunused-value \
-Wunused-variable \
-Wvla \