contrib/gdb-7/gdb/jit.c
static void
jit_symtab_line_mapping_add_impl (struct gdb_symbol_callbacks *cb,
                                  struct gdb_symtab *stab, int nlines,
                                  struct gdb_line_mapping *map)
{
  int i;

  if (nlines < 1)
    return;

  stab->linetable = xmalloc (sizeof (struct linetable)
                             + (nlines - 1) * sizeof (struct linetable_entry));
  stab->linetable->nitems = nlines;
  for (i = 0; i < nlines; i++)
    {
      stab->linetable->item[i].pc = (CORE_ADDR) map[i].pc;
      stab->linetable->item[i].line = map[i].line;
    }
}
/* Readers call this to add a line mapping (from PC to line number) to
   a gdb_symtab.  */
Readers call this to add a line mapping (from PC to line number) to
a gdb_symtab.
Readers call this to add a line mapping ( from PC to line number ) to a gdb_symtab .
static void
jit_symtab_line_mapping_add_impl (struct gdb_symbol_callbacks *cb,
                                  struct gdb_symtab *stab, int nlines,
                                  struct gdb_line_mapping *map)
{
  int i;
  if (nlines < 1)
    return;
  stab->linetable = xmalloc (sizeof (struct linetable)
                             + (nlines - 1) * sizeof (struct linetable_entry));
  stab->linetable->nitems = nlines;
  for (i = 0; i < nlines; i++)
    {
      stab->linetable->item[i].pc = (CORE_ADDR) map[i].pc;
      stab->linetable->item[i].line = map[i].line;
    }
}
static void jit_symtab_line_mapping_add_impl ( struct gdb_symbol_callbacks * cb , struct gdb_symtab * stab , int nlines , struct gdb_line_mapping * map ) { int i ; if ( nlines < 1 ) return ; stab -> linetable = xmalloc ( sizeof ( struct linetable ) + ( nlines - 1 ) * sizeof ( struct linetable_entry ) ) ; stab -> linetable -> nitems = nlines ; for ( i = 0 ; i < nlines ; i ++ ) { stab -> linetable -> item [ i ] . pc = ( CORE_ADDR ) map [ i ] . pc ; stab -> linetable -> item [ i ] . line = map [ i ] . line ; } }
Readers call this to add a line mapping (from PC to line number) to
a gdb_symtab.
Readers call this to add a line mapping ( from PC to line number ) to a gdb_symtab .