Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Günther Wagner
gnome-builder
Commits
a481f8d8
Commit
a481f8d8
authored
Mar 21, 2018
by
Christian Hergert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug-manager: port to IdeTask
This also fixes an issue where we weren't returning a result for a task.
parent
7664c4b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
src/libide/debugger/ide-debug-manager.c
src/libide/debugger/ide-debug-manager.c
+11
-7
No files found.
src/libide/debugger/ide-debug-manager.c
View file @
a481f8d8
...
...
@@ -34,6 +34,7 @@
#include "files/ide-file.h"
#include "plugins/ide-extension-util.h"
#include "runner/ide-runner.h"
#include "threading/ide-task.h"
#define TAG_CURRENT_BKPT "debugger::current-breakpoint"
...
...
@@ -451,7 +452,7 @@ ide_debug_manager_load_file_cb (GObject *object,
gpointer
user_data
)
{
IdeBufferManager
*
bufmgr
=
(
IdeBufferManager
*
)
object
;
g_autoptr
(
G
Task
)
task
=
user_data
;
g_autoptr
(
Ide
Task
)
task
=
user_data
;
g_autoptr
(
IdeBuffer
)
buffer
=
NULL
;
g_autoptr
(
GError
)
error
=
NULL
;
IdeDebuggerBreakpoint
*
breakpoint
;
...
...
@@ -461,24 +462,27 @@ ide_debug_manager_load_file_cb (GObject *object,
g_assert
(
IDE_IS_BUFFER_MANAGER
(
bufmgr
));
g_assert
(
G_IS_ASYNC_RESULT
(
result
));
g_assert
(
G
_IS_TASK
(
task
));
g_assert
(
IDE
_IS_TASK
(
task
));
buffer
=
ide_buffer_manager_load_file_finish
(
bufmgr
,
result
,
&
error
);
if
(
buffer
==
NULL
)
{
g_warning
(
"%s"
,
error
->
message
);
ide_task_return_error
(
task
,
g_steal_pointer
(
&
error
));
IDE_EXIT
;
}
self
=
g
_task_get_source_object
(
task
);
self
=
ide
_task_get_source_object
(
task
);
g_assert
(
IDE_IS_DEBUG_MANAGER
(
self
));
breakpoint
=
g
_task_get_task_data
(
task
);
breakpoint
=
ide
_task_get_task_data
(
task
);
g_assert
(
IDE_IS_DEBUGGER_BREAKPOINT
(
breakpoint
));
ide_debug_manager_mark_stopped
(
self
,
buffer
,
breakpoint
);
ide_task_return_boolean
(
task
,
TRUE
);
IDE_EXIT
;
}
...
...
@@ -498,10 +502,10 @@ ide_debug_manager_real_breakpoint_reached (IdeDebugManager *self,
IdeContext
*
context
=
ide_object_get_context
(
IDE_OBJECT
(
self
));
IdeBufferManager
*
bufmgr
=
ide_context_get_buffer_manager
(
context
);
g_autoptr
(
IdeFile
)
file
=
ide_file_new_for_path
(
context
,
path
);
g_autoptr
(
G
Task
)
task
=
NULL
;
g_autoptr
(
Ide
Task
)
task
=
NULL
;
task
=
g
_task_new
(
self
,
NULL
,
NULL
,
NULL
);
g
_task_set_task_data
(
task
,
g_object_ref
(
breakpoint
),
g_object_unref
);
task
=
ide
_task_new
(
self
,
NULL
,
NULL
,
NULL
);
ide
_task_set_task_data
(
task
,
g_object_ref
(
breakpoint
),
g_object_unref
);
ide_buffer_manager_load_file_async
(
bufmgr
,
file
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment