/* Target-vector operations for controlling win32 child processes, for GDB.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Solutions, A Red Hat Company.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
- */
+ Boston, MA 02111-1307, USA. */
/* by Steve Chamberlain, sac@cygnus.com */
#include "target.h"
#include "gdbcore.h"
#include "command.h"
+#include "completer.h"
+#include "regcache.h"
#include <signal.h>
#include <sys/types.h>
#include <fcntl.h>
thread_info *here = th->next;
th->next = here->next;
(void) CloseHandle (here->h);
- free (here);
+ xfree (here);
}
}
thread_info *here = th->next;
th->next = here->next;
CloseHandle (here->h);
- free (here);
+ xfree (here);
}
}
/* Wait for child to do something. Return pid of child, or -1 in case
of error; store status through argument pointer OURSTATUS. */
static int
-handle_load_dll (PTR dummy ATTRIBUTE_UNUSED)
+handle_load_dll (void *dummy ATTRIBUTE_UNUSED)
{
LOAD_DLL_DEBUG_INFO *event = ¤t_event.u.LoadDll;
DWORD dll_name_ptr;
while ((so = so1) != NULL)
{
so1 = so->next;
- free (so);
+ xfree (so);
}
solib_start.next = NULL;
ourstatus->kind = TARGET_WAITKIND_STOPPED;
}
- free (s);
+ xfree (s);
return gotasig;
}
int
child_xfer_memory (CORE_ADDR memaddr, char *our, int len,
- int write, struct target_ops *target ATTRIBUTE_UNUSED)
+ int write, struct mem_attrib *mem ATTRIBUTE_UNUSED,
+ struct target_ops *target ATTRIBUTE_UNUSED)
{
DWORD done;
if (write)
void
_initialize_inftarg (void)
{
+ struct cmd_list_element *c;
+
init_child_ops ();
- add_com ("dll-symbols", class_files, dll_symbol_command,
- "Load dll library symbols from FILE.");
+ c = add_com ("dll-symbols", class_files, dll_symbol_command,
+ "Load dll library symbols from FILE.");
+ c->completer = filename_completer;
auto_solib_add = 1;
add_com_alias ("sharedlibrary", "dll-symbols", class_alias, 1);
map_code_section_args;
static void
-map_single_dll_code_section (bfd * abfd, asection * sect, PTR obj)
+map_single_dll_code_section (bfd * abfd, asection * sect, void *obj)
{
int old;
int update_coreops;
char *name;
if (dll_name == NULL || target == NULL)
return 0;
- name = strdup (dll_name);
+ name = xstrdup (dll_name);
dll_bfd = bfd_openr (name, "pei-i386");
if (dll_bfd == NULL)
return 0;
map_args.target = target;
map_args.addr = base_addr - bfd_section_vma (dll_bfd, lowest_sect);
- bfd_map_over_sections (dll_bfd, &map_single_dll_code_section, (PTR) (&map_args));
+ bfd_map_over_sections (dll_bfd, &map_single_dll_code_section, (void *) (&map_args));
}
return 1;
}
static void
-core_section_load_dll_symbols (bfd * abfd, asection * sect, PTR obj)
+core_section_load_dll_symbols (bfd * abfd, asection * sect, void *obj)
{
struct target_ops *target = (struct target_ops *) obj;
out:
if (buf)
- free (buf);
+ xfree (buf);
if (dll_name)
- free (dll_name);
+ xfree (dll_name);
return;
}
};
void
-_initialize_core_win32 ()
+_initialize_core_win32 (void)
{
add_core_fns (&win32_elf_core_fns);
}