Commit Graph

11312 Commits

Author SHA1 Message Date
Stefano Ceccherini 41d64d6792 Looks like I _HAD_ screwed something. Fixed some wrong stuff about printjob's settings, implemented more functions. Communication with the print_server should be ok, and also settings. Now comes the hard part: setting up the spool file. Any hint ?
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 14:03:28 +00:00
Ingo Weinhold 59ad83d0d9 Don't allow changing the segment registers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 11:52:53 +00:00
Stefano Ceccherini 6bb758a26f Implemented some basic BPrintJob methods (hope I didn't screw anything, is there any print server guy around ?). Is there any reason why it is left out of the build (besides being incomplete) ?
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 11:15:41 +00:00
Nathan Whitehorn c11886dbbe Now we have a nice structure for handling ACPI fixed events. This means we can do things like make acpi_button block, instead of polling it. Direct register access has gone away. The next revision of the bus manager interface should include namespace traversal and AML control method execution.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 05:05:18 +00:00
Axel Dörfler 47761c4786 Adapted to match our style guide.
Fixed warnings.
Made gArchiveNameField static (and therefore changed the prefix to 's').


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 03:44:14 +00:00
Nathan Whitehorn b53df54f50 Made the status register clear code work. Apparently you need to write 1 to the register to set it to zero. It doesn't make any sense to me either.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 01:45:02 +00:00
Ingo Weinhold 5d2536d2af * Added functions for clearing/destroying the arch-specific thread debug
info.
* Implemented arch_set_cpu_state() (Axel, please check, what registers
  the debugger should actually be allowed to modify).
* Fixed arch_get_cpu_state(). We now explicitly copy the registers
  manually instead of using memcpy(). Added support for extended
  registers (FPU,...).
* Completed break- and watchpoint support.
* Implemented handling of debug and breakpoint exceptions.

The x86 specific part of the userland debugging support should be complete
now. That is in theory the entire debugging interface is available on x86
machines now. It's almost completely untested yet, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 00:14:38 +00:00
Ingo Weinhold 86cc722477 * DR3 is used for holding the pointer to the current struct thread*, so
we only have 3 debug registers available for break-/watchpoints.
* Added definitions for debug status register DR6. Reordered DR7 defs to
  ascending order. Added definitions for the EFLAGS flags we need.
* Added arch_thread_debug_info structure and related definitions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-02 00:05:02 +00:00
Ingo Weinhold edd0aaeaee * Stop user debugging when entering the kernel and init it when leaving
it.
* Handle debug and breakpoint exceptions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 23:59:23 +00:00
Ingo Weinhold 98b14f8a6a * Made i386_get_current_iframe() static again, since it wasn't what was
needed to get the topmost user iframe. Added i386_get_user_iframe() for
  exactly that purpose.
* Added reinitialization of user debugging for the new thread when
  switching the context.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11523 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 23:56:52 +00:00
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 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