This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
GC generic_search
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 28 Jan 2009 00:14:17 +0000
- Subject: GC generic_search
Happened to notice this. We now have a proper target search interface, and,
this is not likelly to be useful after 15 years...
Checked in.
--
Pedro Alves
2009-01-28 Pedro Alves <pedro@codesourcery.com>
* corefile.c (generic_search): Delete disabled code.
* gdbcore.h (generic_search): Delete declaration.
---
gdb/corefile.c | 34 ----------------------------------
gdb/gdbcore.h | 5 -----
2 files changed, 39 deletions(-)
Index: src/gdb/corefile.c
===================================================================
--- src.orig/gdb/corefile.c 2009-01-27 22:42:57.000000000 +0000
+++ src/gdb/corefile.c 2009-01-27 22:43:11.000000000 +0000
@@ -368,40 +368,6 @@ write_memory_signed_integer (CORE_ADDR a
store_signed_integer (buf, len, value);
write_memory (addr, buf, len);
}
-
-
-
-#if 0
-/* Enable after 4.12. It is not tested. */
-
-/* Search code. Targets can just make this their search function, or
- if the protocol has a less general search function, they can call this
- in the cases it can't handle. */
-void
-generic_search (int len, char *data, char *mask, CORE_ADDR startaddr,
- int increment, CORE_ADDR lorange, CORE_ADDR hirange,
- CORE_ADDR *addr_found, char *data_found)
-{
- int i;
- CORE_ADDR curaddr = startaddr;
-
- while (curaddr >= lorange && curaddr < hirange)
- {
- read_memory (curaddr, data_found, len);
- for (i = 0; i < len; ++i)
- if ((data_found[i] & mask[i]) != data[i])
- goto try_again;
- /* It matches. */
- *addr_found = curaddr;
- return;
-
- try_again:
- curaddr += increment;
- }
- *addr_found = (CORE_ADDR) 0;
- return;
-}
-#endif /* 0 */
/* The current default bfd target. Points to storage allocated for
gnutarget_string. */
Index: src/gdb/gdbcore.h
===================================================================
--- src.orig/gdb/gdbcore.h 2009-01-27 22:43:36.000000000 +0000
+++ src/gdb/gdbcore.h 2009-01-27 22:43:44.000000000 +0000
@@ -82,11 +82,6 @@ extern void write_memory_unsigned_intege
/* Store VALUE at ADDR in the inferior as a LEN-byte unsigned integer. */
extern void write_memory_signed_integer (CORE_ADDR addr, int len,
LONGEST value);
-
-extern void generic_search (int len, char *data, char *mask,
- CORE_ADDR startaddr, int increment,
- CORE_ADDR lorange, CORE_ADDR hirange,
- CORE_ADDR * addr_found, char *data_found);
/* Hook for `exec_file_command' command to call. */