contrib/gdb-7/gdb/linespec.c
static int
symbol_to_sal (struct symtab_and_line *result,
	       int funfirstline, struct symbol *sym)
{
  if (SYMBOL_CLASS (sym) == LOC_BLOCK)
    {
      *result = find_function_start_sal (sym, funfirstline);
      return 1;
    }
  else
    {
      if (SYMBOL_CLASS (sym) == LOC_LABEL && SYMBOL_VALUE_ADDRESS (sym) != 0)
	{
	  init_sal (result);
	  result->symtab = SYMBOL_SYMTAB (sym);
	  result->line = SYMBOL_LINE (sym);
	  result->pc = SYMBOL_VALUE_ADDRESS (sym);
	  result->pspace = SYMTAB_PSPACE (SYMBOL_SYMTAB (sym));
	  result->explicit_pc = 1;
	  return 1;
	}
      else if (funfirstline)
	{
	  /* Nothing.  */
	}
      else if (SYMBOL_LINE (sym) != 0)
	{
	  /* We know its line number.  */
	  init_sal (result);
	  result->symtab = SYMBOL_SYMTAB (sym);
	  result->line = SYMBOL_LINE (sym);
	  result->pspace = SYMTAB_PSPACE (SYMBOL_SYMTAB (sym));
	  return 1;
	}
    }

  return 0;
}
/* Now come some functions that are called from multiple places within
   decode_line_1.  */
Now come some functions that are called from multiple places within
decode_line_1.
Now come some functions that are called from multiple places within decode_line_1 .
static int
symbol_to_sal (struct symtab_and_line *result,
	       int funfirstline, struct symbol *sym)
{
  if (SYMBOL_CLASS (sym) == LOC_BLOCK)
    {
      *result = find_function_start_sal (sym, funfirstline);
      return 1;
    }
  else
    {
      if (SYMBOL_CLASS (sym) == LOC_LABEL && SYMBOL_VALUE_ADDRESS (sym) != 0)
	{
	  init_sal (result);
	  result->symtab = SYMBOL_SYMTAB (sym);
	  result->line = SYMBOL_LINE (sym);
	  result->pc = SYMBOL_VALUE_ADDRESS (sym);
	  result->pspace = SYMTAB_PSPACE (SYMBOL_SYMTAB (sym));
	  result->explicit_pc = 1;
	  return 1;
	}
      else if (funfirstline)
	{
	}
      else if (SYMBOL_LINE (sym) != 0)
	{
	  init_sal (result);
	  result->symtab = SYMBOL_SYMTAB (sym);
	  result->line = SYMBOL_LINE (sym);
	  result->pspace = SYMTAB_PSPACE (SYMBOL_SYMTAB (sym));
	  return 1;
	}
    }
  return 0;
}
static int symbol_to_sal ( struct symtab_and_line * result , int funfirstline , struct symbol * sym ) { if ( SYMBOL_CLASS ( sym ) == LOC_BLOCK ) { * result = find_function_start_sal ( sym , funfirstline ) ; return 1 ; } else { if ( SYMBOL_CLASS ( sym ) == LOC_LABEL && SYMBOL_VALUE_ADDRESS ( sym ) != 0 ) { init_sal ( result ) ; result -> symtab = SYMBOL_SYMTAB ( sym ) ; result -> line = SYMBOL_LINE ( sym ) ; result -> pc = SYMBOL_VALUE_ADDRESS ( sym ) ; result -> pspace = SYMTAB_PSPACE ( SYMBOL_SYMTAB ( sym ) ) ; result -> explicit_pc = 1 ; return 1 ; } else if ( funfirstline ) { } else if ( SYMBOL_LINE ( sym ) != 0 ) { init_sal ( result ) ; result -> symtab = SYMBOL_SYMTAB ( sym ) ; result -> line = SYMBOL_LINE ( sym ) ; result -> pspace = SYMTAB_PSPACE ( SYMBOL_SYMTAB ( sym ) ) ; return 1 ; } } return 0 ; }
Now come some functions that are called from multiple places within
decode_line_1.
Now come some functions that are called from multiple places within decode_line_1 .
/* Nothing.  */ /* We know its line number.  */