Commit Graph

2224 Commits

Author SHA1 Message Date
Ingo Weinhold
c8d7534e5d * Made C++ save.
* Made the parameter for restoring the FPU state const.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 23:52:09 +00:00
Ingo Weinhold
ae7c619aae * Added architecture specific structure to thread_debug_info.
* Added event callbacks for break- and watchpoints and single stepping.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 23:47:59 +00:00
François Revol
b1bfc5c69f if you want to return something at least be consistent with the version of usleep which returns an int... (return -1 and set errno)
see http://www.die.net/doc/linux/man/man3/usleep.3.html


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 11:41:39 +00:00
Ingo Weinhold
feeee8dff5 Added function for setting the CPU state (not implemented yet) and
functions for setting break-/watchpoints (implemented).
Break-/watchpoints don't work yet, though. Missing is still the setting
of the debug control register DR7 somewhere in the interrupt code and
the handling of debug exceptions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:48:31 +00:00
Ingo Weinhold
336b15cf0f Added musings about where to deal with debug registers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:42:01 +00:00
Ingo Weinhold
d906f5fc4b * Atomic access to team debug flags.
* thread_exit_args::teamID -> original_team_id.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:39:51 +00:00
Ingo Weinhold
9707863cc9 * Changes due to new team debug info locking strategy.
* In team_delete_team() we no longer explicitly destroy the team debug
  info. It is not necessary, since the terminating debug nub thread will
  do that anyway. Moreover we access the debugger port in a safer manner
  now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:37:16 +00:00
Ingo Weinhold
a7ad39fe09 * New locking strategy for the team debug info. It's no longer protected
by the team lock, but by a lock in the structure. This is necessary
  since we can't acquire the team lock while thread switching, for then the
  thread lock is already held.
* Added support for single stepping and break-/watchpoints.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:34:06 +00:00
Ingo Weinhold
bd3b16ee7b Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:21:59 +00:00
Axel Dörfler
a2634a4246 Actually, ports do support both, B_RELATIVE_TIMEOUT and B_ABSOLUTE_TIMEOUT -
thanks to Ingo for the hint.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-27 16:18:07 +00:00
Ingo Weinhold
6d3794c0a1 * Correctly set debug_origin::nub_port in all concerned functions.
* Now a debugged thread and the debug nub thread are not longer blocking
  on ports when they receive a SIGKILL[THR] (we couldn't kill a debugged
  team before).
* Small fixes. More correct cleanup when the debug nub thread terminates.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:30:16 +00:00
Ingo Weinhold
3b28d367cb Implemented get_why_stopped_string().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:25:10 +00:00
Ingo Weinhold
f75dc555fd * handle_signals(): If a SIGKILL[THR] is pending, ignore other signal.
* Added is_kill_signal_pending(). Can anyone tell me why the compiler
  complains about a missing previous prototype for it? <ksignal.h> is
  included, and when only preprocessing the file, the prototype is clearly
  there. I'm clueless.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:20:47 +00:00
Ingo Weinhold
8c37e2348e Added support for new flag B_KILL_CAN_INTERRUPT. (Do ports really not support absolute timeouts?)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:13:00 +00:00
Ingo Weinhold
013d79a1b9 Added support for new flag B_KILL_CAN_INTERRUPT.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:11:52 +00:00
Ingo Weinhold
433e1959ae Introduced a debug_origin structure consisting of thread and team ID of the concerned thread, and being first member of all messages sent to the debugger. This simplifies handling of messages in the debugger a good deal.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 18:47:04 +00:00
Ingo Weinhold
013765b30a Added ToDo regarding the handling of search paths like PATH.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 16:34:00 +00:00
Ingo Weinhold
71a2d54820 In case of a page fault we now notify the debugger.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 16:30:17 +00:00
Ingo Weinhold
260ba6fdd3 * Dealt with two debugging related ToDos:
- If the thread's B_THREAD_DEBUG_STOP flag is set, it is now always
    stopped before handling the signals. Unless a SIGKILL[THR] signal is
    pending.
  - Also notify the debugger, when a signal is ignored.
* The signal's sigaction structure is additionally passed to the debugger
  now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 16:28:45 +00:00
Ingo Weinhold
9c448e2414 * Added debugger notifications for thread creation/deletion events.
* Now we deal correctly with thread debug flags (child threads inherit
  the parent ones, save for syscall tracing in which case it needs to
  be specified explicitly).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 16:14:18 +00:00
Ingo Weinhold
2ee487c82a Added debugger notifications for team creation/deletion events.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 16:11:25 +00:00
Ingo Weinhold
43ad09219b Added debugger notifications when images are registered/unregistered.
In the first case this is probably too early, since the image is not
really loaded at that time by the loader. We should probably introduce
a syscall the loader can invoke for that purpose.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 16:10:24 +00:00
Ingo Weinhold
e988d66022 * Added B_TEAM_DEBUG_DEFAULT_FLAGS and B_THREAD_DEBUG_DEFAULT_FLAGS for
convenience.
* Added/implemented callbacks for almost all missing debug events (team,
  thread, image creation/deletion, exceptions/faults, signals).
* The debugger can now specify how to deal with the event that stopped an
  event (ignore or handle signals, exceptions/faults).
