/* Handle Darwin shared libraries for GDB, the GNU Debugger.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
This file is part of GDB.
/* Current all_image_infos version. */
#define DYLD_VERSION_MIN 1
-#define DYLD_VERSION_MAX 14
+#define DYLD_VERSION_MAX 15
/* Per PSPACE specific data. */
struct darwin_info
struct lm_info_darwin : public lm_info_base
{
/* The target location of lm. */
- CORE_ADDR lm_addr;
+ CORE_ADDR lm_addr = 0;
};
/* Lookup the value for a specific symbol. */
Note that darwin-nat.c implements pid_to_exec_file. */
static int
-open_symbol_file_object (void *from_ttyp)
+open_symbol_file_object (int from_tty)
{
return 0;
}
newobj = XCNEW (struct so_list);
old_chain = make_cleanup (xfree, newobj);
- lm_info_darwin *li = XCNEW (lm_info_darwin);
+ lm_info_darwin *li = new lm_info_darwin;
newobj->lm_info = li;
strncpy (newobj->so_name, file_path, SO_NAME_MAX_PATH_SIZE - 1);
static void
darwin_free_so (struct so_list *so)
{
- xfree (so->lm_info);
+ lm_info_darwin *li = (lm_info_darwin *) so->lm_info;
+
+ delete li;
}
/* The section table is built from bfd sections using bfd VMAs.
struct target_so_ops darwin_so_ops;
-/* -Wmissing-prototypes */
-extern initialize_file_ftype _initialize_darwin_solib;
-
void
_initialize_darwin_solib (void)
{