DwarfLoadingStateHandler now attempts to locate a matching package for the
missing debug information file. If one is found, the user is prompted to
install it. The actual installation process is currently handled by calling
pkgman, but this will be adjusted in future commits to either rely on
HaikuDepot in the graphical case, or to integrate the requisite functionality
directly so that proper download/installation progress can be shown.
In any case, this completes the low level functionality for ticket #10138,
leaving mainly presentation issues.
Add hook to UserInterface to query if Debugger is currently being run
interactively or not. Add corresponding implementations in
{CommandLine,Graphical}UserInterface.
- Remove duplicate instance of libshared.
- Add linker flags to not export symbols from linked in static libraries.
Resolves an issue on gcc4 where symbols from libedit and libsolv would clash,
leading to crashes.
- Add package kit-related headers and libraries.
No functional changes intended.
* Some variable renaming for clarity and consistency.
* Pointer style fixes.
* Added private method documentation back to cpp files for some methods.
Can be requested/stopped via BPackageRoster::{Start,Stop}Watching().
The notification message has the what code B_PACKAGE_UPDATE and contains
fields "event", "location", and "change count".
We already did this when the URL was entered in the address bar, now
also do it when it comes from a link in a webpage.
Makes mailto links work and fixes#6236.
- When terminating TeamWindow, if InspectorWindow is still active,
ensure that it's also quit at that point. Otherwise, it was
possible for the inspector window to receive the quit message from
the main application's shutdown process after TeamDebugger had
already been terminated, leading to a crash when the window tried to
release its current memory block, since the block manager had
already been destroyed by that point.
Rather than trying to buffer the entire report in memory and write
it in a single shot, write it incrementally as the data is gathered.
Fixes an issue reported by Diver with generating crash reports for
apps that had crashed due to an infinite recursion stack overflow.
Fixes#9593.
The complete name could be stored inside the file or as an additional
attribute, but do we really need it? The bookmark menu will truncate it
even further, anyway.
* Check that the two high-order byte of the DIB header size are 0 (the
largest known size according to wikipedia is 124 bytes).
* This avoids identifying any text file that starts with "BM" as a BMP
file.
Fixes#10912.
Block SIGCHLD in all threads and spawn a dedicated thread that handles
the signal in a loop (via sigwait()). This avoids the issue that the
SIGCHLD could be handled in any of our threads and thus possibly
interrupt a syscall.
Fixes#10941.
* Actually stop the download when the target file is deleted
* Check the download state before sending a notification or changing the
progress bar color.
Fixes#10907.
* In C++03 and earlier, the sign of the modulo result is implementation
defined (this was fixed in C++11).
* Setting a negative time is not what we want here, so make sure we use
the proper value.
* The Install() and Update() versions that take a const char* array
now check whether a string looks like a path to a local package file.
If so, they use that file instead of interpreting the string as a
search string.
* Extend the repository hierarchy. There's now a LocalRepository base
class from which InstalledRepository and the new MiscLocalRepository
derive. The latter is instantiated once and collects all package files
specified by path.
* BFatalErrorException: Add commitTransactionResult property and
respective constructor. In case committing the transaction failed,
BPackageManager throws a BFatalErrorException with the result.
* BFatalErrorException::UserInteractionHandler: Pass
BCommitTransactionResult to ProgressTransactionCommitted().
* BDaemonClient: Move inner class BCommitTransactionResult to top level
and make it public.
* BCommitTransactionResult:
- Add a whole bunch of specific error code enum values. Such an error
code is now the primary error, as opposed to before where we would
mix status_t and enum value errors. There's a systemError property
of type status_t which may provide additional information, though
(depending on the primary error type).
- Remove the errorMessage property. Due to mapping all errors to the
specific error codes this is no longer necessary. Mixing such a
message with another error description is also not very helpful when
it comes to localization (still not supported, though).
- Add several properties (paths, strings, error codes) that serve as
arguments to the primary error and are used by FullErrorMessage().
- Add issues property, a list of instances of new class
BTransactionIssue. Those describe non-critical issues (e.g. failed
update of a settings file) that occurred in the process of
committing the transaction. Those issues should be presented to the
user by the package management program.
* Exception: Adjust to transport the BCommitTransactionResult
properties.
* CommitTransactionHandler, FsTransactions, Root, Volume: Adjust to
BCommitTransactionResult/Exception changes.
* CommitTransactionHandler: Now requires a BCommitTransactionResult to
which it adds the issues it encounters. The reply BMessage is no
longer needed, though.
* Volume: Refactor common code from the three methods that use
CommitTransactionHandler into new method _CommitTransaction.
Add GetPathOrName() and PathOrName() methods which try to get some kind
of usable path or at least a file name for the entry. Useful mainly for
debugging and error reporting cases.
Add a listener interface for LoadImageDebugInfoJob that allows it to request
user assistance based on its current state. Adjust callers to pass in said
listener accordingly.
Implement the aforementioned listener interface in TeamDebugger, and use the
loading state handler roster to find the appropriate handler / handle the request.
This implements most of what's needed for #10138, the main piece still missing
is for the dwarf handler to detect whether the image in question comes from a package,
and if so, to offer to install the corresponding debug information package rather than
locating the file manually, assuming such a package exists.
Adds abstract class ImageDebugLoadingStateHandler which simply contains two
hooks, which allow one to a) ask it if it supports a handling a particular
type of loading state, and b) if so, ask it to attempt to handle that case,
given the passed in user interface object.
Also adds implementing subclass for DwarfImageDebugInfo, currently
intended primarily to handle the case of missing external debug information.
At present, this just supports prompting the user to find/install the file,
but eventually this will be extended to also support automatically installing
the corresponding debug information package, if applicable.
Finally, adds ImageDebugLoadingStateHandlerRoster, which acts as a front end
for matching up a given loading state with the appropriate handler.
In some circumstances, it may be necessary to ask the user to locate a file
from the lower layers. Adds the corresponding hook to UserInterface, and a
stub implementation for CommandLineUserInterface.
Adds full implementation for GraphicalUserInterface.
DwarfFile:
- Loading is now split into two steps, the first of which simply attempts to
verify the presence of debug information. If the latter is referenced
externally, but cannot be found on disk, the corresponding file reference is
returned.
TeamDebugInfo:
- Add state parameter to LoadImageDebugInfo(). Use it to preserve where we
are in the specific info loading loop if necessary.
SpecificTeamDebugInfo:
- Add parameter to CreateImageDebugInfo() to allow passing in a state object
and adjust implementing subclasses accordingly.
DwarfTeamDebugInfo:
- Preserve and/or pass down DwarfFile's loading state as needed.
DwarfManager:
- When attempting to load a DwarfFile, detect the case where external debug
information is referenced, but could not be located. If so, preserve the
relevant details in the loading state, so the user can be notified and
asked to find it accordingly.
LoadImageDebugInfoJob:
- Keep a state object for the progress of the current loading job. If a
particular image fails due to needing user input, suspend ourselves
until such input has been provided.
Adds a hierarchy of classes for preserving the loading state information for
a LoadImageDebugInfoJob. These include:
- ImageDebugInfoLoadingState:
Top level class that simply stores a reference for the specific info
state that we're currently attempting to load.
- SpecificImageDebugInfoLoadingState:
Abstract base class representing state information specific to a
particular kind of debug information.
- DwarfImageDebugInfoLoadingState:
Implementation of the above for the case of DWARF.
- DwarfFileLoadingState:
Encapsulates the in-progress loading state of a DWARF file for the case
where a file's debug information is referenced externally, but cannot
be found.
- In addition to waiting for one or more dependent jobs to complete,
a job can now potentially wait for user input to proceed further. Add
a corresponding job_wait_status and respective handling in Worker.
We don't need to create a BNode from a BDirectory because BDirectory derives
from BNode! So use the BDirectory we already have as a BNode and get the
node_ref from it so we can pass it into WatchNode().
Sorry for the noise.