Go to the source code of this file.
Functions | |
| YASM_LIB_DECL yasm_linemap * | yasm_linemap_create (void) |
| Create a new line mapping repository. | |
| YASM_LIB_DECL void | yasm_linemap_destroy (yasm_linemap *linemap) |
| Clean up any memory allocated for a repository. | |
| YASM_LIB_DECL unsigned long | yasm_linemap_get_current (yasm_linemap *linemap) |
| Get the current line position in a repository. | |
| YASM_LIB_DECL int | yasm_linemap_get_source (yasm_linemap *linemap, unsigned long line, yasm_bytecode **bcp, const char **sourcep) |
| Get bytecode and source line information, if any, for a virtual line. | |
| YASM_LIB_DECL void | yasm_linemap_add_source (yasm_linemap *linemap, yasm_bytecode *bc, const char *source) |
| Add bytecode and source line information to the current virtual line. | |
| YASM_LIB_DECL unsigned long | yasm_linemap_goto_next (yasm_linemap *linemap) |
| Go to the next line (increments the current virtual line). | |
| YASM_LIB_DECL void | yasm_linemap_set (yasm_linemap *linemap, const char *filename, unsigned long file_line, unsigned long line_inc) |
| Set a new file/line physical association starting point at the current virtual line. | |
| YASM_LIB_DECL unsigned long | yasm_linemap_poke (yasm_linemap *linemap, const char *filename, unsigned long file_line) |
| Poke a single file/line association, restoring the original physical association starting point. | |
| YASM_LIB_DECL void | yasm_linemap_lookup (yasm_linemap *linemap, unsigned long line, const char **filename, unsigned long *file_line) |
| Look up the associated physical file and line for a virtual line. | |
| YASM_LIB_DECL int | yasm_linemap_traverse_filenames (yasm_linemap *linemap, void *d, int(*func)(const char *filename, void *d)) |
| Traverses all filenames used in a linemap, calling a function on each filename. | |
Definition in file linemap.h.
| YASM_LIB_DECL void yasm_linemap_add_source | ( | yasm_linemap * | linemap, | |
| yasm_bytecode * | bc, | |||
| const char * | source | |||
| ) |
Add bytecode and source line information to the current virtual line.
| linemap | line mapping repository | |
| bc | bytecode (if any) | |
| source | source code line |
| YASM_LIB_DECL yasm_linemap* yasm_linemap_create | ( | void | ) |
Create a new line mapping repository.
| YASM_LIB_DECL void yasm_linemap_destroy | ( | yasm_linemap * | linemap | ) |
Clean up any memory allocated for a repository.
| linemap | line mapping repository |
| YASM_LIB_DECL unsigned long yasm_linemap_get_current | ( | yasm_linemap * | linemap | ) |
Get the current line position in a repository.
| linemap | line mapping repository |
| YASM_LIB_DECL int yasm_linemap_get_source | ( | yasm_linemap * | linemap, | |
| unsigned long | line, | |||
| yasm_bytecode ** | bcp, | |||
| const char ** | sourcep | |||
| ) |
Get bytecode and source line information, if any, for a virtual line.
| linemap | line mapping repository | |
| line | virtual line | |
| bcp | pointer to return bytecode into | |
| sourcep | pointer to return source code line pointer into |
| YASM_LIB_DECL unsigned long yasm_linemap_goto_next | ( | yasm_linemap * | linemap | ) |
Go to the next line (increments the current virtual line).
| linemap | line mapping repository |
| YASM_LIB_DECL void yasm_linemap_lookup | ( | yasm_linemap * | linemap, | |
| unsigned long | line, | |||
| const char ** | filename, | |||
| unsigned long * | file_line | |||
| ) |
Look up the associated physical file and line for a virtual line.
| linemap | line mapping repository | |
| line | virtual line | |
| filename | physical file name (output) | |
| file_line | physical line number (output) |
| YASM_LIB_DECL unsigned long yasm_linemap_poke | ( | yasm_linemap * | linemap, | |
| const char * | filename, | |||
| unsigned long | file_line | |||
| ) |
Poke a single file/line association, restoring the original physical association starting point.
Caution: increments the current virtual line twice.
| linemap | line mapping repository | |
| filename | physical file name (if NULL, not changed) | |
| file_line | physical line number |
| YASM_LIB_DECL void yasm_linemap_set | ( | yasm_linemap * | linemap, | |
| const char * | filename, | |||
| unsigned long | file_line, | |||
| unsigned long | line_inc | |||
| ) |
Set a new file/line physical association starting point at the current virtual line.
line_inc indicates how much the "real" line is incremented by for each virtual line increment (0 is perfectly legal).
| linemap | line mapping repository | |
| filename | physical file name (if NULL, not changed) | |
| file_line | physical line number | |
| line_inc | line increment |
| YASM_LIB_DECL int yasm_linemap_traverse_filenames | ( | yasm_linemap * | linemap, | |
| void * | d, | |||
| int(*)(const char *filename, void *d) | func | |||
| ) |
Traverses all filenames used in a linemap, calling a function on each filename.
| linemap | line mapping repository | |
| d | data pointer passed to func on each call | |
| func | function |
1.5.2