- Add dedicated ReportDebugger application class for the case where we're
asked to do nothing more than save a report. Also add a corresponding
UserInterface subclass whose sole purpose is to take those necessary
actions and then exit.
- When the debugger is invoked via the --save-report option, we now start
via the aforementioned report/interface rather than piggybacking on the
CLI.
- Clean up CommandLineUserInterface/CliContext to remove handling for the
report saving option.
Should hopefully resolve#12155.
BApplication::_InitData() already avoided the use of BRoster from the
registrar (and launch_daemon) where it isn't available. Since
create_app_meta_mime() indirectly just sends a message to the registrar
using BRoster, it too cannot work when the registrar isn't available.
This fixes a regression introduced in 9bfc833, where the old way of
getting the roster port was replaced with its launch_daemon counterpart.
The previous method of finding the roster did always fail when running
from the registrar, as at the time of initialization (initialize_before
of libbe) the registrar looper doesn't exist yet. This commit restores
the previous behaviour by checking if the returned registrar team is the
current team and avoiding initialization in that case.
The regression caused a 5 second boot delay when later BApplication
initialization of the registrar tried to communicate with itself with a
reply timeout of that length.
Fixes#12258 at least partially and might affect #12237.
This was missed when introducing the feature in hrev49558. Thanks Jérôme
for the pointer!
Also add a note explaining that update operations on cached entries and
the removal of uncached entries are safe.
These are always allocated using an area. The allocation size is
increased as to guarantee the availability of a suitable address. The
pages between the allocation info and the actual, aligned start address
and the pages past the allocation end are then protected.
This commit also fixes corruption of the allocation info for large
allocations that used areas. The alignment wasn't taken into account
when calculating the amount of space needed. The alignment could then
lead to rounding down the allocation start such that it would overlap
with the allocation info.
It provides a way for filesystems to cache a lookup failure and
therefore prevents repeated lookups of missing entries. This is a
common scenario for example in command lookup and compiling, where
each directory in PATH or each include directory is searched for the
given entry.
Worker/Job:
- Add job listener hooks for when work actually begins for a job,
and when a job is suspended to wait for user input.
- Add hook for setting a job description string, and implement in several
subclasses.
LoadImageDebugInfoJob:
- Get rid of ImageDebugInfoJobListener since its functionality can be
handled via the more general job wait for user input hook. Refactor
accordingly.
TeamDebugger:
- Adjust to use new job hooks. When a worker job is initiated, we now
check if the job has a description, and if so pass it on to the UI
to display a notification.
DwarfLoadingStateHandler:
- Notify the UI when a package download is in progress.
With these changes, the status bar now notifies the user if any of the
following actions are in flight:
1) Loading/parsing debug information
2) Stack trace retrieval
3) Source code retrieval
4) Downloading a debug info package
TeamDebugger:
- When notified that an image debug info job has started loading,
notify the user interface accordingly. Also reset status to a ready
state whenever all in-flight jobs are complete. This allows the
user to know when then debug subsystem is still in the process
of parsing debug information, as this can be time consuming for
larger programs/libraries.
UserInterface:
- Add new hook function used to notify the UI that some form of
background work is taking place for informational purposes,
i.e. no interaction required. Implement accordingly in
GraphicalUserInterface.
* Using native assembly functions would be a lot faster,
but would require quite a bit of changes to glibc.
* This gets arm linking for now... I'd personally like
to see musl in here in the future for gcc4 images. (pre-R2)
The individual debug heap implementations are now exposed via a
structure of function pointers and a common frontend dispatches the
malloc and malloc_debug APIs through them.
The MALLOC_DEBUG environment variable can be used to select the guarded
heap by adding 'g', otherwise the debug heap is used as the default.
Consequently the separate libroot_guarded is not needed anymore and has
been removed.
To allow the use of environment variables this early, init_env_post_heap
has been added and the heap dependent atfork() moved there. This allowed
to fold the code of init_heap_post_env into init_heap so the former has
been removed.
* The API is saner: no need to build a string with var=value
* It is safer: putenv requires the string passed to it to stay
allocated, although most implementations (Haiku, Linux, BSD, OSX) do not
follow POSIX on this,
* Fix a problem reported in #12298 comments because the variable was set
with extra quotes (putenv does not escape them), leading to Qupzilla not
finding the home dir.
Consistently check for NULL the ServerBitmap pointer.
There seems to be cases where BView::DragMessage could pass an invalid
Bitmap token to app_server.
Maybe it's when a client only bitmap is passed, I don't know.
Anyway, this is defensive programming, and at least we check for NULL
consistently now.
This fixes#11681.
Note that SuperFreeCell still crashes, but at least app_server doesn't crash.
fts.c:
- Our fts functions were imported from FreeBSD and consequently did not
use the same weak alias methodology that most of our glibc-derived
POSIX functions do. These subsequently wound up clashing with the
implementation of said functions in current versions of coreutils,
resulting in assertion failures when e.g. running a program through
stdbuf, since the BSD-derived functions had different flag constraints
than their GNU peers. Consequently, this change adjusts the fts_*
family of functions to similarly be exported as weak symbols so they
can be preempted.