Commit Graph

13 Commits

Author SHA1 Message Date
Joel Brobecker 3b2a0cf216 Fix JIT clang-lli regression (unable to read JIT descriptor from memory)
2011-07-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

        * jit.c (jit_inferior_init): Forward declare.
        (jit_breakpoint_re_set_internal): Call jit_inferior_init.

testsuite/ChangeLog:

2011-07-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

        * gdb.base/jit-so.exp: New test.
        * gdb.base/jit-dlmain.c: New file.
        * gdb.base/jit-main.c: Allow "main" to be elsewhere.
2011-07-06 21:40:17 +00:00
Jan Kratochvil 63524580f8 bfd/
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
	SEC_LOAD.

gdb/
	Fix convert_code_addr_to_desc_addr for ppc64 files after eu-strip.
	* elfread.c (elf_symfile_read): New variable synth_abfd, pass it to
	bfd_get_synthetic_symtab.
	* jit.c (jit_register_code): Pass NULL to the new parameter parent.
	* machoread.c (macho_add_oso_symfile): Pass main_objfile to the new
	parameter parent, remove the call to add_separate_debug_objfile.
	* solib.c (solib_read_symbols): Pass NULL to the new parameter parent.
	* symfile-mem.c (symbol_file_add_from_memory): Likewise.
	* symfile.c (symbol_file_add_with_addrs_or_offsets): New parameter
	parent, new comment for it, call add_separate_debug_objfile for it.
	(symbol_file_add_separate): Pass objfile as the parameter parent,
	remove the call to add_separate_debug_objfile.
	(symbol_file_add_from_bfd): New parameter parent, pass it.
	(symbol_file_add): Pass NULL to the new parameter parent.
	* symfile.h (symbol_file_add_from_bfd): New parameter parent.

gdb/testsuite/
	* gdb.base/eu-strip-infcall.c: New file.
	* gdb.base/eu-strip-infcall.exp: New file.
2011-04-17 18:38:46 +00:00
Paul Pluzhnikov 03673fc718 2011-01-31 Paul Pluzhnikov <ppluzhnikov@google.com>
* breakpoint.h (remove_jit_event_breakpoints): New prototype.
	* breakpoint.c (remove_jit_event_breakpoints): New function.
	* jit.c (jit_descriptor_addr): Delete.
	(registering_code): Delete.
	(clear_int): Delete.
	(jit_inferior_data): New variable.
	(struct jit_inferior_data): New type.
	(get_jit_inferior_data): New function.
	(jit_inferior_data_cleanup): New function.
	(jit_read_descriptor): Adjust.
	(jit_register_code): Adjust.
	(jit_breakpoint_re_set_internal): New function; move code here ...
	(jit_inferior_init): ... from here.
	(jit_breakpoint_re_set): Adjust.
	(jit_reset_inferior_data_and_breakpoints): New function.
	(jit_inferior_created_observer): Adjust.
	(jit_inferior_exit_hook): Adjust.
	(jit_executable_changed_observer): New function.
	(jit_event_handler): Adjust.
	(_initialize_jit): Adjust.
2011-01-31 21:37:01 +00:00
Michael Snyder 1777feb0fe 2011-01-08 Michael Snyder <msnyder@vmware.com>
* h8300-tdep.c: Comment cleanup, mostly periods and spaces.
	* hppa-hpux-tdep.c: Ditto.
	* hppa-linux-nat.c: Ditto.
	* hppa-linux-tdep.c: Ditto.
	* hppanbsd-tdep.c: Ditto.
	* hppa-tdep.c: Ditto.
	* hppa-tdep.h: Ditto.
	* hpux-thread.c: Ditto.
	* i386-cygwin-tdep.c: Ditto.
	* i386-darwin-nat.c: Ditto.
	* i386gnu-nat.c: Ditto.
	* i386-linux-nat.c: Ditto.
	* i386-linux-tdep.c: Ditto.
	* i386-nat.c: Ditto.
	* i386-nat.h: Ditto.
	* i386nbsd-tdep.c: Ditto.
	* i386-sol2-nat.c: Ditto.
	* i386-stub.c: Ditto.
	* i386-tdep.c: Ditto.
	* i386-tdep.h: Ditto.
	* i387-tdep.c: Ditto.
	* ia64-linux-nat.c: Ditto.
	* ia64-linux-tdep.c: Ditto.
	* ia64-tdep.c: Ditto.
	* infcall.c: Ditto.
	* infcall.h: Ditto.
	* infcmd.c: Ditto.
	* inferior.c: Ditto.
	* inferior.h: Ditto.
	* infloop.c: Ditto.
	* inflow.c: Ditto.
	* infrun.c: Ditto.
	* interps.c: Ditto.
	* interps.h: Ditto.
	* iq2000-tdep.c: Ditto.
	* irix5-nat.c: Ditto.
	* jit.c: Ditto.
	* jit.h: Ditto.
	* jv-exp.y: Ditto.
	* jv-lang.c: Ditto.
	* jv-lang.h: Ditto.
	* jv-typeprint.c: Ditto.
	* jv-valprint.c: Ditto.
	* language.c: Ditto.
	* language.h: Ditto.
	* linespec.c: Ditto.
	* linux-fork.c: Ditto.
	* linux-nat.c: Ditto.
	* linux-thread-db.c: Ditto.
	* lm32-tdep.c: Ditto.
