Browse files

Merge pull request #29 from cesspit/debugger_bugfixing

Debugger bugfixing
  • Loading branch information...
2 parents 57b4736 + 21a66f2 commit 2fb87402aabeab4b4893d4154457f910bcc350b7 @cesspit cesspit committed Apr 12, 2012
Showing with 54 additions and 20 deletions.
  1. +9 −0 debugger/ChangeLog
  2. +20 −16 debugger/TODO
  3. +22 −2 debugger/src/callbacks.c
  4. +3 −2 debugger/src/dbm_gdb.c
View
9 debugger/ChangeLog
@@ -1,3 +1,12 @@
+08-04-2012 Alexander Petukhov <devel@apetukhov.ru>
+
+ * fixed a bug with wrong error message when a breakpoint condition/hitscounr can't be set
+ * fixed a bug when gdb exits without a stop reason
+
+07-04-2012 Alexander Petukhov <devel@apetukhov.ru>
+
+ * fixed a bug with calltips still being shown when a pointer leaves editor window
+
04-04-2012 Alexander Petukhov <devel@apetukhov.ru>
* fixing exiting with code case that was unhandled and caused SIGSEGV (gdb)
View
36 debugger/TODO
@@ -1,23 +1,27 @@
BUGS:
-- tooltip appears even if a pointer in no longer inside editor window
FEATURES:
-- custom tooltip with sticking facilities
-- don't hide a tooltip until run hasn't happent, move it if document is being scrolled
-- use lexer to lookup for a symbol under cursor when presenting a tooltip
-- geany menu integration
-- toolbar buttons
-- margin context menu
-- step back
-- tree views column width/autowidth
-- attach functionality: dbm_ methods providing target lists, common dialog
-- android support
-- bashdb support
-- windows support
+
+- debug callbacks names (refactoring)
- gdb backend step speed
-- debug callbacks names
+- windows support
+
+- attach functionality: dbm_ methods providing target lists, common dialog
- interrupt thread using stack window
-- custom tooltip on breaks and stack trace windows with code snippet around break or frame
+- step back
+
+- margin context menu
+- editor context menu (add watch, add/remove breakpoint)
+
- font from the geany settings for a message window
-- a button in the upper right path of a right notebook for a hiding/showing button panel
- use left/right keys to collapse/expand in breakpoints tree
+- use lexer to lookup for a symbol under cursor when presenting a tooltip
+- a button in the upper right path of a right notebook for a hiding/showing button panel
+- minimum width of the debug panel notebooks
+- tree views column width/autowidth
+- custom tooltip on breaks and stack trace windows with code snippet around break or frame
+- custom tooltip(in an editor in debug mode) with sticking facilities
+- don't hide a tooltip until run hasn't happent, move it if document is being scrolled
+
+- android support
+- bashdb support
View
24 debugger/src/callbacks.c
@@ -155,6 +155,21 @@ void on_document_open(GObject *obj, GeanyDocument *doc, gpointer user_data)
}
/*
+ * Handles mouse leave event to check if a calltip is still present and hides it if yes
+ */
+static gint leave_signal;
+static gboolean on_mouse_leave(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ ScintillaObject *so = (ScintillaObject*)widget;
+ if (scintilla_send_message (so, SCI_CALLTIPACTIVE, 0, 0))
+ {
+ g_signal_handler_disconnect(G_OBJECT(widget), leave_signal);
+ scintilla_send_message (so, SCI_CALLTIPCANCEL, 0, 0);
+ }
+ return FALSE;
+}
+
+/*
* Occures on notify from editor.
* Handles margin click to set/remove breakpoint
*/
@@ -194,7 +209,7 @@ gboolean on_editor_notify(
{
if (DBS_STOPPED != debug_get_state ())
break;
-
+
/* get a word under the cursor */
GString *word = get_word_at_position(editor->sci, nt->position);
@@ -203,6 +218,7 @@ gboolean on_editor_notify(
gchar *calltip = debug_get_calltip_for_expression(word->str);
if (calltip)
{
+ leave_signal = g_signal_connect(G_OBJECT(editor->sci), "leave-notify-event", G_CALLBACK(on_mouse_leave), NULL);
scintilla_send_message (editor->sci, SCI_CALLTIPSHOW, nt->position, (long)calltip);
}
}
@@ -216,7 +232,11 @@ gboolean on_editor_notify(
if (DBS_STOPPED != debug_get_state ())
break;
- scintilla_send_message (editor->sci, SCI_CALLTIPCANCEL, 0, 0);
+ if (scintilla_send_message (editor->sci, SCI_CALLTIPACTIVE, 0, 0))
+ {
+ g_signal_handler_disconnect(G_OBJECT(editor->sci), leave_signal);
+ scintilla_send_message (editor->sci, SCI_CALLTIPCANCEL, 0, 0);
+ }
break;
}
case SCN_MODIFYATTEMPTRO:
View
5 debugger/src/dbm_gdb.c
@@ -497,7 +497,7 @@ static gboolean on_read_from_gdb(GIOChannel * src, GIOCondition cond, gpointer d
else
{
/* somehow, sometimes there can be no stop reason */
- stop_reason = SR_END_STEPPING_RANGE;
+ stop_reason = SR_EXITED_NORMALLY;
}
if (SR_BREAKPOINT_HIT == stop_reason || SR_END_STEPPING_RANGE == stop_reason || SR_SIGNAL_RECIEVED == stop_reason)
@@ -817,7 +817,6 @@ gboolean run(const gchar* file, const gchar* commandline, GList* env, GList *wit
commands = add_to_queue(commands, NULL, command->str, error_message->str, TRUE);
g_string_free(command, TRUE);
- g_string_free(error_message, TRUE);
if (bp->hitscount)
{
@@ -841,6 +840,8 @@ gboolean run(const gchar* file, const gchar* commandline, GList* env, GList *wit
g_string_free(command, TRUE);
}
+ g_string_free(error_message, TRUE);
+
bp_index++;
biter = biter->next;
}

0 comments on commit 2fb8740

Please sign in to comment.