Commit Graph

3342 Commits

Author SHA1 Message Date
Ingo Weinhold
b0f12d64f4 Added transparent software breakpoint support for user debuggers:
* The bulk of the work -- i.e. juggling the software and hardware breakpoints,
  watchpoints, and memory reads/writes -- is done in the new class
  BreakpointManager.
* For the architectures a few capability macros have to be defined, one
  pointing to the software breakpoint instruction opcode. Done for x86.
* Some more simplifications in the user debugger code, made possible by the
  recently introduced debugger_changed_condition attribute.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 21:03:57 +00:00
Ingo Weinhold
ba391bcc56 Added team_debug_info::debugger_changed_condition to serialize changes to the
installed team debugger and adjusted the code accordingly. It's not needed yet,
but I intend to add support for software breakpoints and those require a bit of
uninitialization that needs to be synchronized with debugger changes and can't
be done with interrupts disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 01:39:51 +00:00
Ingo Weinhold
91393e7810 InterruptsSpinLocking:
* Removed unused inner struct State.
* Added work-around for the extremely annoying "fState my be used
  uninitialized" warning gcc 4 produces. I'm not aware of any solution that
  doesn't generate unnecessary code. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-23 01:32:46 +00:00
Ingo Weinhold
5ea5f51d84 Changed ConditionVariable from class to struct to make it more C-friendly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 23:49:05 +00:00
Ingo Weinhold
6dcc2a7e00 Made destroy_team_debug_info() static, as it's not used outside the source
file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 23:46:55 +00:00
Ingo Weinhold
6cd189c997 Added BinarySearchIndex().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 21:41:16 +00:00
Rudolf Cornelissen
8bdea4194a doing preparations for using analog widescreen detection. if all is right the driver's behaviour hasn't changed yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 20:33:17 +00:00
Stephan Aßmus
19e179ca4f * Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
  race condition with asynchronous SetViewCursor and deleting the
  cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
  just in case...
* Added TODOs for caching the BView token, it's currently resolved
  for every single BView call that talks to the server... not good!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 12:11:49 +00:00
Stephan Aßmus
5d62f8e0e5 Make it possible to properly use operator= on BCursors by making sure the
reference counting is maintained correctly in the app_server. While reviewing
this code, I have my doubts that my previous solution for handling pending
SetViewCursor() calls is always working as it is intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 10:10:01 +00:00
Ingo Weinhold
b7c5bd634b Renamed Variant to BVariant and moved it to libshared.a.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 23:00:25 +00:00
Axel Dörfler
3609af391d * Renamed _kern_reserve_heap_address_range() to _kern_reserve_address_range(),
and added a _kern_unreserve_address_range() as well.
* The runtime loader now reserves the space needed for all its areas first
  to make sure there is enough space left for all areas of a single image.
* This also fixes the final part of bug #4008.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 11:09:21 +00:00
Axel Dörfler
82db8a9e15 * Added an "unmapAddressRange" argument to the file mapping syscall. This is
the first part of making the runtime loader behave itself; it should already
  make Clockwerk run okay with any number of translators (even if not all of
  them will work yet).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 08:23:11 +00:00
Axel Dörfler
160f2d1081 * Added private header defining __gUmask which is now used everywhere where
needed.
* Some cleanup in Directory.cpp, and File.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-17 14:09:40 +00:00
Ingo Weinhold
568ade58d0 User debugger support:
* Generalized address checks. The debugger can now also read the commpage.
* Added new syscall _kern_get_thread_cpu_state() to get the CPU state of a
  not running thread. Introduced arch_get_thread_debug_cpu_state() for that
  purpose, which is only implemented for x86 ATM (uses the new
  i386_get_thread_user_iframe()).
* Don't allow a debugger to change a thread's "esp" anymore. That's the esp
  register in the kernel. "user_esp" can still be changed.
* Generally set RF (resume flag) in eflags in interrupt handlers, not only
  after a instruction breakpoint debug exception. This should prevent
  breakpoints from being triggered more than once (e.g. when the breakpoint is
  on an instruction that can cause a page fault). I still saw those with bdb
  in VMware, but that might be a VMware bug.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-14 12:14:06 +00:00
