aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-01-31 15:23:32 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-03-06 11:32:25 -0500
commit7055fa96fcadf77482876b42393fe43b48fdfe16 (patch)
tree78e9da68af2dfbfdf08c289693dc84dd5aac0a66
parent7a1550fcecb8db0fc6db0d59b18d3ca5ac6f4d39 (diff)
downloadfsf-binutils-gdb-7055fa96fcadf77482876b42393fe43b48fdfe16.zip
fsf-binutils-gdb-7055fa96fcadf77482876b42393fe43b48fdfe16.tar.gz
fsf-binutils-gdb-7055fa96fcadf77482876b42393fe43b48fdfe16.tar.bz2
gdb: remove internalvar_funcs::destroy
No kind of internal var uses it remove it. This makes the transition to using a variant easier, since we don't need to think about where this should be called (in a destructor or not), if it can throw, etc. Change-Id: Iebbc867d1ce6716480450d9790410d6684cbe4dd
-rw-r--r--gdb/break-catch-throw.c1
-rw-r--r--gdb/inferior.c1
-rw-r--r--gdb/infrun.c1
-rw-r--r--gdb/probe.c1
-rw-r--r--gdb/thread.c2
-rw-r--r--gdb/tracepoint.c1
-rw-r--r--gdb/value.c5
-rw-r--r--gdb/value.h6
-rw-r--r--gdb/windows-tdep.c1
9 files changed, 0 insertions, 19 deletions
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index d34e5f9..fcd644e 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -510,7 +510,6 @@ static const struct internalvar_funcs exception_funcs =
{
compute_exception,
NULL,
- NULL
};
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 1abdde3..965ae65 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -982,7 +982,6 @@ static const struct internalvar_funcs inferior_funcs =
{
inferior_id_make_value,
NULL,
- NULL
};
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 5311822..85d8404 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -9368,7 +9368,6 @@ static const struct internalvar_funcs siginfo_funcs =
{
siginfo_make_value,
NULL,
- NULL
};
/* Callback for infrun's target events source. This is marked when a
diff --git a/gdb/probe.c b/gdb/probe.c
index 278b36c..f0a40f5 100644
--- a/gdb/probe.c
+++ b/gdb/probe.c
@@ -866,7 +866,6 @@ static const struct internalvar_funcs probe_funcs =
{
compute_probe_arg,
compile_probe_arg,
- NULL
};
diff --git a/gdb/thread.c b/gdb/thread.c
index 12f3abd..9d0693b 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -2123,7 +2123,6 @@ static const struct internalvar_funcs thread_funcs =
{
thread_id_per_inf_num_make_value,
NULL,
- NULL
};
/* Implementation of `gthread' variable. */
@@ -2132,7 +2131,6 @@ static const struct internalvar_funcs gthread_funcs =
{
global_thread_id_make_value,
NULL,
- NULL
};
void _initialize_thread ();
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 73ebc38..9386880 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -3985,7 +3985,6 @@ traceframe_available_memory (std::vector<mem_range> *result,
static const struct internalvar_funcs sdata_funcs =
{
sdata_make_value,
- NULL,
NULL
};
diff --git a/gdb/value.c b/gdb/value.c
index 7609996..080af48 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -2449,11 +2449,6 @@ clear_internalvar (struct internalvar *var)
xfree (var->u.string);
break;
- case INTERNALVAR_MAKE_VALUE:
- if (var->u.make_value.functions->destroy != NULL)
- var->u.make_value.functions->destroy (var->u.make_value.data);
- break;
-
default:
break;
}
diff --git a/gdb/value.h b/gdb/value.h
index 0de4b5f..f7b2902 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -1002,12 +1002,6 @@ struct internalvar_funcs
struct agent_expr *expr,
struct axs_value *value,
void *data);
-
- /* If non-NULL, this is called to destroy DATA. The DATA argument
- passed to this function is the same argument that was passed to
- `create_internalvar_type_lazy'. */
-
- void (*destroy) (void *data);
};
extern struct internalvar *create_internalvar_type_lazy (const char *name,
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index 13be3e4..91fecd6 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -970,7 +970,6 @@ static const struct internalvar_funcs tlb_funcs =
{
tlb_make_value,
NULL,
- NULL
};
/* Layout of an element of a PE's Import Directory Table. Based on: