[gnome-builder/wip/chergert/bug1: 25/42] debugger: fix some warnings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/bug1: 25/42] debugger: fix some warnings
- Date: Wed, 30 Aug 2017 06:31:48 +0000 (UTC)
commit 53ec4526866cae46d3b0c8ef104393e841dd3c0a
Author: Christian Hergert <chergert redhat com>
Date: Sat Aug 26 23:34:55 2017 -0700
debugger: fix some warnings
libide/debugger/ide-debug-manager.c | 9 ++++++++-
libide/debugger/ide-debugger-perspective.c | 8 ++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/libide/debugger/ide-debug-manager.c b/libide/debugger/ide-debug-manager.c
index 0c7eae9..adcd68a 100644
--- a/libide/debugger/ide-debug-manager.c
+++ b/libide/debugger/ide-debug-manager.c
@@ -140,7 +140,11 @@ ide_debug_manager_breakpoint_added (IdeDebugManager *self,
g_assert (IDE_IS_DEBUGGER_BREAKPOINT (breakpoint));
g_assert (IDE_IS_DEBUGGER (debugger));
+ /* If there is no file, then there is nothing to cache */
path = ide_debugger_breakpoint_get_file (breakpoint);
+ if (path == NULL)
+ return;
+
file = g_file_new_for_path (path);
breakpoints = g_hash_table_lookup (self->breakpoints, file);
@@ -173,8 +177,11 @@ ide_debug_manager_breakpoint_removed (IdeDebugManager *self,
g_assert (IDE_IS_DEBUGGER_BREAKPOINT (breakpoint));
g_assert (IDE_IS_DEBUGGER (debugger));
- line = ide_debugger_breakpoint_get_line (breakpoint);
path = ide_debugger_breakpoint_get_file (breakpoint);
+ if (path == NULL)
+ return;
+
+ line = ide_debugger_breakpoint_get_line (breakpoint);
file = g_file_new_for_path (path);
breakpoints = g_hash_table_lookup (self->breakpoints, file);
diff --git a/libide/debugger/ide-debugger-perspective.c b/libide/debugger/ide-debugger-perspective.c
index 2aad091..f5f619b 100644
--- a/libide/debugger/ide-debugger-perspective.c
+++ b/libide/debugger/ide-debugger-perspective.c
@@ -425,6 +425,14 @@ ide_debugger_perspective_navigate_to_breakpoint (IdeDebuggerPerspective *self,
*/
lookup.file = ide_debugger_breakpoint_get_file (breakpoint);
+
+ /* Some breakpoints require disassembly */
+ if (lookup.file == NULL)
+ {
+ /* TODO: disassemble frame and load source */
+ IDE_EXIT;
+ }
+
g_return_if_fail (lookup.file != NULL);
ide_layout_grid_foreach_view (self->layout_grid,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]