projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix zero_ext documentation
[deliverable/binutils-gdb.git]
/
gdb
/
jit.c
diff --git
a/gdb/jit.c
b/gdb/jit.c
index fbc0d02f81d8b5762dcecc8e24b905053922310b..9fd5ae675b0128e5f2d8ba07147c370361f99b46 100644
(file)
--- a/
gdb/jit.c
+++ b/
gdb/jit.c
@@
-1,6
+1,6
@@
/* Handle JIT code generation in the inferior for GDB, the GNU Debugger.
/* Handle JIT code generation in the inferior for GDB, the GNU Debugger.
- Copyright (C) 2009-201
5
Free Software Foundation, Inc.
+ Copyright (C) 2009-201
6
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-177,7
+177,7
@@
jit_reader_load (const char *file_name)
so = gdb_dlopen (file_name);
old_cleanups = make_cleanup_dlclose (so);
so = gdb_dlopen (file_name);
old_cleanups = make_cleanup_dlclose (so);
- init_fn = gdb_dlsym (so, reader_init_fn_sym);
+ init_fn =
(reader_init_fn_type *)
gdb_dlsym (so, reader_init_fn_sym);
if (!init_fn)
error (_("Could not locate initialization function: %s."),
reader_init_fn_sym);
if (!init_fn)
error (_("Could not locate initialization function: %s."),
reader_init_fn_sym);
@@
-491,7
+491,8
@@
typedef CORE_ADDR jit_dbg_reader_data;
static enum gdb_status
jit_target_read_impl (GDB_CORE_ADDR target_mem, void *gdb_buf, int len)
{
static enum gdb_status
jit_target_read_impl (GDB_CORE_ADDR target_mem, void *gdb_buf, int len)
{
- int result = target_read_memory ((CORE_ADDR) target_mem, gdb_buf, len);
+ int result = target_read_memory ((CORE_ADDR) target_mem,
+ (gdb_byte *) gdb_buf, len);
if (result == 0)
return GDB_SUCCESS;
else
if (result == 0)
return GDB_SUCCESS;
else
@@
-819,7
+820,7
@@
static int
jit_reader_try_read_symtab (struct jit_code_entry *code_entry,
CORE_ADDR entry_addr)
{
jit_reader_try_read_symtab (struct jit_code_entry *code_entry,
CORE_ADDR entry_addr)
{
-
void
*gdb_mem;
+
gdb_byte
*gdb_mem;
int status;
jit_dbg_reader_data priv_data;
struct gdb_reader_funcs *funcs;
int status;
jit_dbg_reader_data priv_data;
struct gdb_reader_funcs *funcs;
@@
-842,7
+843,7
@@
jit_reader_try_read_symtab (struct jit_code_entry *code_entry,
if (!loaded_jit_reader)
return 0;
if (!loaded_jit_reader)
return 0;
- gdb_mem = xmalloc (code_entry->symfile_size);
+ gdb_mem =
(gdb_byte *)
xmalloc (code_entry->symfile_size);
status = 1;
TRY
status = 1;
TRY
@@
-1025,7
+1026,7
@@
jit_breakpoint_deleted (struct breakpoint *b)
}
/* (Re-)Initialize the jit breakpoint if necessary.
}
/* (Re-)Initialize the jit breakpoint if necessary.
- Return 0
on success
. */
+ Return 0
if the jit breakpoint has been successfully initialized
. */
static int
jit_breakpoint_re_set_internal (struct gdbarch *gdbarch,
static int
jit_breakpoint_re_set_internal (struct gdbarch *gdbarch,
@@
-1069,7
+1070,7
@@
jit_breakpoint_re_set_internal (struct gdbarch *gdbarch,
paddress (gdbarch, addr));
if (ps_data->cached_code_address == addr)
paddress (gdbarch, addr));
if (ps_data->cached_code_address == addr)
- return
1
;
+ return
0
;
/* Delete the old breakpoint. */
if (ps_data->jit_breakpoint != NULL)
/* Delete the old breakpoint. */
if (ps_data->jit_breakpoint != NULL)
@@
-1366,6
+1367,14
@@
jit_inferior_init (struct gdbarch *gdbarch)
}
}
}
}
+/* inferior_created observer. */
+
+static void
+jit_inferior_created (struct target_ops *ops, int from_tty)
+{
+ jit_inferior_created_hook ();
+}
+
/* Exported routine to call when an inferior has been created. */
void
/* Exported routine to call when an inferior has been created. */
void
@@
-1495,6
+1504,7
@@
_initialize_jit (void)
show_jit_debug,
&setdebuglist, &showdebuglist);
show_jit_debug,
&setdebuglist, &showdebuglist);
+ observer_attach_inferior_created (jit_inferior_created);
observer_attach_inferior_exit (jit_inferior_exit_hook);
observer_attach_breakpoint_deleted (jit_breakpoint_deleted);
observer_attach_inferior_exit (jit_inferior_exit_hook);
observer_attach_breakpoint_deleted (jit_breakpoint_deleted);
This page took
0.026497 seconds
and
4
git commands to generate.