Commit Graph

26419 Commits

Author SHA1 Message Date
Michael Lotz e2891a435a Don't leak the argv array that is passed to ArgvReceivedEx(). Its contents
are only used to open supplied files by name, it doesn't take ownership.
Fixes CID 934.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 18:03:39 +00:00
Michael Lotz 708f792ecc In r16700 the name and meaning of that loop condition variable was flipped
around, but the condition itself wasn't which resulted in the code never being
executed. Fixes CID 88.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 17:57:31 +00:00
Michael Lotz e55f4dd23c Remove check for a supplied bytesPerRow < 0. Negative values are valid and
indicate that a default bytes per row for a certain color space and width
should be used (B_ANY_BYTES_PER_ROW). Fixes CID 55.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 17:49:33 +00:00
Axel Dörfler 4a47b14ea4 * Enlarged a single kernel_args chunk to 32 KB (was 16 KB).
* Reduced the kernel_args array size from 32 to 16 (7 are used on a normal
  build).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 15:36:46 +00:00
Ingo Weinhold 65a9d40a9d * Added hash_dump_table() function, dumping the whole table.
* Fixed hash_remove_current(): It didn't update "lastElement" and thus
  always also removed all elements in the same bucket preceding the one
  to be removed. Also got rid of the useless "for" loop.
  Fixes #2757.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 14:58:40 +00:00
Ingo Weinhold 0be39a3a0d Rather use the new _kern_read_kernel_image_symbols() syscall to use
kernel image symbol tables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 11:17:30 +00:00
Ingo Weinhold 8839d592bc Added syscall _kern_read_kernel_image_symbols() for reading a kernel
image's symbol and string tables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 11:13:38 +00:00
Axel Dörfler 8c8b846226 * Do not try to recreate the path of a preloaded module if a full path has been
passed in by the boot loader.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 09:13:30 +00:00
Axel Dörfler 18ee966f0a * The boot loader now replaces the first path component of all path names
passed to the kernel with "boot" instead of the volume name; the kernel
  mounts the boot volume always as "/boot".
* This should fix #2757.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 08:58:07 +00:00
Rudolf Cornelissen 80d6ff9e6f IDE busmanager did not honor the user's failsafe startup item disable IDE DMA. Now it does. This reveals another error in the busmanager: PIO mode doesn't work on my systems: can't find boot volume.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 06:36:45 +00:00
Rene Gollent 1ad71ed0a0 Fix a couple of broken FLOW traces.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 02:10:14 +00:00
Ingo Weinhold 7ada326834 Also store the string table size for an image. This helps to improve the
symbol name len check.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 23:38:46 +00:00
Ingo Weinhold 061eba4a0f Implemented various command line options and updated usage text.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 22:31:18 +00:00
Ingo Weinhold 32f1784d37 Doubled heap size to 128 KB. Should hopefully fix bug #2756.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:43:12 +00:00
Ingo Weinhold 5a150dfe6d * Added optional tracing for allocations.
* Lifted hard-coded 64 KB heap limit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:42:17 +00:00
Stephan Aßmus 6152a5bc58 Added a test for BTextView. It is quite basic yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:37:22 +00:00
Ingo Weinhold cc3b6f3a05 malloc() now also logs an error when a request could not be served.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:25:58 +00:00
Ingo Weinhold 4ed420362a Log an error when there's not enough memory for the inode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:19:25 +00:00
Rene Gollent 90b7764dc3 Move WidthBuffer and TextGapBuffer into BPrivate and use them from there in BPoseView and BTextView. This (correctly) fixes the previous gcc4 build issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 20:47:16 +00:00
Axel Dörfler 5cb80a0cd8 * Also set the mbuf::m_pkthdr.len field before passing it to ether_output().
* This should help with bug #1874.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 20:40:06 +00:00
Rene Gollent 40ca6c57ee Declare BPoseView as a friend of BTextView. This allows it to use the private width buffer classes, and fixes the gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 18:03:17 +00:00
Ingo Weinhold eebbbf4494 Reduced the minimum timeout enforced by apic_set_hardware_timer() from
1 ms to 1 us. The long minimum timeout seriously screwed profiling,
since by default it works with 1 ms ticks, stopping the timer when the
thread is unscheduled and restarting it with the remaining time when it
is scheduled again.

