diff options
Diffstat (limited to 'gdb/gcore.c')
-rw-r--r-- | gdb/gcore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gcore.c b/gdb/gcore.c index 1ebff2a..3e05c61 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -387,9 +387,9 @@ make_output_phdrs (bfd *obfd, asection *osec, void *ignored) int p_type = 0; /* FIXME: these constants may only be applicable for ELF. */ - if (strncmp (bfd_section_name (obfd, osec), "load", 4) == 0) + if (startswith (bfd_section_name (obfd, osec), "load")) p_type = PT_LOAD; - else if (strncmp (bfd_section_name (obfd, osec), "note", 4) == 0) + else if (startswith (bfd_section_name (obfd, osec), "note")) p_type = PT_NOTE; else p_type = PT_NULL; @@ -562,7 +562,7 @@ gcore_copy_callback (bfd *obfd, asection *osec, void *ignored) return; /* Only interested in "load" sections. */ - if (strncmp ("load", bfd_section_name (obfd, osec), 4) != 0) + if (!startswith (bfd_section_name (obfd, osec), "load")) return; size = min (total_size, MAX_COPY_BYTES); |