Beispiel #1
0
static void
print_objfile_section_info(bfd *abfd, struct obj_section *asect,
			   const char *string)
{
  flagword flags = bfd_get_section_flags(abfd, asect->the_bfd_section);
  const char *name = bfd_section_name(abfd, asect->the_bfd_section);

  if ((string == NULL) || (*string == '\0')
      || match_substring(string, name)
      || match_bfd_flags(string, flags))
    {
      maint_print_section_info(name, flags, asect->addr, asect->endaddr,
			  (unsigned long)asect->the_bfd_section->filepos);
    }
}
Beispiel #2
0
static void
print_bfd_section_info(bfd *abfd, asection *asect, void *arg)
{
  flagword flags = bfd_get_section_flags(abfd, asect);
  const char *name = bfd_section_name(abfd, asect);

  if ((arg == NULL) || (*((char *)arg) == '\0')
      || match_substring((char *)arg, name)
      || match_bfd_flags((char *)arg, flags))
    {
      CORE_ADDR addr, endaddr;

      addr = bfd_section_vma(abfd, asect);
      endaddr = (addr + bfd_section_size(abfd, asect));
      maint_print_section_info(name, flags, addr, endaddr,
                               (unsigned long)asect->filepos);
    }
}
Beispiel #3
0
static void
print_objfile_section_info (bfd *abfd, 
			    struct obj_section *asect, 
			    const char *string)
{
  flagword flags = bfd_get_section_flags (abfd, asect->the_bfd_section);
  const char *name = bfd_section_name (abfd, asect->the_bfd_section);

  if (string == NULL || *string == '\0'
      || match_substring (string, name)
      || match_bfd_flags (string, flags))
    {
      struct gdbarch *gdbarch = gdbarch_from_bfd (abfd);
      int addr_size = gdbarch_addr_bit (gdbarch) / 8;

      maint_print_section_info (name, flags,
				obj_section_addr (asect),
				obj_section_endaddr (asect),
				asect->the_bfd_section->filepos,
				addr_size);
    }
}
Beispiel #4
0
static void
print_bfd_section_info (bfd *abfd, 
			asection *asect, 
			void *arg)
{
  flagword flags = bfd_get_section_flags (abfd, asect);
  const char *name = bfd_section_name (abfd, asect);

  if (arg == NULL || *((char *) arg) == '\0'
      || match_substring ((char *) arg, name)
      || match_bfd_flags ((char *) arg, flags))
    {
      struct gdbarch *gdbarch = gdbarch_from_bfd (abfd);
      int addr_size = gdbarch_addr_bit (gdbarch) / 8;
      CORE_ADDR addr, endaddr;

      addr = bfd_section_vma (abfd, asect);
      endaddr = addr + bfd_section_size (abfd, asect);
      maint_print_section_info (name, flags, addr, endaddr,
				asect->filepos, addr_size);
    }
}