/* Darwin support for GDB, the GNU debugger.
- Copyright (C) 2008-2014 Free Software Foundation, Inc.
+ Copyright (C) 2008-2015 Free Software Foundation, Inc.
Contributed by AdaCore.
#include "gdbcmd.h"
#include "gdbcore.h"
#include "mach-o.h"
-#include "gdb_assert.h"
#include "aout/stab_gnu.h"
#include "vec.h"
#include "psympriv.h"
#include "complaints.h"
#include "gdb_bfd.h"
-#include <string.h>
-
/* If non-zero displays debugging message. */
static unsigned int mach_o_debug_level = 0;
static int
get_archive_prefix_len (const char *name)
{
- char *lparen;
+ const char *lparen;
int name_len = strlen (name);
if (name_len == 0 || name[name_len - 1] != ')')
const char *bfd_sect_name = osect->the_bfd_section->name;
int sect_index = osect - objfile->sections;;
- if (strncmp (bfd_sect_name, "LC_SEGMENT.", 11) == 0)
+ if (startswith (bfd_sect_name, "LC_SEGMENT."))
bfd_sect_name += 11;
if (strcmp (bfd_sect_name, "__TEXT") == 0
|| strcmp (bfd_sect_name, "__TEXT.__text") == 0)