2003-01-05 Martin Baulig <martin@ximian.com>
[mono.git] / mono / jit / ChangeLog
index f840fbe895cd548d2015f06d2f02e53846e5d4d5..2e7d155610e9194e1f1b8da62769d7a48b4a3165 100644 (file)
@@ -1,3 +1,526 @@
+2003-01-05  Martin Baulig  <martin@ximian.com>
+
+       * debug.c (mono_debugger_jit_exec): Custom version of mono_jit_exec();
+       this is used when we're running inside the Mono Debugger 
+       (mono_debugger_wait): Put the waiting code into a function of its own.
+
+       * mono.c (main): Call mono_debugger_jit_exec() instead of
+       mono_jit_exec() if we're running inside the Mono Debugger.
+       
+2003-01-05  Martin Baulig  <martin@ximian.com>
+
+       * debug.h (MonoDebugFormat): Added
+       `MONO_DEBUG_FORMAT_MONO_DEBUGGER'; this allows us to check whether
+       we're running inside the Mono Debugger prior to the args parsing.
+
+2003-01-04  Martin Baulig  <martin@ximian.com>
+
+       * debug.c (release_symbol_file_table): Only call this if we're
+       actually modifying the symbol tables.
+       (mono_debug_open): Always set the `mono_debugger_class_init_func'
+       for MONO_DEBUG_FORMAT_MONO; this stuff should also go into core dumps.
+
+2003-01-03  Martin Baulig  <martin@ximian.com>
+
+       * debug.c: Disable the mono debugger stuff on Windows.
+
+2003-01-03  Martin Baulig  <martin@ximian.com>
+
+       * debug.c (mono_debugger_trampoline_breakpoint_callback): New
+       function.  This is called from the breakpoint trampoline to signal
+       the debugger and wait until it has reload the symbol tables.
+
+       * trampoline.c (get_breakpoint_trampoline): Call the new
+       mono_debugger_trampoline_breakpoint_callback() in the breakpoint
+       trampoline just before the breakpoint.
+
+2002-12-31  Martin Baulig  <martin@ximian.com>
+
+       * debug.c (MonoDebuggerSymbolFileTable): Added `global_symfile'
+       field to point to the MonoGlobalSymbolTable.
+
+2002-12-30  Martin Baulig  <martin@ximian.com>
+
+       * debug.c (MonoDebuggerInfo): Put back `symbol_file_modified'.
+       This variable now specifies that the symbol tables have been
+       modified after the last notification has been send.  The debugger
+       uses this flag to check whether it needs to reload the symbol
+       tables or not.
+       (debugger_compile_method): Just send a notification to the
+       debugger, but don't set the modified flag.  It may or may not be
+       set when the debugger gets the notification - depending on whether
+       the JIT compilation added a new method to the symbol tables.
+
+2002-12-30  Martin Baulig  <martin@ximian.com>
+
+       * debug.c (debugger_compile_method): This is a wrapper around
+       mono_compile_method() which always sends a notification to the
+       debugger.
+
+2002-12-30  Martin Baulig  <martin@ximian.com>
+
+       * debug.c: Reload the symbol file table before sending the
+       notification event to the debugger.
+       (MonoDebuggerInfo): Removed `update_symbol_file_table'.
+
+2002-12-31  Martin Baulig  <martin@ximian.com>
+
+       * debug.c: Propertly lock everything and avoid race conditions.
+       (MonoDebuggerInfo): Removed the `symbol_file_modified' again.
+
+2002-12-31  Duncan Mak  <duncan@ximian.com>
+
+       * debug.c (initialize_debugger_support): Fix build error by
+       declaring ret at the top of the function.
+
+2002-12-30  Martin Baulig  <martin@ximian.com>
+
+       * debug.c: When running under the mono debugger, create a special
+       debugger thread; always protect the symbol tables with a mutex.
+
+2002-12-28  Martin Baulig  <martin@ximian.com>
+
+       * debug.c (MonoDebuggerInfo): Added `symbol_file_modified'; it's
+       incremented each time one of the symbol tables is modified.
+
+Thu Dec 19 18:31:54 CET 2002 Paolo Molaro <lupus@ximian.com>
+
+       * jit.c: fix LDELEMA implementation here as well.
+
+Wed Dec 18 11:42:58 CET 2002 Paolo Molaro <lupus@ximian.com>
+
+       * jit.c: handle CEE_CONV_OVF_U8_UN like CEE_CONV_OVF_I8_UN.
+
+Wed Dec 18 11:36:04 CET 2002 Paolo Molaro <lupus@ximian.com>
+
+       * jit.c: query the thread abort signal from the runtime.
+
+2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
+
+       * jit.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
+
+2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
+
+       * jit.c (mono_analyze_stack): call the utility function 
+       mono_field_from_token to avoid code duplication.
+
+2002-12-02  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (mono_analyze_stack): added some additinal checks to verify IL code
+
+       * x86.brg (stmt): POP floating point stack correctly
+
+2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
+
+       * emit-x86.c (arch_emit_prologue): don't save caller saved
+       registers twice.
+
+       * exception.c (x86_unwind_native_frame): support exceptions inside
+       native code using gcc generated exception tables (-fexception).
+
+2002-11-19  Dietmar Maurer  <dietmar@ximian.com>
+
+       * exception.c: include some code from Zoltan Varga, but modified
+       it slightly.
+
+2002-11-27  Dietmar Maurer  <dietmar@ximian.com>
+
+       * exception.c: massive code cleanups. The code is still
+       architecture dependent, but it should be now possible to reuse the
+       complex parts for other architecture.
+
+2002-11-15  Dick Porter  <dick@ximian.com>
+
+       * jit.c: Pass the attach callback to mono_runtime_init().
+
+2002-11-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * jit.c: display the domain name in trace output.
+
+2002-11-08  Dietmar Maurer  <dietmar@ximian.com>
+
+       * x86.brg (reg): fix bug #2721
+
+       * jit.c (mono_runtime_install_handlers): impl.
+
+2002-10-17  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (mono_debug_add_method): Make this actually work if we don't
+       have any lifetime information.
+
+2002-10-15  Martin Baulig  <martin@gnome.org>
+
+       * jit.cs (PUSH_TREE): Always set t->cli_addr here.
+
+       * debug.c (generate_line_number): Small fix to make this actually
+       work for more complex things.
+
+2002-10-11  Dietmar Maurer  <dietmar@ximian.com>
+
+       * x86.brg (freg): use fprem instead of fprem1
+
+2002-10-03  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (ves_array_element_address): added check for out of range index
+       (mono_analyze_stack): added fix for bug #31654
+
+2002-10-01  Martin Baulig  <martin@gnome.org>
+
+       * debug.c: Don't create an .il file for the dynamic symbol file.
+
+2002-10-01  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (MonoDebuggerInfo): Added mono_runtime_invoke().
+
+2002-09-27  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (debug_load_method_lines): Don't use sigaction() on win32.
+
+2002-09-27  Dick Porter  <dick@ximian.com>
+
+       * mono.c: Tell glib what the program name is, by passing it the
+       name of the managed file we're executing
+
+2002-09-26  Martin Baulig  <martin@gnome.org>
+
+       * trampoline.c (x86_magic_trampoline): Don't insert the breakpoint
+       trampoline into the vtable, also use it for non-virtual methods,
+       remove the breakpoint when done.
+
+2002-09-26  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (debug_load_method_lines): Block SIGCHLD while running
+       monodis.
+
+2002-09-26  Martin Baulig  <martin@gnome.org>
+
+       * debug.c: Reworked the whole debugging stuff.  We have now one
+       single `mono_debug_handle' which keeps a hashtable of
+       `AssemblyDebugInfo's (which may have different debugging formats).
+       The AssemblyDebugInfo is now created when the assembly is loaded,
+       but never when adding a class/type.
+
+       * mono.c: Initialize debugging stuff after corlib and the assembly
+       have been loaded.
+
+2002-09-25  Martin Baulig  <martin@gnome.org>
+
+       * debug-private.h (DebugLineNumberInfo): Removed.  There's now a
+       MonoDebugLineNumberEntry type in debug-mono-symfile.h which we're
+       using instead of it.
+       (DebugMethodInfo): Removed `line_numbers'.
+
+       * debug.c: Reworked the line number generation; we're now using
+       the MonoDebugLineNumberEntry try for all debugging formats.  This
+       type also includes the line number and IL offset, this allows the
+       JIT to produce better line number info: we only emit line number
+       information for source lines which actually have code.
+
+2002-09-25  Martin Baulig  <martin@gnome.org>
+
+       * debug.h: Removed external declaration of all functions which
+       should only be called from the Mono Debugger and also made them
+       static.  Since the debugger gets their address from the
+       `MONO_DEBUGGER__debugger_info' vtable, there's no need to export
+       these functions.
+
+2002-09-25  Martin Baulig  <martin@gnome.org>
+
+       Improved breakpoint support, we can now dynamically insert and
+       remove breakpoints at runtime and when called from withing the
+       Mono Debugger, we're using a special breakpoint trampoline.
+
+       * debug.h (mono_method_has_breakpoint): New method to check
+       whether to insert a breakpoint for a method.
+       (mono_insert_breakpoint): New method to insert a breakpoint.
+       (mono_insert_breakpoint_full): New method to insert a breakpoint,
+       takes a MonoMethodDesc.
+       (mono_remove_breakpoint): New method to remove a breakpoint.
+
+       * debug.c (mono_debugger_insert_breakpoint): New function for the
+       debugger.  Should only be called from the debugger.
+       (mono_debugger_remove_breakpoint): Likewise.
+
+       * mono.c (main): Use mono_insert_breakpoint() to insert breakpoints.
+
+       * trampoline.c (get_breakpoint_trampoline): New static function to
+       create a special breakpoint trampoline for the debugger.
+       (x86_magic_trampoline): If we're running inside the Mono Debugger
+       and a breakpoint was requested for the method, generate a special
+       breakpoint trampoline.
+
+       * jit.c (mono_debug_methods): Removed, use mono_insert_breakpoint()
+       to insert a breakpoint.
+       (mono_debug_last_breakpoint_address): Removed.
+       (match_debug_method): Removed, use mono_method_has_breakpoint().
+
+Wed Sep 25 12:04:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * jit.c: reorder mono_runtime_cleanup () call since it needs the
+       engine still fully working.
+
+2002-09-24  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (mono_debug_open): When we're invoked from inside the
+       Mono Debugger, set mono_debugger_class_init_func (exported in
+       metadata/class.c) to mono_add_type().
+       (mono_add_type): Call mono_debug_symfile_add_type().
+
+Tue Sep 24 11:34:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * jit.c: avoid including cil-coff.h (again). Optimize typeof (type).
+       Run finalize on domain cleanup.
+       * mono.c: call setlocale ().
+       * trampoline.c: clearer error message for invalid trampoline.
+
+2002-09-21  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (MonoDebuggerSymbolFileTable): Use an actual typedef for this
+       instead of writing a byte blob.
+       (mono_debug_make_symbols): This doesn't touch the symbol tables anymore.
+       (mono_debug_add_method): Incrementally add the new method to the symbol
+       table.
+
+       * exception.c (arch_handle_exception): If we have debugging support,
+       call mono_debugger_update_symbol_file_table () as well.
+
+2002-09-20  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (mono_debug_add_method): The `MonoDebugVarInfo' now includes
+       the size of the variable.
+
+2002-09-18  Dietmar Maurer  <dietmar@ximian.com>
+
+       * linear-scan.c (mono_analyze_liveness): we can save 30% of needed
+       iterations if we visit blocks in reverse order.
+
+2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (mono_analyze_stack): cleaup of the array code
+
+       * exception.c: added patch from Julio Merno to fix bug #30048
+
+       * jit.c (mono_analyze_stack): code cleanup, fix bug #29365
+
+2002-09-09  Dietmar Maurer  <dietmar@ximian.com>
+
+       * x86.brg (LDELEMA): use x86_lea 
+
+2002-09-06  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (debug_update_il_offsets): Fixed a memory corruption bug.
+       If you were getting random crashes when using the JIT with debugging
+       turned on, this fixes it.
+
+2002-09-06  Dietmar Maurer  <dietmar@ximian.com>
+
+       * emit-x86.c (arch_emit_epilogue): use pop instead of mov
+
+2002-09-05  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (MONO_DEBUGGER__debugger_info): New global data symbol
+       which is read by the debugger.
+
+Wed Sep 4 14:06:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * Makefile.am: link libmono directly into mono. Use a ld script
+       to reduce exported symbols.
+
+2002-09-03  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (free_method_info): Make this actually work.
+
+2002-09-03  Martin Baulig  <martin@gnome.org>
+
+       * debug.h (MonoDebugFormat): Killed MONO_DEBUG_FORMAT_DWARF2_PLUS.
+       * debug-dwarf2-plus.c: Removed.
+
+       * debug-private.h (DebugMethodInfo): Removed the `method_info' field.
+       (AssemblyDebugInfo): Removed the old `symfile' field and renamed
+       `mono_symfile' to `symfile'.
+
+       * debug.c (mono_debug_open): Replaced the assembly argument with a
+       file name argument; you can now call this before loading the assembly.
+       (debug_generate_method_lines): The MonoDebugILOffsetInfo struct is gone,
+       we now use MonoSymbolFileLineNumberEntry's and a separate address array
+       instead; splitted out all MonoSymbolFileLineNumberEntry code into
+       debug_generate_il_offsets() and debug_update_il_offsets().
+       (mono_debug_add_method): Don't create the MonoDebugMethodInfo here; it's
+       created when reading the symbol file or from debug_load_method_lines().
+       (debug_load_method_lines): Create the MonoDebugMethodInfo for all methods.
+
+       * exception.c (arch_handle_exception): Call mono_debug_make_symbols() before
+       looking up an address.
+
+       * debug.c: Don't create the .il files for MONO_DEBUG_FORMAT_MONO.
+
+       * mono.c (main): Initialize debugging before loading the first assembly.
+       
+2002-08-28  Dick Porter  <dick@ximian.com>
+
+       * mono.c: mono_set_rootdir() doesnt take any args now
+
+       * Makefile.am: Export HOST_CC for w32 builds
+
+2002-08-28  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (mono_store_tree): only allocate vars if really necessary
+
+2002-08-27  Martin Baulig  <martin@gnome.org>
+
+       * debug.c: The mono symbol file is installed together with the assembly
+       it belongs to and it's used on a per-image basis.
+
+Tue Aug 27 19:44:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * mono.c: don't use the cil-coff header outside of the loader.
+
+2002-08-27  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (mono_debugger_internal_get_symbol_files): Removed, we need
+       to use global variables for this since they're stored in a core file.
+       (mono_debugger_symbol_file_table_generation): New global variable.
+       (mono_debugger_symbol_file_table): New global variable.
+       (mono_debugger_update_symbol_file_table): New global function to update
+       the symbol file table.
+
+2002-08-27  Martin Baulig  <martin@gnome.org>
+
+       * trampoline.c (mono_generic_trampoline_code): New global variable.
+       (arch_create_jit_trampoline): Use the new global variable to store the
+       generic trampoline code instead of using a static one.  This allows the
+       debugger to access this variable to check whether a method is a trampoline.
+
+       * debug.h (mono_generic_trampoline_code): Added external declaration.
+
+2002-08-27  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (MonoDebugHandle): Moved the method hash into the
+       AssemblyDebugInfo struct since we need to use a separate hash for each
+       MonoImage.
+
+       * debug.c: Added special undocumented command line argument to create a
+       symbol file for IL files on-the-fly.  In this case, we also need to create
+       the IL files and parse them.
+       (mono_debugger_internal_get_symbol_files): Return something more reasonable.
+
+2002-08-26  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (mono_debugger_internal_free_symbol_files): New function.
+       (mono_debugger_internal_symbol_files_changed): New global variable.
+
+2002-08-24  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (mono_debugger_internal_get_symbol_files): New function.
+
+2002-08-24  Martin Baulig  <martin@gnome.org>
+
+       * debug.c (mono_debug_write_symbols): Added support for the new
+       debugging format.
+
+       * mono.c (main): The `--debug' argument now knows about a new
+       debugging format `mono' which will be used to display source lines
+       in backtraces.
+
+       * debug.h (MonoDebugFormat): Added a new MONO_DEBUG_FORMAT_MONO
+       which will be used when displaying backtraces.  It reads a new
+       binary symbol file.
+
+2002-08-23  Martin Baulig  <martin@gnome.org>
+
+       * jit.c (match_debug_method): Don't include runtime invoke methods
+       in the search.
+
+       * mono.c (main): Accept `Main' as argument to --break to insert a
+       breakpoint on the application's main method.
+
+2002-08-23  Martin Baulig  <martin@gnome.org>
+
+       * debug-dwarf2.c (dwarf2_write_class_field): Don't include any static fields.
+       
+2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
+
+       * exception.c (arch_handle_exception): don't set stack_trace to
+       null (so that it contains the full trace even when we rethrow the
+       exception).
+
+2002-08-19  Nick Drochak <ndrochak@gol.com>
+
+       * x86.brg (mono_llmult_ovf): Simplified the code greatly by refactoring
+       the algebraic form we are using.  This also eliminated a silly overflow
+       of the intermediate result that was causing troubles.
+
+2002-08-16  Nick Drochak <ndrochak@gol.com>
+
+       * x86.brg (mono_llmult_ovf): Flip ALL the bits, dummy. Now negative numbers
+       work.
+
+2002-08-15  Nick Drochak <ndrochak@gol.com>
+
+       * x86.brg (mono_llmult_ovf): Fix so it throws an overflow when result
+       will not fit in 64 bits.  Fixes bug #27375.
+
+Wed Aug 14 17:31:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * exception.c: updates for API changes in metadata/.
+
+2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (mono_jit_init): use  ((gpointer)-1) as end_of_stack
+       address for the main thread.
+
+2002-08-12  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (mono_analyze_stack): added support for Thread::Abort ()
+
+2002-08-08  Dietmar Maurer  <dietmar@ximian.com>
+
+       * exception.c (arch_handle_exception): simply return and let the
+       libpthread/kernel restore the context. This should work on recent
+       versions of linuxthreads.
+
+       * jit.c (mono_runtime_install_handlers): switch back to use
+       sigaction from libpthreads. As long as this does not make problems
+       we should use this instead of syscall.
+
+2002-08-07  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c: removed the createdelegate icall
+       (mono_analyze_stack): special case Array::Address()
+
+2002-08-06  Dietmar Maurer  <dietmar@ximian.com>
+
+       * emit-x86.c (arch_emit_prologue): make the call to
+       mono_get_lmf_addr relocatable.
+       (arch_jit_compile_cfg): do not waste memory
+       (arch_jit_compile_cfg): use a mempool to store native code. This
+       improves locality of code.
+
+2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (mono_analyze_stack): impl. CEE_MONO_RETOBJ
+
+2002-07-30  Sergey Chaban <serge@wildwestsoftware.com>
+
+       * x86.brg (LOCALLOC): under Windows, if allocation size is bigger
+       than one page, it's necessary to allocate memory incrementally,
+       in page-size steps, performing stack-touch every time.
+       Also added LOCALLOC(CONST_I4) implementation.
+
+2002-07-27  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (mono_get_runtime_method): code cleanup
+
+       * x86.brg: we do not need to save EAX/ECX/EDX in stmt:
+
+2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
+
+       * jit.c (mono_analyze_stack): added CEE_TAIL (but it is ignored)
+
+Wed Jul 24 13:02:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+       * jit.c, jit.h, exception.c: implemented stack walking function.
+
 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
 
        * x86.brg (ARG_OBJ): removed zero sized object warning