contrib/gdb-7/gdb/jit.c
static int
jit_reader_try_read_symtab (struct jit_code_entry *code_entry,
                            CORE_ADDR entry_addr)
{
  void *gdb_mem;
  int status;
  struct jit_dbg_reader *i;
  jit_dbg_reader_data priv_data;
  struct gdb_reader_funcs *funcs;
  volatile struct gdb_exception e;
  struct gdb_symbol_callbacks callbacks =
    {
      jit_object_open_impl,
      jit_symtab_open_impl,
      jit_block_open_impl,
      jit_symtab_close_impl,
      jit_object_close_impl,

      jit_symtab_line_mapping_add_impl,
      jit_target_read_impl,

      &priv_data
    };

  priv_data = entry_addr;

  if (!loaded_jit_reader)
    return 0;

  gdb_mem = xmalloc (code_entry->symfile_size);

  status = 1;
  TRY_CATCH (e, RETURN_MASK_ALL)
    if (target_read_memory (code_entry->symfile_addr, gdb_mem,
                            code_entry->symfile_size))
      status = 0;
  if (e.reason < 0)
    status = 0;

  if (status)
    {
      funcs = loaded_jit_reader->functions;
      if (funcs->read (funcs, &callbacks, gdb_mem, code_entry->symfile_size)
          != GDB_SUCCESS)
        status = 0;
    }

  xfree (gdb_mem);
  if (jit_debug && status == 0)
    fprintf_unfiltered (gdb_stdlog,
                        "Could not read symtab using the loaded JIT reader.\n");
  return status;
}
/* Try to read CODE_ENTRY using the loaded jit reader (if any).
   ENTRY_ADDR is the address of the struct jit_code_entry in the
   inferior address space.  */
Try to read CODE_ENTRY using the loaded jit reader (if any).
ENTRY_ADDR is the address of the struct jit_code_entry in the
inferior address space.
Try to read CODE_ENTRY using the loaded jit reader ( if any ) . ENTRY_ADDR is the address of the struct jit_code_entry in the inferior address space .
static int
jit_reader_try_read_symtab (struct jit_code_entry *code_entry,
                            CORE_ADDR entry_addr)
{
  void *gdb_mem;
  int status;
  struct jit_dbg_reader *i;
  jit_dbg_reader_data priv_data;
  struct gdb_reader_funcs *funcs;
  volatile struct gdb_exception e;
  struct gdb_symbol_callbacks callbacks =
    {
      jit_object_open_impl,
      jit_symtab_open_impl,
      jit_block_open_impl,
      jit_symtab_close_impl,
      jit_object_close_impl,
      jit_symtab_line_mapping_add_impl,
      jit_target_read_impl,
      &priv_data
    };
  priv_data = entry_addr;
  if (!loaded_jit_reader)
    return 0;
  gdb_mem = xmalloc (code_entry->symfile_size);
  status = 1;
  TRY_CATCH (e, RETURN_MASK_ALL)
    if (target_read_memory (code_entry->symfile_addr, gdb_mem,
                            code_entry->symfile_size))
      status = 0;
  if (e.reason < 0)
    status = 0;
  if (status)
    {
      funcs = loaded_jit_reader->functions;
      if (funcs->read (funcs, &callbacks, gdb_mem, code_entry->symfile_size)
          != GDB_SUCCESS)
        status = 0;
    }
  xfree (gdb_mem);
  if (jit_debug && status == 0)
    fprintf_unfiltered (gdb_stdlog,
                        "Could not read symtab using the loaded JIT reader.\n");
  return status;
}
static int jit_reader_try_read_symtab ( struct jit_code_entry * code_entry , CORE_ADDR entry_addr ) { void * gdb_mem ; int status ; struct jit_dbg_reader * i ; jit_dbg_reader_data priv_data ; struct gdb_reader_funcs * funcs ; volatile struct gdb_exception e ; struct gdb_symbol_callbacks callbacks = { jit_object_open_impl , jit_symtab_open_impl , jit_block_open_impl , jit_symtab_close_impl , jit_object_close_impl , jit_symtab_line_mapping_add_impl , jit_target_read_impl , & priv_data } ; priv_data = entry_addr ; if ( ! loaded_jit_reader ) return 0 ; gdb_mem = xmalloc ( code_entry -> symfile_size ) ; status = 1 ; TRY_CATCH ( e , RETURN_MASK_ALL ) if ( target_read_memory ( code_entry -> symfile_addr , gdb_mem , code_entry -> symfile_size ) ) status = 0 ; if ( e . reason < 0 ) status = 0 ; if ( status ) { funcs = loaded_jit_reader -> functions ; if ( funcs -> read ( funcs , & callbacks , gdb_mem , code_entry -> symfile_size ) != GDB_SUCCESS ) status = 0 ; } xfree ( gdb_mem ) ; if ( jit_debug && status == 0 ) fprintf_unfiltered ( gdb_stdlog , " \n " ) ; return status ; }
Try to read CODE_ENTRY using the loaded jit reader (if any).
Try to read CODE_ENTRY using the loaded jit reader ( if any ) .