Back to index

cell-binutils  2.17cvs20070401
Classes | Typedefs | Functions | Variables
source.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  source_file

Typedefs

typedef struct source_file Source_File

Functions

Source_Filesource_file_lookup_path (const char *)
Source_Filesource_file_lookup_name (const char *)
FILE * annotate_source (Source_File *sf, unsigned int max_width, void(*annote)(char *, unsigned int, int, PTR arg), PTR arg)

Variables

bfd_boolean create_annotation_files
Search_List src_search_list
Source_Filefirst_src_file

Class Documentation

struct source_file

Definition at line 24 of file source.h.

Collaboration diagram for source_file:
Class Members
void ** line
int nalloced
const char * name
unsigned long ncalls
struct source_file * next
int num_lines

Typedef Documentation


Function Documentation

FILE* annotate_source ( Source_File sf,
unsigned int  max_width,
void(*)(char *, unsigned int, int, PTR arg annote,
PTR  arg 
)

Definition at line 65 of file source.c.

{
  const char *fname;
  Source_File *sf;

  /* The user cannot know exactly how a filename will be stored in
     the debugging info (e.g., ../include/foo.h
     vs. /usr/include/foo.h).  So we simply compare the filename
     component of a path only.  */
  for (sf = first_src_file; sf; sf = sf->next)
    {
      fname = strrchr (sf->name, '/');

      if (fname)
       ++fname;
      else
       fname = sf->name;

      if (FILENAME_CMP (filename, fname) == 0)
       break;
    }

  return sf;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 38 of file source.c.

{
  Source_File *sf;

  for (sf = first_src_file; sf; sf = sf->next)
    {
      if (FILENAME_CMP (path, sf->name) == 0)
       break;
    }

  if (!sf)
    {
      /* Create a new source file descriptor.  */
      sf = (Source_File *) xmalloc (sizeof (*sf));

      memset (sf, 0, sizeof (*sf));

      sf->name = xstrdup (path);
      sf->next = first_src_file;
      first_src_file = sf;
    }

  return sf;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 31 of file source.c.

Definition at line 34 of file source.c.

Definition at line 33 of file source.c.