* Implemented B_DEBUGGED_THREAD_GET_WHY_STOPPED debugger message.
* The cpu_state is now passed to the debugger with
  B_DEBUGGER_MESSAGE_THREAD_STOPPED notifications.
* Completed _user_debugger() implementation.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 16:07:19 +00:00
Ingo Weinhold
05916979f9 Export i386_get_current_iframe() so it can be used in arch_user_debugger.cpp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 15:49:41 +00:00
Ingo Weinhold
08fd6d69aa Beginning of the x86 debugging support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 15:46:20 +00:00
Jérôme Duval
abd010bc61 Moved mbstate to wchar.h
Restored glibc/wcsmbs/wchar.h


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-22 18:06:35 +00:00
Jérôme Duval
834f7878aa FindString is better than FindData (thanks axeld)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-18 17:27:34 +00:00
Jérôme Duval
997aa9ac18 error handling
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-18 11:05:33 +00:00
Axel Dörfler
db5fbf2a6b Fixed a possible crashing bug in case of a corrupt inode: the vnode was
removed twice from its mount's list.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-18 03:57:08 +00:00
Jérôme Duval
76fa831165 fixes sscanf for decimal values, enables keymap to actually load source keymaps
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-17 16:57:12 +00:00
Axel Dörfler
4b72e95292 getcwd() is actually implemented like elsewhere, and not strictly after
POSIX demands: if you pass in a NULL pointer, a buffer will now be
allocated for you.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-16 03:51:34 +00:00
Axel Dörfler
86e404324f Fixed the build of the boot floppy and removed all input_server headers
when USE_INPUT_SERVER is not defined.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-16 03:22:12 +00:00
Axel Dörfler
a1537049b7 Changed the way we're resetting the machine: we're now first trying the
keyboard controller method, and only if that fails we fall back to what
we have before.
At least my SiS laptop now properly reboots, and doesn't just halt
anymore - doesn't seem to have a negative impact on other machines, but
please report any regressions :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-16 02:12:14 +00:00
Jérôme Duval
82698ec120 added support for arrows (from our Terminal impl)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-15 16:58:28 +00:00
Axel Dörfler
133c5b73a2 Obviously, my laptop (SiS 630 based) only reports all VESA modes when there
was one mode change before - took me quite some time to figure this out; now
we just do a mode change to the standard text mode; this is probably a good
idea anyway to make sure we're running in the correct text mode for the boot
menu.
The error check for the VESA BIOS calls were not really correct, even if
they worked. The vbe_mode_info structure is now cleared before the mode
info is requested (as suggested in Ralf Brown's interrupt list).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-15 15:35:59 +00:00
Axel Dörfler
f7958e552d Now only echoes the input if ECHO is defined.
Ignores a "--login" argument (that's what consoled does).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-15 01:18:58 +00:00
Axel Dörfler
23cf00de23 Now starts consoled instead of a shell directly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-15 01:17:52 +00:00
Axel Dörfler
ca347bfce3 We report ourselves now as "beterm", so that we don't look as dumb as before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-15 00:28:43 +00:00
Axel Dörfler
c016d92ea1 Added the new console/vga_text driver/module stuff to the old boot floppy
method as well.
Removed libdrivers.a from the kernel, added kernel_debug.o to the kernel.
Renamed the boot floppy shell "sh", so that consoled doesn't need to be
changed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-15 00:25:32 +00:00
Axel Dörfler
a621f3b6c1 Added the new (built-in) frame_buffer_console module to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-15 00:18:27 +00:00
Axel Dörfler
f80973f6c2 Replaced the old frame buffer console driver with a built-in frame buffer
console module which is used by the console driver, and will be used by
the on-screen KDL.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-12 03:45:01 +00:00
Axel Dörfler
1252c6cfae No longer computes a wrong frame buffer size for 15 bit modes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-12 03:12:19 +00:00
Jérôme Duval
ec4fd18f03 _sPrintf implemented
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 13:04:13 +00:00
Ingo Weinhold
73df3c0847 * Turned off debug output.
* The syscall arguments are copied into the respective messages to the
  debugger now.
* Optimized the nub thread memory reading command. Now only as many bytes
  are sent to the debugger as were actually read.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 05:00:31 +00:00
Ingo Weinhold
6b2dcef3ec Explicitly declare the inclusion of the syscall table file generated by gensyscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 04:57:38 +00:00
Ingo Weinhold
6432752755 Include the syscall info array generated by gensyscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 04:56:11 +00:00
Axel Dörfler
90bce836e0 Changed the way user/kernel time is tracked for threads. Now, thread_at_kernel_entry()
and thread_at_kernel_exit() are always called for userland threads at the appropriate
situation (note, I've renamed those from *_atkernel_*).
The timing should be more accurate this way, and the thread::last_time_type field
is no longer needed: all interrupts are now added to the kernel time (where the
time is actually spent).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 03:10:21 +00:00
Axel Dörfler
71aa315c95 First round of hoard changes to change it exactly to what we need.
Removed the arch-specific stuff for all other platforms.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-10 18:47:16 +00:00
Ingo Weinhold
e23a6f58af Added syscall tracing support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-10 03:06:05 +00:00
Ingo Weinhold
a102c86e08 Init and cleanup the thread related debugging structure.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-10 03:04:53 +00:00