Commit Graph

11292 Commits

Author SHA1 Message Date
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
Ingo Weinhold
98dbeb36df Added note to keep struct iframe in sync with the struct cpu_state.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 15:47:54 +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
Ingo Weinhold
c7eab67fe1 Architecture specific debugger interface.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 15:44:48 +00:00
Ingo Weinhold
c3610c8098 * Architecture specifics live in arch/<arch>/debugger.h now.
* team debug flags:
  - Added flags for team creation, thread events (creation,
    deletion), and image events (creation, deletion).
  - Got rid of B_TEAM_DEBUG_SYSCALL_FAST_TRACE. We always send the syscall
    arguments. The overhead should be neglectable.
  - Added B_TEAM_DEBUG_STOP_NEW_THREADS.
* Added debugger notification messages for signals, team, thread and
  image events.
* Added debug request B_DEBUG_MESSAGE_GET_WHY_STOPPED.
* When continuing a thread, the debugger can now specify how to deal with
  the occurred event (ignore or handle).
* More data in the signal received notification message.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 15:43:28 +00:00
Ingo Weinhold
1faf0c16fa x86 architecture specific debugger definitions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 15:33:12 +00:00
Nathan Whitehorn
d86d43eba2 Added the beginnings of our power management daemon. Currently does nothing except tell the roster to shut down when you press the power button (in conjuction with acpi_button, of course). Eventually will do things like display low power warnings, spin down hard disks, and display the requisite power info deskbar replicant.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 03:05:53 +00:00
Nathan Whitehorn
0a60ca24de Fixed a hang on boot problem with bus manager initialization. Apparently the BeOS kernel doesn't seem to like using spinlocks as the ver first thing in the boot process, so I rolled my own. Everything is now working consistently.
I also fixed my power button, so I don't need to test acpi_button by shorting motherboard contacts with a screwdriver...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 02:40:06 +00:00
Nathan Whitehorn
a28a2204fb Made acpi_button clear the button status register, if not properly, at least in a way that works.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 02:12:42 +00:00
Nathan Whitehorn
20a7c7863d Fixed a crashing bug in GPE interrupt handlers, and cleaned up the error reporting code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-23 20:38:24 +00:00