I could also imagine that this had a negative effect on latencies and
the precision of thread wakeup times.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 16:53:50 +00:00
Ingo Weinhold 7326b92ce0 user_debug_update_new_thread_flags() was setting some of the thread
flags on the wrong thread (the current one instead of the newly created
one). This would cause the thread not to be debugged as it should, e.g.
profiling wouldn't work correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 16:41:49 +00:00
Stephan Aßmus 8864334702 * First steps towards making BTextView behave well within the layout management.
* The class calculates a minimum width now, which is based on the line height,
  this may also fix the bug with the small text inputs in the Pe Find window.
* Added TODOs about implementing GetHeightForWidth(), which may be a good idea
  when a BTextView is used as non-editable informative text in an interface,
  and one wants to make sure that the entire text is shown.
* Replaced the call to _Refresh() in Draw(), which recalculates all the line
  breaks for no reason with _DrawLines() again. The TODO mentioned that text
  will be drawn without drawing the background first, but maybe this is a
  relict from times where Draw() was invoked directly? At least I cannot see
  any negative consequences, and this should be much more efficient.
  (Other than that, this patch should hopefully have no potential negative
  side effects...<crosses fingers>)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 15:36:44 +00:00
Stephan Aßmus 53aaed9f6b Forgot to delete fLayoutData in destructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 15:29:02 +00:00
Ingo Weinhold d73be01714 Also load all kernel images and their symbols. They are not tracked, but
usually they won't change during the runtime of the profiled program
anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:06:50 +00:00
Ingo Weinhold d8b24b47e3 Made SymbolLookup safe to be used for the kernel team. Only the image
file based functionality will be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:02:13 +00:00
Jérôme Duval 82368346f8 fActiveVolume should always be set, and only switch volumes if needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:01:56 +00:00
Ingo Weinhold b34e395eaf The boot loader does now set the names of the images it loads to the
full paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:00:31 +00:00
Ingo Weinhold 6aa2c9ecf1 * Directory stores its parent directory (if any), now.
* Adjusted used files systems accordingly.
* BFS::Stream::GetName() was broken. It accessed the small data region
  which wasn't loaded, since BFS::Stream derived from bfs_inode, which
  is a variably-sized structure with the small data region at the end.
  Changed that to a ref-counted, shared member instead.
* Implemented RootFileSystem::GetName().
* Added Directory::GetPath() to get a full path of the directory or an
  entry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 12:55:41 +00:00
