contrib/gdb-7/gdb/jit.c
static void
jit_object_close_impl (struct gdb_symbol_callbacks *cb,
                       struct gdb_object *obj)
{
  struct gdb_symtab *i, *j;
  struct objfile *objfile;
  jit_dbg_reader_data *priv_data;

  priv_data = cb->priv_data;

  objfile = allocate_objfile (NULL, 0);
  objfile->gdbarch = target_gdbarch;

  objfile->msymbols = obstack_alloc (&objfile->objfile_obstack,
                                     sizeof (struct minimal_symbol));
  memset (objfile->msymbols, 0, sizeof (struct minimal_symbol));

  xfree (objfile->name);
  objfile->name = xstrdup ("<< JIT compiled code >>");

  j = NULL;
  for (i = obj->symtabs; i; i = j)
    {
      j = i->next;
      finalize_symtab (i, objfile);
    }
  add_objfile_entry (objfile, *priv_data);
  xfree (obj);
}
/* Called when closing a gdb_objfile.  Converts OBJ to a proper
   objfile.  */
Called when closing a gdb_objfile.  Converts OBJ to a proper
objfile.
Called when closing a gdb_objfile . Converts OBJ to a proper objfile .
static void
jit_object_close_impl (struct gdb_symbol_callbacks *cb,
                       struct gdb_object *obj)
{
  struct gdb_symtab *i, *j;
  struct objfile *objfile;
  jit_dbg_reader_data *priv_data;
  priv_data = cb->priv_data;
  objfile = allocate_objfile (NULL, 0);
  objfile->gdbarch = target_gdbarch;
  objfile->msymbols = obstack_alloc (&objfile->objfile_obstack,
                                     sizeof (struct minimal_symbol));
  memset (objfile->msymbols, 0, sizeof (struct minimal_symbol));
  xfree (objfile->name);
  objfile->name = xstrdup ("<< JIT compiled code >>");
  j = NULL;
  for (i = obj->symtabs; i; i = j)
    {
      j = i->next;
      finalize_symtab (i, objfile);
    }
  add_objfile_entry (objfile, *priv_data);
  xfree (obj);
}
static void jit_object_close_impl ( struct gdb_symbol_callbacks * cb , struct gdb_object * obj ) { struct gdb_symtab * i , * j ; struct objfile * objfile ; jit_dbg_reader_data * priv_data ; priv_data = cb -> priv_data ; objfile = allocate_objfile ( NULL , 0 ) ; objfile -> gdbarch = target_gdbarch ; objfile -> msymbols = obstack_alloc ( & objfile -> objfile_obstack , sizeof ( struct minimal_symbol ) ) ; memset ( objfile -> msymbols , 0 , sizeof ( struct minimal_symbol ) ) ; xfree ( objfile -> name ) ; objfile -> name = xstrdup ( " " ) ; j = NULL ; for ( i = obj -> symtabs ; i ; i = j ) { j = i -> next ; finalize_symtab ( i , objfile ) ; } add_objfile_entry ( objfile , * priv_data ) ; xfree ( obj ) ; }
Called when closing a gdb_objfile.
Called when closing a gdb_objfile .