From b427c1bc161e6e0dcbce0c27b385b3ecb9c47552 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 15 Jan 2014 09:40:13 -0700 Subject: remove exec_set_find_memory_regions exec_set_find_memory_regions is used to modify the exec target. However, it only has a single caller, and so it is much clearer to simply set the appropriate field directly. It's also better for the coming multi-target world to avoid this kind of global state change anyway. 2014-02-19 Tom Tromey * gcore.h (objfile_find_memory_regions): Declare. * gcore.c (objfile_find_memory_regions): No longer static. Add "self" argument. (_initialize_gcore): Don't call exec_set_find_memory_regions. * exec.c: Include gcore.h. (exec_set_find_memory_regions): Remove. (exec_find_memory_regions): Remove. (exec_do_find_memory_regions): Remove. (init_exec_ops): Update. * defs.h (exec_set_find_memory_regions): Remove. --- gdb/gcore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/gcore.c') diff --git a/gdb/gcore.c b/gdb/gcore.c index 67fbf30..b80a97b 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -471,8 +471,9 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read, return 0; } -static int -objfile_find_memory_regions (find_memory_region_ftype func, void *obfd) +int +objfile_find_memory_regions (struct target_ops *self, + find_memory_region_ftype func, void *obfd) { /* Use objfile data to create memory sections. */ struct objfile *objfile; @@ -607,5 +608,4 @@ Save a core file with the current state of the debugged process.\n\ Argument is optional filename. Default filename is 'core.'.")); add_com_alias ("gcore", "generate-core-file", class_files, 1); - exec_set_find_memory_regions (objfile_find_memory_regions); } -- cgit v1.1