After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782357 - Implement step in/over for wip/debugger
Implement step in/over for wip/debugger
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: libide
Flatpak Nightly Channel
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-08 23:32 UTC by Alberto Fanjul
Modified: 2017-05-09 21:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Step in/over implementation (9.91 KB, patch)
2017-05-08 23:32 UTC, Alberto Fanjul
none Details | Review
Implement step in/over (9.34 KB, patch)
2017-05-09 18:31 UTC, Alberto Fanjul
needs-work Details | Review
debugger: implement step in/over (8.84 KB, patch)
2017-05-09 21:36 UTC, Christian Hergert
none Details | Review
debugger: implement step in/over (8.85 KB, patch)
2017-05-09 21:42 UTC, Christian Hergert
none Details | Review

Description Alberto Fanjul 2017-05-08 23:32:40 UTC
Created attachment 351398 [details] [review]
Step in/over implementation

Add step in and step over for wip branch wip/chergert/debugger

Fix error by 1 in stopped line

TODO:

- avoid to load buffer if previous stopped line is on same buffer
- scroll to stopped line
- highlight stopped line

DOUBTS:

Randomly, source file is not loaded into the view (seems related with async but cannot find the problem)
Comment 1 Christian Hergert 2017-05-09 00:00:34 UTC
Review of attachment 351398 [details] [review]:

Some style nits, but once those are fixed can probably merge to the branch.

::: contrib/mi2/mi2-client.c
@@ +970,3 @@
+void
+mi2_client_step_async (Mi2Client           *self,
+ *

Fix alignment here

@@ +1003,3 @@
+void
+mi2_client_next_async (Mi2Client           *self,
+  task = g_task_new (self, cancellable, callback, user_data);

and here

@@ +1090,3 @@
+mi2_client_step_finish (Mi2Client     *self,
+                            GAsyncResult  *result,
+ * Completes an asynchronous request to mi2_client_step_async().

and here

@@ +1110,3 @@
+gboolean
+mi2_client_next_finish (Mi2Client     *self,
+  g_return_val_if_fail (G_IS_TASK (result), FALSE);

and here

::: contrib/mi2/mi2-client.h
@@ -103,0 +104,6 @@
+void           mi2_client_step_async                      (Mi2Client            *self,
+                                                           gboolean              reverse,
+                                                           GCancellable         *cancellable,
... 3 more ...

Add public API _finish() calls

::: libide/debugger/ide-debugger-view.h
@@ +32,3 @@
 GtkWidget       *ide_debugger_view_new        (void);
 GtkSourceBuffer *ide_debugger_view_get_buffer (IdeDebuggerView *self);
+GtkSourceView   *ide_debugger_view_get_view (IdeDebuggerView *self);

Fix alignment of (
Comment 2 Alberto Fanjul 2017-05-09 18:31:17 UTC
Created attachment 351477 [details] [review]
Implement step in/over

Alignment fixed
Comment 3 Alberto Fanjul 2017-05-09 18:35:27 UTC
Fix to get view from debugger perspective worked!

TODO:

- Avoid to reload buffer if previous stopped line is on same buffer
- Highlight stopped line
- Scroll to stopped line
Comment 4 Christian Hergert 2017-05-09 18:58:38 UTC
Review of attachment 351477 [details] [review]:

::: contrib/mi2/mi2-client.c
@@ +971,3 @@
+mi2_client_step_async (Mi2Client               *self,
+                           gboolean             reverse,
+ * Asynchronously executes the continue command.

All of these still need fixing.
Comment 5 Christian Hergert 2017-05-09 21:36:23 UTC
Created attachment 351483 [details] [review]
debugger: implement step in/over

This implements step in/over by adding step and next operations to the
Mi2Client and plumbing them in to IdeDebugger and GbpGdbDebugger.
Comment 6 Christian Hergert 2017-05-09 21:37:19 UTC
Attachment 351483 [details] pushed as 7427400 - debugger: implement step in/over
Comment 7 Christian Hergert 2017-05-09 21:42:12 UTC
Created attachment 351485 [details] [review]
debugger: implement step in/over

This implements step in/over by adding step and next operations to the
Mi2Client and plumbing them in to IdeDebugger and GbpGdbDebugger.