Jérôme Duval
581708b997 * fix the build by moving a typedef to public scope, and avoid returning a value in the destructor
* some clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-13 10:42:11 +00:00
Oliver Ruiz Dorantes
80ee40e10c License header & style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31016 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 18:25:57 +00:00
Oliver Ruiz Dorantes
c6083519e7 Make a bit more elegant the processing of bluetooth events
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 18:14:51 +00:00
Axel Dörfler
4ab3fa3b5a * Added real_time_clock(), and real_time_clock_usecs().
* Added support for timespec stat times.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 09:31:25 +00:00
Stephan Aßmus
34068836d3 Fixed Remove() operations to be O(1) again, I just didn't get it. The item
sorting does not need to be preserved. Thanks Marcus!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-08 07:01:58 +00:00
Rene Gollent
c0e1e0eaac Fix GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 19:07:34 +00:00
Stephan Aßmus
bb56a763a6 Resolved TODOs in PluginManager about leaking plugins when they are no longer
needed. I've added MediaPlugin* fields to Reader and Decoder plugin classes
which are set when the PluginManager hands out new instances. This way the
manager knows what plugin created the Decoder or Reader instance in the
Destroy*() methods and can decrease the reference count accordingly. Also added
some FBC stuffing to Decoder and Reader. All media plugins need to be recompiled,
in case anyone has some outside the Haiku tree.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 18:11:05 +00:00
Stephan Aßmus
5fa2230d99 Just saw that _Remove(index) here was as broken as in TList.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 18:04:32 +00:00
Stephan Aßmus
85af513ad6 Remove() was completely broken if not removing the very last item.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-07 17:56:59 +00:00
Axel Dörfler
477a4ca70e * vfs_boot.cpp now also exports gReadOnlyBootDevice which is true when the
boot device is actually read-only (even if it's using the write overlay).
* Do not create a swap file on a read-only device - this would really be a
  stupid use of the write overlay (just saw this happening on an older
  machine).
* Made swap_file_{add|delete}() take a const char* path - there was no reason
  this was writable, and this also avoids casting away the const when adding
  the default swap file.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-05 15:52:58 +00:00
Axel Dörfler
bfd4c59b63 * Added DPMS support to the VESA driver, in case the hardware/BIOS supports it.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-05 13:03:05 +00:00
Rene Gollent
a63261ea5a Added files missed in previous commit. Thanks Urias.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-05 03:50:21 +00:00
Ingo Weinhold
360d4974b9 Replaced the temporary storage used in the kernel debug command parser. We now
have a simple dedicated heap for the kernel debugger with stacked allocation
pools (deleting a pool frees all memory allocated in it). The heap should
eventually be used for all commands that need temporary storage too large for
the stack instead of each using its own static buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-03 12:28:49 +00:00
Rudolf Cornelissen
c1db4db3cc modified I2C code to read the third bus on cards that can support it. Dumping EDID scanning results in logfile only for now (testing..) Bumped version to 0.92.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-02 20:37:59 +00:00
Rudolf Cornelissen
dd67a9b2d4 added enabling I2C buses for NV40 arch cards. hopefully this makes the buses work on GF6100 (noted in bug #2780) and maybe others. added a few registerdefines (wip).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-01 20:06:21 +00:00
Ingo Weinhold
eb0262fc4c * Reworked vm_soft_fault() and friends:
- While walking down the cache chain, we keep all upper caches locked.
  - When we have to unlock -- when waiting for a busy page or reading a page in
    -- we unlock completely, including the address space, and restart
    vm_soft_fault().
  - Folded fault_get_page() and fault_find_page() into one.
  This simplifies and improves things considerably:
  - We no longer need dummy pages.
  - We no longer need vm_area::no_cache_change.
  - #2710 is fixed, since we no longer hold the address space lock while
    waiting.
* vm_soft_fault(): When we have found our page, we first check whether a page
  is already mapped at the address. If it is already our page, we just change
  its protection. If not, we unmap it first. Fixes race conditions when multiple
  threads fault at the same address at the same time.
* fault_get_page(): When copying a read-only page from a lower cache, no longer
  mark it active, since at least for the fault area it is shadowed from then on.
* vm_set_area_protection(): Fixed potential overflow for in the
  vm_translation_map::protect() call.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-29 12:55:25 +00:00
Ingo Weinhold
7515c32c1f Not sure, if this was only a gcc 4.3.3 bug or if I misunderstand something, but
gcc could apparently assume that the register assigned to the one in the
clobber list would keep its value (as can be observed when disassembling
add_debugger_command_etc()).
Using a dummy output register works around the problem and also avoids the
unnecessary initialization of the register.

Comments explaining the mystery welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-29 01:17:53 +00:00
Oliver Tappe
0964534941 * reverted r30883 and made these three headers private for the locale kit for
now, fixing the build

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-28 10:36:33 +00:00
Rudolf Cornelissen
f595427d00 fixed comment typos. No actual change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 18:57:01 +00:00
Rudolf Cornelissen
21bade017a added more EDID stuff. Now extracting needed monitor specs and placing them in shared_info. More dumping to logfile added. The EDID info is not yet actually used: more testing is needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 18:46:07 +00:00
Ingo Weinhold
42c9b01aa6 * {BEntry,BNode}::GetStat() were still passing the BeOS struct stat size to
the syscall. Anything beyond st_mtim was therefore not filled in. Fixes
  the incorrectly shown creation times in Tracker.
* The BStatable::GetStat() solution was not sufficient yet. We still have to
  provide the old GetStat() symbol for BNode and BEntry, since those could be
  used by old applications/libraries. We also still have to implement the old
  GetStat() slots in the derived classes, but don't need to implement it in
  the base class (was purely virtual before and is private now).
* The old BStatable::_OhSoStatable1() slot function was not implemented
  correctly. Calling the virtual function at the vtable slot obviously results
  in an infinite recursion. The correct implementation would make use of the
  Perform() method, but Be didn't provide one for BStatable, so we have to use
  the old GetStat() method. Fixed #3960.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 14:03:38 +00:00
Jérôme Duval
56d4690860 wakeup() means wake any waiting threads, so we use the relevant flags. this gives a reliable dv receive stream here.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-24 23:15:04 +00:00
Ingo Weinhold
897514785a Introduced macro B_DEFINE_SYMBOL_VERSION() in <BeBuild.h> to help with
versioning symbols, and private macro DEFINE_LIBROOT_KERNEL_SYMBOL_VERSION()
for symbols compiled into both libroot and kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-22 14:57:40 +00:00
Ingo Weinhold
9bf61a0ecc * Added GNU style ELF symbol versioning support in the kernel, too.
* Fixed memory leak in insert_preloaded_image() in error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-21 15:08:42 +00:00
Ingo Weinhold
b3f709b800 Removed unused elf_version_info::hidden field.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-21 13:11:54 +00:00
Ingo Weinhold
003ebb0e83 * Also define the build system variables TARGET_STATIC_{LIBSTDC++,LIBSUPC++}.
* runtime loader:
  - Fixed gcc 4 warnings.
  - Enabled -Werror.
  - Renamed all remaining *.c source files to *.cpp.
  - Implemented GNU style ELF symbol versioning support.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-20 02:22:36 +00:00
Jonas Sundström
03458c01a2 More style guide fixes. Removed a lot of preprocessing / conditional building, with intent to fix or remove. Moved urlwrapper class declaration to its header file. Renamed things for clarity. Removed 5 extra mimetypes for IE shortcuts. (We have one, with sniffing rule and extension.) Moved the UnurlString() back to urlwrapper.cpp and renamed it _DecodeUrlString(). Tweaked copyright clauses. A lot more needs fixing, esp. in urlwrapper but also in BUrl, and I intend to keep working on this until we're satisfied. Let me know of any remaining/added style violations! Feedback welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 22:19:42 +00:00
Ingo Weinhold
6a1e04b121 Symbol resolution functions in the kernel: Removed the unused parameter
allowing optional prepending of a string to the symbol names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 15:25:27 +00:00
Axel Dörfler
b0c7d4fa15 * Removed operator=(otherLocker) again. Didn't really make sense this way,
as Stippi correctly pointed out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 14:45:53 +00:00
Ingo Weinhold
f91194e546 Removed the gcc_version from the runtime loader's image_t. Instead we always
determine (or guess) Haiku version and ABI and use those for compatibility
decisions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 14:44:17 +00:00
Axel Dörfler
49dcde5cf5 * Added operator=().
* Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 07:46:14 +00:00
Jonas Sundström
a243916712 Hopefully fixed indentation in BUrl header. Made data members in BUrl private. Added some class methods. Adapted urlwrapper to use the BUrl class. Removed a few obvious comments and some code that was defined away. Turned off debugging. Stripped App suffix from class name. No intentional changes to the core functionality of urlwrapper.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-13 01:05:42 +00:00
Ingo Weinhold
593ee7bbc3 Extended image_info by fields for the Haiku version and ABI. The runtime loader
and the kernel read those values from the shared object (if available). In the
runtime loader this should eventually replace the gcc version guessing method
currently used (at least for shared objects built for Haiku). The optional
packages need to be rebuilt first, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-12 21:08:56 +00:00
Ingo Weinhold
51c706f70c Added variables to the glue code that identify the Haiku version and ABI.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-12 21:01:26 +00:00
Jonas Sundström
28e8dc8e80 Move Url class out of /bin/urlwrapper into BPrivate::Support. I plan to add a Launch()-method that will make it useful to /bin/open, AboutSystem, People and other applications.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-11 00:48:03 +00:00
Stephan Aßmus
7f33d2c159 I am trying to help a bit with the transition from IDE to ATA stack.
* Copied ide_adapter.h as ata_adapter.h in attempt to further
  separate the two stacks.
* Continued renaming stuff in drivers/bus/ATA.h
* Make all the busses/ata drivers include the new headers,
  specifically ata_types.h, ata_adapter.h and bus/ATA.h,
  they were all including ide_types and bus/IDE.h still
* Some renaming of global variables for coding style consistency
* Removed the promise driver from the build, it's not used on the
  image and I don't believe it compiled even for the old IDE stack.
* There is no more Command Queueing in the new ATA stack, so I
  removed the capability indication from the busses/ata drivers
  and ata_adapter.h.

The new ATA stack still boots fine on my computer and I proof-read
the diff like two times. Basically, this was a careful search&replace
job only. The only things I am not sure about is renaming some
publishing related strings, but it seems to all work fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-10 17:04:04 +00:00