Hi all,
I’ve been looking at the linenumbers element in struct program as a means of getting offsets for a given line number. Since a program can be made up of multiple files through includes, I need to make sure that when I look through the entries, that I’m only comparing line numbers that come from the file I’m interested in. The initial file marker entry appears correctly, however, when the file changes, a new marker entry doesn’t seem to be inserted in the array. I see that the line numbers jump correctly, but there is no other indication that the source of the lines has changed.
Is this intentional, or am I missing something?
Here’s an example tracing through a program with a file included within a function definition.
cnt: 127 <— beginning of program new file file: /Users/hww3/bpt.pike cnt: 0 line: 0 0x0 cnt: 36 line: 2 0x24 cnt: -127 line: 4 0xcd cnt: 54 line: 5 0x103 cnt: -127 line: 8 0x1ab cnt: -127 line: 9 0x23e cnt: 34 line: 10 0x260 cnt: 116 line: 12 0x2d4 cnt: -127 line: 14 0x37d cnt: 69 line: 15 0x3c2 cnt: -127 line: 16 0x467 cnt: -127 line: 18 0x52c cnt: -127 line: 19 0x5ff cnt: 76 line: 1 0x64b <— included file, line number jumps to 1, but no marker cnt: 114 line: 2 0x6bd cnt: 80 line: 21 0x70d <— back to original file, but also no marker cnt: -127 line: 22 0x7a6