1. Mapping machine addresses to source file and line numbers.

Going back to basics, from a carte blanche design perspective, how might you best achive this?

Obviously the compiler reads the source so knows some line numbers, and generates the corresponding binary,
so at some point, somehow, somewhere, it should be able to save whatever you need in some suitable structure.

Performance at the point of use is not an issue, but (packed) size and initial build speed probably are.

Choose anything from flat tables, binary and other trees, dictionaries, or whatever else might be useful.

PS The current mechanism is per-routine (including implicit file subroutines) packed delta offset tables(!).

new topic     » topic index » view message » categorize

2. Re: Mapping machine addresses to source file and line numbers.

I would use DWARF debugging standard. It's stable and mature and provides a lot of flexibility for custom information if you need it (see section 7.1 Vendor Extensibility).

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Mapping machine addresses to source file and line numbers.

Smells like, with compilation (or conversion to IL code) delayed until it's needed, someone could sneak in alternative source code lines for execution. This could be a whole new level of program flow control.

Last method of control i saw as epic was a jump table, where the choice of wherein to jump was set by a set of three(?) registered parallel lines from outside the cpu as the lowest bits of the JMP target byte.

smile

Kat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu