diff options
-rw-r--r-- | src/debugger.c | 13 | ||||
-rw-r--r-- | src/frame.c | 7 | ||||
-rw-r--r-- | src/frame.h | 3 |
3 files changed, 17 insertions, 6 deletions
diff --git a/src/debugger.c b/src/debugger.c index 808c962..e90eef2 100644 --- a/src/debugger.c +++ b/src/debugger.c @@ -43,7 +43,8 @@ struct run_debug enum para_type para_type; int np; - void *scblock; /* Don't you dare try to dereference this */ + void *scblock; /* Don't you dare try to dereference this. */ + void *rscblock; /* Or this. */ }; @@ -115,11 +116,13 @@ static void debug_text_para(Paragraph *para, cairo_t *cr, double *ypos, for ( i=0; i<nrun; i++ ) { SCBlock *scblock; - if ( para_debug_run_info(para, i, &scblock) ) { + SCBlock *rscblock; + if ( para_debug_run_info(para, i, &scblock, &rscblock) ) { plot_text(cr, ypos, fontdesc, "Error"); } else { - snprintf(tmp, 255, " Run %i: SCBlock %p", i, scblock); + snprintf(tmp, 255, " Run %i: SCBlock %p / %p", i, + scblock, rscblock); plot_text(cr, ypos, fontdesc, tmp); (*dpos)++; @@ -153,11 +156,13 @@ static void record_runs(struct debugwindow *dbgw) for ( j=0; j<nrun; j++ ) { SCBlock *scblock; + SCBlock *rscblock; - if ( para_debug_run_info(para, j, &scblock) ) continue; + if ( para_debug_run_info(para, j, &scblock, &rscblock) ) continue; dbgw->runs[n].np = i; dbgw->runs[n].scblock = scblock; + dbgw->runs[n].rscblock = rscblock; n++; if ( n == MAX_DEBUG_RUNS ) { diff --git a/src/frame.c b/src/frame.c index 26c787d..abdebe0 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1757,6 +1757,7 @@ Paragraph *current_para(struct frame *fr) return NULL; } + void *get_para_bvp(Paragraph *para) { if ( para->type != PARA_TYPE_CALLBACK ) return NULL; @@ -1775,17 +1776,21 @@ enum para_type para_type(Paragraph *para) return para->type; } + int para_debug_num_runs(Paragraph *para) { if ( para->type != PARA_TYPE_TEXT ) return 0; return para->n_runs; } -int para_debug_run_info(Paragraph *para, int i, SCBlock **scblock) + +int para_debug_run_info(Paragraph *para, int i, SCBlock **scblock, + SCBlock **rscblock) { if ( para->type != PARA_TYPE_TEXT ) return 1; if ( i >= para->n_runs ) return 1; *scblock = para->runs[i].scblock; + *rscblock = para->runs[i].rscblock; return 0; } diff --git a/src/frame.h b/src/frame.h index 0ccc47b..f3e1538 100644 --- a/src/frame.h +++ b/src/frame.h @@ -206,6 +206,7 @@ extern enum para_type para_type(Paragraph *para); extern SCBlock *para_scblock(Paragraph *para); extern int para_debug_num_runs(Paragraph *para); -extern int para_debug_run_info(Paragraph *para, int i, SCBlock **scblock); +extern int para_debug_run_info(Paragraph *para, int i, SCBlock **scblock, + SCBlock **rscblock); #endif /* FRAME_H */ |