pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:8540:
} return res; } PMOD_EXPORT ptrdiff_t low_get_offset_for_line ( struct program *prog, struct pike_string * fname, INT_TYPE linep) {
+
ptrdiff_t gotoff = 0;
if (prog->program && prog->linenumbers) { struct pike_string *file = NULL; static char *base, *cnt; ptrdiff_t off; INT32 pid; INT_TYPE line = 0; int wanted_file = 0; base = NULL; off = 0; cnt = prog->linenumbers;
pike.git/src/program.c:8576:
} else { wanted_file = 0; } printf("file: %s\n", file->str); continue; } off+=get_small_number(&cnt); line+=get_small_number(&cnt);
-
//
printf("line: %d %p\n", line, off);
+
printf("line: %d %p\n", line, off);
-
if(wanted_file && line == linep) { printf("found offset for line %d.\n", linep);
return
off; }
+
if(wanted_file && line == linep) { printf("found offset for line %d
: %p
.\n", linep
, off
);
gotoff
=
off; }
} } else { fprintf(stderr, "No program of linenumbers program:%p linenumbers:%p\n", prog->program, prog->linenumbers); }
-
+
if(gotoff) return gotoff;
return 0; } PMOD_EXPORT struct pike_string *low_get_line (PIKE_OPCODE_T *pc, struct program *prog, INT_TYPE *linep) { linep[0] = 0; if (prog->program && prog->linenumbers) {