2004-02-12 Christopher January * coregrind/docs/coregrind_core.html: Add section 2.14. Rename existing section 2.14 to 2.15. * coregrind/vg_constants.h: Add VG_TRC_EBP_JMP_BREAKPOINT macro. * coregrind/vg_dispatch.S (dispatch_boring): Change dispatch_ctr condition to dispatch_ctr <= 0 (jle). (dispatch_exceptional): Increment dispatch_ctr on entry. Add check for VG_TRC_EBP_JMP_BREAKPOINT. (dispatch_breakpoint): New function. * coregrind/vg_from_ucode.c (load_ebp_from_JmpKind): Add case for JmpBreakpoint. (emit_code) Change dispatch_ctr condition to dispatch_ctr < 0 (CondNL). * coregrind/vg_include.h: Add definition for DebugState type. Add single_step and stopped members to ThreadState type. Define VG_DEBUG_STATE_SHM_KEY macro. Change VG_(threads) to a pointer. Add extern VG_(debug_state) declaration. Add prototypes for VG_(init_threads), VG_(cleanup_threads), VG_(pre_fork) and VG_(post_fork). Add single_step argument to VG_(disBB). Add VG_(invalidate_all_translations) prototype. * coregrind/vg_main.c (VG_(main)): Add calls to VG_(init_threads) and VG_(cleanup_threads). * coregrind/vg_mylibc.c (vg_do_syscall6): New function. (VG_(shmget)): Ditto. (VG_(shmat)): Ditto. (VG_(shmdt)): Ditto. (VG_(shmctl)): Ditto. * coregrind/vg_scheduler.c: Change VG_(threads) to a pointer. Add VG_(debug_state) declaration. Add vg_shmid declaration. Replace vg_tid_currently_in_baseBlockand vg_tid_last_in_baseBlock with macros. (VG_(pp_sched_status)): Check VG_(threads) pointer is not NULL. (name_of_sched_event)): Add case for VG_TRC_EBP_JMP_BREAKPOINT. (VG_(init_threads)): New function. (VG_(cleanup_threads)): Ditto. (VG_(pre_fork)): Ditto. (VG_(post_fork)): Ditto. (VG_scheduler)): When checking if a thread is runnable, also check it is not stopped. Remove '+1' in assignment to VG_(dispatch_ctr). Check if external debugger asked for all translations to invalidated. Check if threads is in single step mode. Handle exit from base block due to breakpoint and single step. Remove '-1' in assignment to done_this_time. Add case for VG_TRC_EBP_JMP_BREAKPOINT. * coregrind/vg_syscalls.c (VG_(perform_assumed_nonblocking_sys)): Add VG_(pre_fork) and VG_(post_fork) calls to __NR_fork case. * coregrind/vg_to_ucode.c (disInstr): Add case fo 0xCC (INT 3). (VG_(disBB)): Add single_step argument. Add check for single_step falg. * coregrind/vg_translate.c (pp_UInstrWorker): Add JmpBreakpoint case. (VG_(translate)): Add extra argument to VG_(disBB) call. * coregrind/vg_transtab.c (VG_(invalidate_all_translations)): New function. * include/vg_kerneliface.h: Define VKI_SIGTRAP, VKI_MAP_SHARED and VKI_MAP_FAILED macros. Copy from bits/ipc.h, bits/shm.h. * include/vg_skin.h: Add prototypes from sys/ipc.h. Define JmpBreakpoint.