Back to index

cell-binutils  2.17cvs20070401
Functions
debug.c File Reference
#include "as.h"
#include "subsegs.h"

Go to the source code of this file.

Functions

 dmp_frags ()
 dmp_frag (struct frag *fp, char *indent)
 var_chars (struct frag *fp, int n)

Function Documentation

dmp_frag ( struct frag fp,
char *  indent 
)

Definition at line 52 of file debug.c.

{
  for (; fp; fp = fp->fr_next)
    {
      printf ("%sFRAGMENT @ 0x%x\n", indent, fp);
      switch (fp->fr_type)
       {
       case rs_align:
         printf ("%srs_align(%d)\n", indent, fp->fr_offset);
         break;
       case rs_fill:
         printf ("%srs_fill(%d)\n", indent, fp->fr_offset);
         printf ("%s", indent);
         var_chars (fp, fp->fr_var + fp->fr_fix);
         printf ("%s\t repeated %d times,", indent, fp->fr_offset);
         printf (" fixed length if # chars == 0)\n");
         break;
       case rs_org:
         printf ("%srs_org(%d+sym @0x%x)\n", indent,
                fp->fr_offset, fp->fr_symbol);
         printf ("%sfill with ", indent);
         var_chars (fp, 1);
         printf ("\n");
         break;
       case rs_machine_dependent:
         printf ("%smachine_dep\n", indent);
         break;
       default:
         printf ("%sunknown type\n", indent);
         break;
       }
      printf ("%saddr=%d(0x%x)\n", indent, fp->fr_address, fp->fr_address);
      printf ("%sfr_fix=%d\n", indent, fp->fr_fix);
      printf ("%sfr_var=%d\n", indent, fp->fr_var);
      printf ("%sfr_offset=%d\n", indent, fp->fr_offset);
      printf ("%schars @ 0x%x\n", indent, fp->fr_literal);
      printf ("\n");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

dmp_frags ( )

Definition at line 26 of file debug.c.

{
  asection *s;
  frchainS *chp;
  char *p;

  for (s = stdoutput->sections; s; s = s->next)
    for (chp = seg_info (s)->frchainP; chp; chp = chp->frch_next)
      {
       switch (s)
         {
         case SEG_DATA:
           p = "Data";
           break;
         case SEG_TEXT:
           p = "Text";
           break;
         default:
           p = "???";
           break;
         }
       printf ("\nSEGMENT %s %d\n", p, chp->frch_subseg);
       dmp_frag (chp->frch_root, "\t");
      }
}

Here is the call graph for this function:

var_chars ( struct frag fp,
int  n 
)

Definition at line 94 of file debug.c.

{
  unsigned char *p;

  for (p = (unsigned char *) fp->fr_literal; n; n--, p++)
    {
      printf ("%02x ", *p);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function: