Debugger: Finish handling of missing debug information.
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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||
* Copyright 2013, Rene Gollent, [email protected].
|
||||
* Copyright 2013-2014, Rene Gollent, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef TEAM_DEBUGGER_H
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <debug_support.h>
|
||||
|
||||
#include "DebugEvent.h"
|
||||
#include "Jobs.h"
|
||||
#include "Team.h"
|
||||
#include "TeamSettings.h"
|
||||
#include "ThreadHandler.h"
|
||||
@@ -30,7 +31,8 @@ class WatchpointManager;
|
||||
|
||||
|
||||
class TeamDebugger : public BLooper, private UserInterfaceListener,
|
||||
private JobListener, private Team::Listener {
|
||||
private JobListener, private ImageDebugInfoJobListener,
|
||||
private Team::Listener {
|
||||
public:
|
||||
class Listener;
|
||||
|
||||
@@ -110,6 +112,9 @@ private:
|
||||
virtual void JobFailed(Job* job);
|
||||
virtual void JobAborted(Job* job);
|
||||
|
||||
virtual void ImageDebugInfoJobNeedsUserInput(Job* job,
|
||||
ImageDebugInfoLoadingState* state);
|
||||
|
||||
// Team::Listener
|
||||
virtual void ThreadStateChanged(
|
||||
const ::Team::ThreadEvent& event);
|
||||
@@ -178,6 +183,9 @@ private:
|
||||
status_t _HandleSetArguments(int argc,
|
||||
const char* const* argv);
|
||||
|
||||
void _HandleDebugInfoJobUserInput(
|
||||
ImageDebugInfoLoadingState* state);
|
||||
|
||||
ThreadHandler* _GetThreadHandler(thread_id threadID);
|
||||
|
||||
status_t _AddImage(const ImageInfo& imageInfo,
|
||||
|
||||
Reference in New Issue
Block a user