summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reiser <jreiser@BitWagon.com>2011-03-18 08:27:30 -0700
committerWilliam Cohen <wcohen@redhat.com>2011-03-22 10:46:56 -0400
commitedd274866bb762d515144211d5e9f6c8cb7d4c4a (patch)
tree7f79a029c8c549405b1f7d5151091734d81f60e6
parent2a22a88a5a10ce7d3e83d84994fb2bcdbcfd30a2 (diff)
downloadmemstomp-edd274866bb762d515144211d5e9f6c8cb7d4c4a.tar.gz
memstomp-edd274866bb762d515144211d5e9f6c8cb7d4c4a.tar.xz
memstomp-edd274866bb762d515144211d5e9f6c8cb7d4c4a.zip
Flush historical code under "#if 0".
-rw-r--r--backtrace-symbols.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/backtrace-symbols.c b/backtrace-symbols.c
index 3de32a5..8c6ab9a 100644
--- a/backtrace-symbols.c
+++ b/backtrace-symbols.c
@@ -139,51 +139,6 @@ static void find_address_in_section(
arg->pc - vma, &arg->filename, &arg->functionname, &arg->line);
}
-/* Read hexadecimal addresses from stdin, translate into
- file_name:line_number and optionally function name. */
-#if 0
-static void translate_addresses(bfd *abfd, char (*addr)[PTRSTR_LEN], int naddr)
-{
- while (naddr) {
- pc = bfd_scan_vma(addr[naddr-1], NULL, 16);
-
- found = false;
- bfd_map_over_sections(abfd, find_address_in_section,
- (PTR) NULL);
-
- if (!found) {
- printf("[%s] \?\?() \?\?:0\n",addr[naddr-1]);
- } else {
- const char *name;
-
- name = functionname;
- if (name == NULL || *name == '\0')
- name = "??";
- if (filename != NULL) {
- char *h;
-
- h = strrchr(filename, '/');
- if (h != NULL)
- filename = h + 1;
- }
-
- printf("\t%s:%u\t", filename ? filename : "??",
- line);
-
- printf("%s()\n", name);
-
- }
-
- /* fflush() is essential for using this command as a server
- child process that reads addresses from a pipe and responds
- with line number information, processing one address at a
- time. */
- fflush(stdout);
- naddr--;
- }
-}
-#endif
-
static char ** translate_addresses_vec(
bfd *const abfd,
bfd_vma const addr[],