public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-sergiodj-stap: remove dead code
@ 2011-02-10 15:48 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2011-02-10 15:48 UTC (permalink / raw)
To: archer-commits
The branch, archer-sergiodj-stap has been updated
via 1485d74a5bd6bc4af25082baa440cfafaf3ff007 (commit)
from e9ec530391b82ff9a1f416329f16dbe9163f775e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 1485d74a5bd6bc4af25082baa440cfafaf3ff007
Author: Tom Tromey <tromey@redhat.com>
Date: Thu Feb 10 08:47:57 2011 -0700
remove dead code
-----------------------------------------------------------------------
Summary of changes:
gdb/stap-probe.c | 101 ------------------------------------------------------
1 files changed, 0 insertions(+), 101 deletions(-)
First 500 lines of diff:
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 96d2e57..7230a49 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -27,7 +27,6 @@
#include "command.h"
#include "filenames.h"
#include "value.h"
-#include "bfd/elf-bfd.h"
#include "exceptions.h"
#include <ctype.h>
@@ -429,106 +428,6 @@ compute_marker_arg (struct gdbarch *arch, struct internalvar *ivar,
frame, sel);
}
-#if 0
-static void
-handle_probe (struct sdt_note *el, struct stap_probe *ret, bfd *obfd)
-{
-}
-
-struct stap_probe *
-get_stap_probes (struct objfile *objfile, int *num_probes)
-{
-#if 0
- /* Array containing all the systemtap markers from the objfile. */
-// struct stap_marker *objprobes;
- struct obj_section *iter, *probe_section;
-
- Elf_Internal_Shdr **elf_shdrs, *probe_shdr;
- unsigned int num_secs;
- /* Initial section address. */
- bfd_vma base = (bfd_vma) -1;
-#endif
- struct stap_probe *ret = NULL;
- bfd *obfd = objfile->obfd;
- struct sdt_note *iter;
- int i;
-
- *num_probes = 0;
-
- if (! elf_tdata (obfd)->sdt_note_head)
- /* There isn't any probe here. */
- return NULL;
-
- /* Allocating space for probe info. */
- for (iter = elf_tdata (obfd)->sdt_note_head; iter; iter = iter->next, ++*num_probes);
-
- ret = xmalloc (*num_probes * sizeof (struct stap_probe));
-
- for (iter = elf_tdata (obfd)->sdt_note_head, i = 0; iter; iter = iter->next, i++)
- handle_probe (iter, &ret[i], obfd);
-
-#if 0
- /* Maybe this part isn't needed since we end up traversing the list of
- sections anyway below. */
- probe_section = NULL;
- ALL_OBJFILE_OSECTIONS (objfile, iter)
- if (strncmp (STAP_PROBE_SECTION, iter->the_bfd_section->name,
- strlen (STAP_PROBE_SECTION)) == 0)
- {
- probe_section = iter;
- break;
- }
-
- if (!probe_section)
- /* No probes in this objfile. */
- return NULL;
- /* -- end of maybe-uneeded part. -- */
-
- elf_shdrs = elf_elfsections (obfd);
- if (!elf_shdrs)
- /* No sections were returned. We cannot parse the objfile. */
- return NULL;
-
- num_secs = elf_numsections (obfd);
-// elf_shdrs = elf_elfsections (probe_section->the_bfd_section->owner);
-// num_secs = elf_numsections (probe_section->the_bfd_section->owner);
-
- probe_shdr = NULL;
- for (i = 0; i < num_secs; i++)
- {
- switch (elf_shdrs[i]->sh_type)
- {
- case SHT_NOTE:
- if (!(elf_shdrs[i]->sh_flags & SHF_ALLOC))
- {
- }
- break;
- case SHT_PROGBITS:
- if (base == (bfd_vma) -1
- && (elf_shdrs[i]->sh_flags & SHF_ALLOC)
- && elf_shdrs[i]->sh_name
- && !strcmp (bfd_elf_string_from_elf_section (obfd,
- elf_shdrs[i]->sh_link,
- elf_shdrs[i]->sh_name),
- STAP_BASE_SECTION))
- base = elf_shdrs[i]->sh_addr;
- break;
- }
- }
-#endif
-#if 0
- /* FIXME: There must be a better way for this. */
- if (strncmp (STAP_PROBE_SECTION, elf_shdrs[i]->bfd_section->name,
- strlen (STAP_PROBE_SECTION)) == 0)
- {
- probe_shdr = elf_shdrs[i];
- break;
- }
-#endif
-
- return ret;
-}
-#endif
\f
void
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-10 15:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 15:48 [SCM] archer-sergiodj-stap: remove dead code tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).