2011-01-09 03:08:57 +00:00
Paul Pluzhnikov a255712f65 ChangeLog:
2010-01-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* jit.h (struct jit_code_entry): use ULONGEST for symfile_size.
	* jit.c (jit_debug): New variable.
	(show_jit_debug): New function.
	(struct target_buffer): Use ULONGEST.
	(bfd_open_from_target_memory): Likewise.
	(jit_register_code, jit_inferior_init): Add debug output.
	(_initialize_jit): Register "debug jit" command.

doc/ChangeLog:
2010-01-06  Paul Pluzhnikov  <ppluzhnikov@google.com>

       * gdb.texinfo (Debugging Output): Document "set debug jit".
2011-01-06 19:56:44 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Michael Snyder c6913b7d1e 2010-05-06 Michael Snyder <msnyder@vmware.com>
* xml-support.c (xinclude_start_include): Delete unused variable.
	(xml_process_xincludes): Delete unused variable.
	* xml-syscall.c (syscall_parse_xml): Delete unused variable.
	* target-descriptions.c (tdesc_gdb_type): Delete unused variable.
	(tdesc_find_arch_register): Delete unused variable.
	(tdesc_use_registers): Delete unused variable.
	* xml-tdesc.c (tdesc_start_target): Delete unused variable.
	* inferior.c (print_inferior): Delete unused variable.
	* record.c (record_open_1): Delete unused variable.
	(record_restore): Delete unused variable.
	(cmd_record_save): Delete unused variable.
	* gcore.c (derive_heap_segment): Delete unused variable.
	(objfile_find_memory_regions): Use unused variable.
	* jit.c (jit_inferior_init): Delete unused variable.
	* progspace.c (clone_program_space): Delete unused variable.
	(pspace_empty_p): Delete unused variable.
2010-05-07 02:09:55 +00:00
Vladimir Prus a79b8f6ea8 Multiexec MI
* breakpoint.c (clear_syscall_counts): Take struct inferior*.
	* inferior.c (add_inferior_silent): Notify inferior_added
	observer.
	(delete_inferior_1): Notify inferior_removed observer.
	(exit_inferior_1): Pass inferior, not pid, to observer.
	(inferior_appeared): Likewise.
	(add_inferior_with_spaces): New.
	(add_inferior_command): Use the above.
	* inferior.h (delete_inferior_1, add_inferior_with_spaces):
	Declare.

	* inflow.c (inflow_inferior_exit): Likewise.
	* jit.c (jit_inferior_exit_hook): Likewise.

	* mi/mi-cmds.c (mi_cmds): Register add-inferior and
	remove-inferior.
	* mi/mi-cmds.h (mi_cmd_add_inferior, mi_cmd_remove_inferior): New.
	* mi/mi-interp.c (mi_inferior_added, mi_inferior_removed): New.
	(report_initial_inferior): New.
	(mi_inferior_removed): Register the above. Make sure
	inferior_added observer is called on the first inferior.
	(mi_new_thread, mi_thread_exit): Thread group is now identified by
	inferior number, not pid.
	(mi_solib_loaded, mi_solib_unloaded): Report which inferiors are
	affected.
	* mi/mi-main.c (current_context): New.
	(proceed_thread_callback): Use typed closure.
	Proceed everything if pid is 0. Most implementation split into
	(proceed_thread): ... this.
	(run_one_inferior): New.
	(mi_cmd_exec_continue, mi_cmd_exec_interrupt, mi_cmd_exec_run):
	Adjust for multiexec behaviour.
	(mi_cmd_add_inferior, mi_cmd_remove_inferior): New.
	(mi_cmd_execute): Handle the 'thread-group' option here.
	Do some extra checks.
	* mi-parse.c (mi_parse): Handle the --all and --thread-group
	options.
	* mi-parse.h (struct mi_parse): New fields all and thread_group.