Axel Dörfler b33ba0e92e * Followed Marcus' suggestion and made the array a static const one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 12:14:54 +00:00
Stephan Aßmus e6378518c4 Fixed typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 09:15:35 +00:00
Stephan Aßmus 6168332c35 Sorry, should have been part of r27660. Moved BTextView::UndoBuffer derivatives
into BTextView class as well, hopefully fixing the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 08:43:06 +00:00
Stephan Aßmus 8ab8c63d26 Moved BTextView::UndoBuffer derivatives into the BTextView class as well,
hopefully fixing the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 08:42:02 +00:00
Ingo Weinhold 5c4cde5afa * Some renaming.
* Also print dropped ticks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 22:04:42 +00:00
Ingo Weinhold ecfad924e0 Solution for the potential deadlock when needing to flush the profiling
buffer during a timer event that interrupted a kernel function: We do
now flush the buffer as soon as it is 70% full, *if* we didn't interrupt
a kernel function. When the buffer runs full and we still haven't hit a
user function, we drop the tick. The number of dropped ticks is recorded
and sent to the debugger with the next update message.
Reverted the previous partial solution (the temporary disabling of
profiling while in debugger support code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 22:04:03 +00:00
Ingo Weinhold 1ecc0a33db * Completed image tracking using the image event counter sent with
various debugger messages. We do now correctly match all sampled
  addresses.
* Update the saved info of a team's main thread after exec*(), so we
  can print a more useful name.
* Improved the output: The images are listed in a table, now. The
  function table also includes the image IDs for the functions.
* Cleaned up debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 20:44:19 +00:00
Ingo Weinhold eba9a4c3ee * Introduced a per-team counter that is incremented whenever an image
is created or deleted (or exec*() has been invoked). The counter is
  sent with several debugger messages.
* Track the image event counter that is used when samples are added to
  the profiling buffer. If the current team counter differs, we flush
  the buffer first (sending an update message to the debugger), so that
  the debugger has a chance to match the addresses to the correct images.
* Disable profiling for a thread while it runs in the debugger support
  code. This fixes potential deadlocks which could occur when a
  profiling timer event occurred that would require the buffer to be
  flushed while the thread was just sending something to the debugger or
  waiting for a command. As it turns out, this is not sufficient either,
  since we should never try to flush the buffer when the timer event
  occurred in the kernel, since the thread might hold a lock that the
  debugger thread could try to acquire. Will implement a more general
  solution later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 20:37:10 +00:00
Stephan Aßmus 18fe1bf6fb Small fix for 80 char/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 15:37:47 +00:00
Stephan Aßmus a682d9819f Quite a cleanup action to avoid polluting the global namespace with private
BTextView classes:

* Declared the directly used BTextView helper classes as private BTextView
  classes and changed all affected files.
* Realized that Tracker's BPoseView was (accidentally?) using what used to
  be _BWidthBuffer_. It had declared it's own class with the same name and
  same members/size in headers/private/tracker/TextViewSupport.h, but the
  implementation was nowhere to be found. I can only explain this that
  the BTextView implementation was then actually linked and used. But the big
  problem was that it was used without locking (unlike in BTextView)! When
  many Tracker windows opened during system startup or later and they happened
  to each request characters not yet in the cache, I imagine things could have
  gone bad and corrupted memory. Anyways, since I can see the usefulness of
  the cache, BPoseView uses BTextView::WidthBuffer on purpose now. And I moved
  the locking inside BTextView::WidthBuffer::StringWidth().
* Adjusted InterfaceDefs.cpp accordingly.
* TODO: Move subsequent classes into BTextView namespace as well, ie derived
  classes that BTextView doesn't directly know about. All stuff in src/kits/
   inteface/textview_support/
* Added preliminary and not yet implemented layout friendly BTextView
  constructors.
* I will try to handle the insets imposed by BTextView::fTextRect a bit
  differently when used inside the new layout management framework. For this,
  I added BTextView::SetInsets() and GetInsets(). SetInsets() doesn't do
  anything yet.

So far, everything seems to work still... ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 15:08:40 +00:00
Stephan Aßmus 8121345989 * Don't disable the controls completely if subpixel anti-aliasing is not
available for hinted font rendering. Instead, display the information that
  only this combination has no effect on Haiku builds without subpixel based
  freetype rendering. Better fix for 2753.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:25:07 +00:00
Stephan Aßmus 60497da7e0 Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:23:13 +00:00
Ingo Weinhold b533a08728 Implemented tracking image creation/deletion. It's not fully correct
yet, since there's no synchronization of the sample evalution with the
image creation/deletion. That is samples taken before an exec*() could
be evaluated after the new images have already been loaded and could
thus be translated to the wrong functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:10:57 +00:00
Ingo Weinhold 4ed8088f9a Added new debugger message B_DEBUGGER_MESSAGE_TEAM_EXEC, sent when
exec*() has been called.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 13:59:41 +00:00
Ingo Weinhold 78b13af677 The handling of a full profiling buffer couldn't work for two reasons:
* We can't enable interrupts in an interrupt handler. Instead we use the
  newly introduced callback feature, which notifies the debugger right
  before returning from the interrupt.
* We didn't indicate that the profiling buffer was full and that the
  thread shouldn't be profiled ATM. Therefore it could happen that it
  was profiled while trying to notify the debugger that the profiling
  buffer was full, resulting in a deadlock. Introduce a respective flag
  in the thread debug structure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 12:44:41 +00:00
Ingo Weinhold 23884ae025 Introduced a callback field in the thread structure. It can be set in an
interrupt handler and will be executed right before returning from the
interrupt.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 12:38:27 +00:00
Karsten Heimrich bef5fffeae * use B_PNG_FORMAT, thanks Stephan
* truncate the path label, since a long path would automatically
  resize the window to something unusable in that case...

  Note: somehow the PopUpMenu does ignore a set max column size
        expanding from small to large leaves some drawing artefacts



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:49:00 +00:00
Stephan Aßmus 1aaf53ecac I accidentally removed some backwards compatible behavior. When there is no
label, a TextControl maintains it's current width in ResizeToPreferred() if
it is wide enough. Should fix #2751.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:46:09 +00:00
Karsten Heimrich c7d112ff6a * unmark existing marked items in case we add a new item that is marked
i did exactly that way in my code, which messed up the location popup 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:25:55 +00:00
Karsten Heimrich d1fe803469 * automatic whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:17:00 +00:00