Commit Graph

11301 Commits

Author SHA1 Message Date
Ingo Weinhold
00a2b607d8 Added functions for clearing/destroying the architecture specific thread
debug info.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 23:49:20 +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
Ingo Weinhold
0d3bc46a84 * Added the extended (FP, MMX, SSE...) registers.
* Removed orig_e{a,d}x. We will always report those in e{a,d}x.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 23:46:08 +00:00
Ingo Weinhold
2b3216fc5a Correct terminology.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 23:44:23 +00:00
Jérôme Duval
e6d5cc8d84 added binary keymap loading. Now you can type 'keymap -b /etc/Keymap/French'
it also checks for binary version number in case you try to load anything else (who knows ...)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 14:30:29 +00:00
Jérôme Duval
c7cbf33821 added small error checking on keymap source loading
checks only the version number (should be 3 at the moment)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 01:07:48 +00:00
Stefano Ceccherini
1b26b72dba Fixed warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 23:50:08 +00:00
Axel Dörfler
c6d59ae1fa The "pci" bus manager is built differently nowadays, but we still want to copy it.
Changed the default image size to 60 MB, added bochs parameters for 40, 60, and 100 MB HD sizes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 23:42:11 +00:00
Adi Oanca
e438905abd New window manager comming in.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 20:23:51 +00:00
Stefano Ceccherini
f8411ab138 Implemented handler for B_APP_ACTIVATED and (but not really) for _SHOW_DRAG_HANDLES_
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 16:27:49 +00:00
Axel Dörfler
2f4be4bfc4 Almost updated the ReadMe file...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 16:20:35 +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
8ae64a82eb x86 specific user debugging support definitions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:44:41 +00:00
Ingo Weinhold
dd07f6001d * Added functions for clearing/destroying the architecture specific team
debug infos.
* Added function for setting the CPU state.
* Added functions for setting break-/watchpoints.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:43:43 +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
a67d62f1db Added definitions for supporting single step, break- and watchpoints,
and setting the CPU state.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:25:23 +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
beveloper
8496c38a3d MediaRoster::Roster() now sets out_error to B_OK if everything is OK
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-26 23:21:52 +00:00
Ingo Weinhold
37f7862ffb Missing \n at the end of the usage message.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 22:35:54 +00:00
Ingo Weinhold
71a0e3788d Compile the template madness with -O0. This significantly (by an order of
magnitude) reduces the compile time. It's almost acceptable now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 22:35:13 +00:00
Ingo Weinhold
11fcd6e40a The size of the strace executable was ridiculous (1.8 MB). This attempt
to trim the templatized interface improves the situation, but we're still
quite heavy (400 KB).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 22:33:21 +00:00
Ingo Weinhold
50ff751805 * Don't use int32 in sources to be compiled for the build platform
(Daniel Furrer).
* The strace interface for the generated file changed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 22:30:50 +00:00
Ingo Weinhold
9c1ea6d36e Launch the debug_server.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:39:36 +00:00
Ingo Weinhold
f372ac983a Added the debug_server.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:38:13 +00:00
Ingo Weinhold
35e49f2582 Initial version of our debug server. This is the guy that hangs around
waiting for teams to crash to show our favorite alert.
Due to the missing app_server we don't show a alert yet. We just print
something to /dev/dprintf and kill the team. Unlike R5's debug server
ours will probably not provide any debugging functionality itself, but
rather employ gdb directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:37:36 +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
540103da09 * New function get_why_stopped_string() to get a human-readable
translation for the debug_why_stopped codes.
* Added nub_port member to debug_origin structure, so that now all
  synchronous messages to the debugger also include the debug nub port.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:24:00 +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
782c98afd9 * Added KILL_SIGNALS, a signal mask for SIGKILL + SIGKILLTHR.
* Removed SIGKILLTHR from BLOCKABLE_SIGS.
* Made header C++ safe.
* Added function is_kill_signal_pending(), returning true, if a
  SIGKILL[THR] is pending for the current thread.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:16:07 +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
17e41f5251 Added new semaphore flag B_KILL_CAN_INTERRUPT. It makes acquire_sem_etc()
interruptable by SIGKILL[THR], even if B_CAN_INTERRUPT is not set. Not
sure, if this is the best solution, but it works.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:10:41 +00:00
Ingo Weinhold
448e975c5b Some simplifications and cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 18:50:24 +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
b9f16dcd93 Update due to debugger interface changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 16:32:15 +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
fc0eb1b266 Prevent cyclic inclusion.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 15:53:12 +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