aboutsummaryrefslogtreecommitdiff
path: root/gdb/stap-probe.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-03 10:21:20 -0700
committerTom Tromey <tromey@redhat.com>2014-03-03 12:47:25 -0700
commit5d9cf8a4d31f8c793ad7ba47fe79dac11894052c (patch)
tree187d4c14b2b1e0210be4822c68815aa7efbb8267 /gdb/stap-probe.c
parent729662a5221eaee2b3cd71d79afb3f612c4df904 (diff)
downloadgdb-5d9cf8a4d31f8c793ad7ba47fe79dac11894052c.zip
gdb-5d9cf8a4d31f8c793ad7ba47fe79dac11894052c.tar.gz
gdb-5d9cf8a4d31f8c793ad7ba47fe79dac11894052c.tar.bz2
move probes to be per-bfd
This patch moves the probe data from the objfile to the per-BFD object. This lets the probes be shared between different inferiors (and different objfiles when dlmopen is in use, should gdb ever handle that). 2014-03-03 Tom Tromey <tromey@redhat.com> * elfread.c (probe_key): Change to bfd_data. (elf_get_probes, probe_key_free, _initialize_elfread): Probes are now per-BFD, not per-objfile. * stap-probe.c (stap_probe_destroy): Update comment. (handle_stap_probe): Allocate on the per-BFD obstack.
Diffstat (limited to 'gdb/stap-probe.c')
-rw-r--r--gdb/stap-probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 6bb7323..986debd 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1299,7 +1299,7 @@ stap_compile_to_ax (struct probe *probe_generic, struct agent_expr *expr,
}
/* Destroy (free) the data related to PROBE. PROBE memory itself is not feed
- as it is allocated from OBJFILE_OBSTACK. */
+ as it is allocated on an obstack. */
static void
stap_probe_destroy (struct probe *probe_generic)
@@ -1506,7 +1506,7 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el,
const char *probe_args = NULL;
struct stap_probe *ret;
- ret = obstack_alloc (&objfile->objfile_obstack, sizeof (*ret));
+ ret = obstack_alloc (&objfile->per_bfd->storage_obstack, sizeof (*ret));
ret->p.pops = &stap_probe_ops;
ret->p.arch = gdbarch;