OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [binutils/] [coffdump.c] - Diff between revs 15 and 163

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 15 Rev 163
Line 125... Line 125...
 
 
static void
static void
dump_coff_type (struct coff_type *p)
dump_coff_type (struct coff_type *p)
{
{
  tab (1);
  tab (1);
  printf ("size %d ", p->size);
  printf (_("size %d "), p->size);
 
 
  switch (p->type)
  switch (p->type)
    {
    {
    case coff_secdef_type:
    case coff_secdef_type:
      printf ("section definition at %x size %x\n",
      printf (_("section definition at %x size %x\n"),
              p->u.asecdef.address,
              p->u.asecdef.address,
              p->u.asecdef.size);
              p->u.asecdef.size);
      nl ();
      nl ();
      break;
      break;
    case coff_pointer_type:
    case coff_pointer_type:
      printf ("pointer to");
      printf (_("pointer to"));
      nl ();
      nl ();
      dump_coff_type (p->u.pointer.points_to);
      dump_coff_type (p->u.pointer.points_to);
      break;
      break;
    case coff_array_type:
    case coff_array_type:
      printf ("array [%d] of", p->u.array.dim);
      printf (_("array [%d] of"), p->u.array.dim);
      nl ();
      nl ();
      dump_coff_type (p->u.array.array_of);
      dump_coff_type (p->u.array.array_of);
      break;
      break;
    case coff_function_type:
    case coff_function_type:
      printf ("function returning");
      printf (_("function returning"));
      nl ();
      nl ();
      dump_coff_type (p->u.function.function_returns);
      dump_coff_type (p->u.function.function_returns);
      dump_coff_lines (p->u.function.lines);
      dump_coff_lines (p->u.function.lines);
      printf ("arguments");
      printf (_("arguments"));
      nl ();
      nl ();
      dump_coff_scope (p->u.function.parameters);
      dump_coff_scope (p->u.function.parameters);
      tab (0);
      tab (0);
      printf ("code");
      printf (_("code"));
      nl ();
      nl ();
      dump_coff_scope (p->u.function.code);
      dump_coff_scope (p->u.function.code);
      tab(0);
      tab(0);
      break;
      break;
    case coff_structdef_type:
    case coff_structdef_type:
      printf ("structure definition");
      printf (_("structure definition"));
      nl ();
      nl ();
      dump_coff_scope (p->u.astructdef.elements);
      dump_coff_scope (p->u.astructdef.elements);
      break;
      break;
    case coff_structref_type:
    case coff_structref_type:
      if (!p->u.aenumref.ref)
      if (!p->u.aenumref.ref)
        printf ("structure ref to UNKNOWN struct");
        printf (_("structure ref to UNKNOWN struct"));
      else
      else
        printf ("structure ref to %s", p->u.aenumref.ref->name);
        printf (_("structure ref to %s"), p->u.aenumref.ref->name);
      break;
      break;
    case coff_enumref_type:
    case coff_enumref_type:
      printf ("enum ref to %s", p->u.astructref.ref->name);
      printf (_("enum ref to %s"), p->u.astructref.ref->name);
      break;
      break;
    case coff_enumdef_type:
    case coff_enumdef_type:
      printf ("enum definition");
      printf (_("enum definition"));
      nl ();
      nl ();
      dump_coff_scope (p->u.aenumdef.elements);
      dump_coff_scope (p->u.aenumdef.elements);
      break;
      break;
    case coff_basic_type:
    case coff_basic_type:
      switch (p->u.basic)
      switch (p->u.basic)
Line 247... Line 247...
{
{
  tab (1);
  tab (1);
  switch (p->where)
  switch (p->where)
    {
    {
    case coff_where_stack:
    case coff_where_stack:
      printf ("Stack offset %x", p->offset);
      printf (_("Stack offset %x"), p->offset);
      break;
      break;
    case coff_where_memory:
    case coff_where_memory:
      printf ("Memory section %s+%x", p->section->name, p->offset);
      printf (_("Memory section %s+%x"), p->section->name, p->offset);
      break;
      break;
    case coff_where_register:
    case coff_where_register:
      printf ("Register %d", p->offset);
      printf (_("Register %d"), p->offset);
      break;
      break;
    case coff_where_member_of_struct:
    case coff_where_member_of_struct:
      printf ("Struct Member offset %x", p->offset);
      printf (_("Struct Member offset %x"), p->offset);
      break;
      break;
    case coff_where_member_of_enum:
    case coff_where_member_of_enum:
      printf ("Enum Member offset %x", p->offset);
      printf (_("Enum Member offset %x"), p->offset);
      break;
      break;
    case coff_where_unknown:
    case coff_where_unknown:
      printf ("Undefined symbol");
      printf (_("Undefined symbol"));
      break;
      break;
    case coff_where_strtag:
    case coff_where_strtag:
      printf ("STRTAG");
      printf ("STRTAG");
    case coff_where_entag:
    case coff_where_entag:
      printf ("ENTAG");
      printf ("ENTAG");
Line 329... Line 329...
 
 
static void
static void
dump_coff_symbol (struct coff_symbol *p)
dump_coff_symbol (struct coff_symbol *p)
{
{
  tab (1);
  tab (1);
  printf ("List of symbols");
  printf (_("List of symbols"));
  nl ();
  nl ();
 
 
  while (p)
  while (p)
    {
    {
      tab (1);
      tab (1);
      tab (1);
      tab (1);
      printf ("Symbol  %s, tag %d, number %d", p->name, p->tag, p->number);
      printf (_("Symbol  %s, tag %d, number %d"), p->name, p->tag, p->number);
      nl ();
      nl ();
      tab (-1);
      tab (-1);
      tab (1);
      tab (1);
      printf ("Type");
      printf (_("Type"));
      nl ();
      nl ();
      dump_coff_type (p->type);
      dump_coff_type (p->type);
      tab (-1);
      tab (-1);
      tab (1);
      tab (1);
      printf ("Where");
      printf (_("Where"));
      dump_coff_where (p->where);
      dump_coff_where (p->where);
      tab (-1);
      tab (-1);
      tab (1);
      tab (1);
      printf ("Visible");
      printf (_("Visible"));
      dump_coff_visible (p->visible);
      dump_coff_visible (p->visible);
      tab (-1);
      tab (-1);
      p = p->next;
      p = p->next;
      tab (-1);
      tab (-1);
    }
    }
Line 364... Line 364...
dump_coff_scope (struct coff_scope *p)
dump_coff_scope (struct coff_scope *p)
{
{
  if (p)
  if (p)
    {
    {
      tab (1);
      tab (1);
      printf ("List of blocks %" BFD_VMA_FMT "x ",(bfd_vma) (uintptr_t) p);
      printf ("%s %" BFD_VMA_FMT "x ",
 
              _("List of blocks "), (bfd_vma) (uintptr_t) p);
 
 
      if (p->sec)
      if (p->sec)
        printf( "  %s %x..%x",  p->sec->name,p->offset, p->offset + p->size -1);
        printf( "  %s %x..%x",  p->sec->name,p->offset, p->offset + p->size -1);
 
 
      nl ();
      nl ();
Line 377... Line 378...
      nl ();
      nl ();
 
 
      while (p)
      while (p)
        {
        {
          tab (0);
          tab (0);
          printf ("vars %d", p->nvars);
          printf (_("vars %d"), p->nvars);
          nl ();
          nl ();
          dump_coff_symbol (p->vars_head);
          dump_coff_symbol (p->vars_head);
          printf ("blocks");
          printf (_("blocks"));
          nl ();
          nl ();
          dump_coff_scope (p->list_head);
          dump_coff_scope (p->list_head);
          nl ();
          nl ();
          p = p->next;
          p = p->next;
        }
        }
Line 398... Line 399...
 
 
static void
static void
dump_coff_sfile (struct coff_sfile *p)
dump_coff_sfile (struct coff_sfile *p)
{
{
  tab (1);
  tab (1);
  printf ("List of source files");
  printf (_("List of source files"));
  nl ();
  nl ();
 
 
  while (p)
  while (p)
    {
    {
      tab (0);
      tab (0);
      printf ("Source file %s", p->name);
      printf (_("Source file %s"), p->name);
      nl ();
      nl ();
      dump_coff_scope (p->scope);
      dump_coff_scope (p->scope);
      p = p->next;
      p = p->next;
    }
    }
  tab (-1);
  tab (-1);
Line 418... Line 419...
dump_coff_section (struct coff_section *ptr)
dump_coff_section (struct coff_section *ptr)
{
{
  int i;
  int i;
 
 
  tab (1);
  tab (1);
  printf ("section %s %d %d address %x size %x number %d nrelocs %d",
  printf (_("section %s %d %d address %x size %x number %d nrelocs %d"),
          ptr->name, ptr->code, ptr->data, ptr->address,ptr->size,
          ptr->name, ptr->code, ptr->data, ptr->address,ptr->size,
          ptr->number, ptr->nrelocs);
          ptr->number, ptr->nrelocs);
  nl ();
  nl ();
 
 
  for (i = 0; i < ptr->nrelocs; i++)
  for (i = 0; i < ptr->nrelocs; i++)
Line 443... Line 444...
{
{
  int i;
  int i;
 
 
  printf ("Coff dump");
  printf ("Coff dump");
  nl ();
  nl ();
  printf ("#sources %d", ptr->nsources);
  printf (_("#sources %d"), ptr->nsources);
  nl ();
  nl ();
  dump_coff_sfile (ptr->source_head);
  dump_coff_sfile (ptr->source_head);
 
 
  for (i = 0; i < ptr->nsections; i++)
  for (i = 0; i < ptr->nsections; i++)
    dump_coff_section (ptr->sections + i);
    dump_coff_section (ptr->sections + i);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.