2010-02-24 07:51:46 +00:00
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Tom Tromey 04a679b8f5 * xcoffread.c (scan_xcoff_symtab): Update.
* symfile.h (add_psymbol_to_list): Update prototype.
	* symfile.c (add_psymbol_to_bcache): Add copy_name argument.
	(add_psymbol_to_list): Likewise.
	* stabsread.c (define_symbol): Update.
	* mdebugread.c (parse_partial_symbols): Update.
	(handle_psymbol_enumerators): Update.
	(new_symbol): Update.
	* dbxread.c (read_dbx_symtab): Update.
	* coffread.c (process_coff_symbol): Update.
	* symtab.h (prim_record_minimal_symbol_full): Declare.
	(SYMBOL_SET_NAMES): Add copy_name argument.
	* symtab.c (struct demangled_name_entry): New struct.
	(hash_demangled_name_entry): New function.
	(eq_demangled_name_entry): Likewise.
	(create_demangled_names_hash): Use new functions.
	(symbol_set_names): Use struct demangled_name_entry.  Add
	copy_name argument.
	* minsyms.c (prim_record_minimal_symbol_full): New function.
	(prim_record_minimal_symbol_and_info): Use it.
	* elfread.c (record_minimal_symbol): Add name_len and copy_name
	arguments.  Call prim_record_minimal_symbol_full.
	(elf_symtab_read): Add copy_names argument.
	(elf_symfile_read): Update calls to elf_symtab_read.
	* dwarf2read.c (add_partial_symbol): Don't copy symbol names.
	(load_partial_dies): Likewise.
	(new_symbol): Likewise.
	* cp-namespace.c (check_one_possible_namespace_symbol): Don't save
	name on the obstack.  Update call to SYMBOL_SET_NAMES.
2009-11-16 18:40:23 +00:00
Doug Evans dfdbc9b4c0 * jit.c (jit_event_handler): Use paddress to print target addresses.
Wrap printf string in _().
2009-08-21 19:07:01 +00:00
Doug Evans 0756c555b5 * jit.c (jit_read_descriptor): New arg gdbarch, all callers updated.
(jit_read_code_entry, jit_register_code): Ditto.
	(jit_event_handler): Ditto.
	(jit_inferior_init): Renamed from previous jit_inferior_created_hook.
	(jit_inferior_created_hook, jit_breakpoint_re_set): New functions.
	(jit_inferior_created_observer): Renamed from
	jit_inferior_created_hook1, all callers updated.
	* jit.h (jit_breakpoint_re_set): Declare.
	(jit_event_handler): Update prototype.
	* breakpoint.c (breakpoint_re_set): Call jit_breakpoint_re_set instead
	of jit_inferior_created_hook.
2009-08-21 18:54:44 +00:00
Doug Evans 4efc650796 Add interface for JIT code generation.
* NEWS: Announce JIT interface.
	* Makefile.in (SFILES): Add jit.c.
	(HFILES_NO_SRCDIR): Add jit.h.
	(COMMON_OBS): Add jit.o.
	* jit.c: New file.
	* jit.h: New file.
	* breakpoint.h (enum bptype): Add bp_jit_event to enum.
	* breakpoint.c:
	(update_breakpoints_after_exec): Delete jit breakpoints after exec.
	(bpstat_what): Update event table for bp_jit_event.
	(print_it_typical): Added case for bp_jit_event.
	(print_one_breakpoint_location): Added case for bp_jit_event.
	(allocate_bp_location): Added case for bp_jit_event.
	(mention): Added case for bp_jit_event.
	(delete_command): Added case for bp_jit_event.
	(breakpoint_re_set_one): Added case for bp_jit_event.
	(breakpoint_re_set): Added call to jit_inferior_created_hook.
	(create_jit_event_breakpoint): New.
	* infrun.c (handle_inferior_event): Add handler for jit event.
	(follow_exec): Add call to jit_inferior_created_hook.
	* doc/gdb.texinfo: Add chapter on JIT interface.
2009-08-20 18:02:48 +00:00