From c4e0e4197d0c8b771cec0ea8a749f2b845d6c208 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 23 Feb 2010 18:49:02 -0500 Subject: [PATCH] [ShellGlobal] Add shell_global_breakpoint This is useful for debugging with gdb. --- src/shell-global.c | 13 +++++++++++++ src/shell-global.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/shell-global.c b/src/shell-global.c index e3e177777..2cee51e08 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -783,6 +783,19 @@ shell_global_reexec_self (ShellGlobal *global) g_ptr_array_free (arr, TRUE); } +/** + * shell_global_breakpoint: + * @global: A #ShellGlobal + * + * Using G_BREAKPOINT(), interrupt the current process. This is useful + * in conjunction with a debugger such as gdb. + */ +void +shell_global_breakpoint (ShellGlobal *global) +{ + G_BREAKPOINT (); +} + /** * shell_global_gc: * @global: A #ShellGlobal diff --git a/src/shell-global.h b/src/shell-global.h index 702c18404..a3cd89c32 100644 --- a/src/shell-global.h +++ b/src/shell-global.h @@ -70,6 +70,8 @@ gboolean shell_global_display_is_grabbed (ShellGlobal *global); void shell_global_reexec_self (ShellGlobal *global); +void shell_global_breakpoint (ShellGlobal *global); + void shell_global_gc (ShellGlobal *global); void shell_global_format_time_relative_pretty (ShellGlobal *global, guint delta, char **text, guint *update_time);