aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-12 19:55:59 +0100
committerThomas White <taw@physics.org>2018-03-12 19:55:59 +0100
commit4c49a6a40fa0fead1e5ff8b1e654fed465492176 (patch)
treea94a9042a590636216dd66213f60cdad46f5ff93 /src
parent8164766c66c8d9149a7741e5625aef9d9fdac854 (diff)
Show SCBlocks for image/callback paragraphs in debugger
Diffstat (limited to 'src')
-rw-r--r--src/debugger.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/debugger.c b/src/debugger.c
index 09332d4..8ac275d 100644
--- a/src/debugger.c
+++ b/src/debugger.c
@@ -121,8 +121,13 @@ static void debug_text_para(Paragraph *para, cairo_t *cr, double *ypos,
plot_text(cr, ypos, fontdesc, "Error");
} else {
- snprintf(tmp, 255, " Run %i: SCBlock %p / %p", i,
- scblock, rscblock);
+ if ( scblock != rscblock ) {
+ snprintf(tmp, 255, " Run %i: SCBlock %p / %p", i,
+ scblock, rscblock);
+ } else {
+ snprintf(tmp, 255, " Run %i: SCBlock %p", i,
+ scblock);
+ }
plot_text(cr, ypos, fontdesc, tmp);
(*dpos)++;
@@ -134,6 +139,23 @@ static void debug_text_para(Paragraph *para, cairo_t *cr, double *ypos,
}
+static void debug_other_para(Paragraph *para, cairo_t *cr, double *ypos,
+ PangoFontDescription *fontdesc)
+{
+ char tmp[256];
+ SCBlock *scblock = para_scblock(para);
+ SCBlock *rscblock = para_rscblock(para);
+
+ if ( scblock == rscblock ) {
+ snprintf(tmp, 255, "SCBlock %p\n", scblock);
+ } else {
+ snprintf(tmp, 255, "SCBlock %p / %p\n", scblock, rscblock);
+ }
+
+ plot_text(cr, ypos, fontdesc, tmp);
+}
+
+
static void record_runs(struct debugwindow *dbgw)
{
int i;
@@ -222,7 +244,7 @@ static gboolean dbg_draw_sig(GtkWidget *da, cairo_t *cr, struct debugwindow *dbg
debug_text_para(dbgw->fr->paras[i], cr, &ypos, fontdesc,
dbgw->runs, &dpos, &changesig);
} else {
- dpos++;
+ debug_other_para(dbgw->fr->paras[i], cr, &ypos, fontdesc);
}
}