Showing the changes to src/asm/sbl_reader.cpp (1 of 4 files). Show all
Unified · Split
| @@ -243,7 +243,7 @@ namespace · 242 unmodified lines | ||
| 243 | 243 | source_ref_t src; |
| 244 | 244 | |
| 245 | 245 | // Initialize the source with the last state |
| 246 | − src.source_id = fc.last_file; | |
| 246 | + src.begin_source_id = fc.last_file; | |
| 247 | 247 | src.begin_line = fc.last_line; |
| 248 | 248 | src.end_line = fc.last_line; |
| 249 | 249 | for (auto i = std::size_t{ 0 }; i < src_parts.size(); ++i) |
| @@ -274,8 +274,10 @@ namespace · 24 unmodified lines | ||
| 274 | 274 | } |
| 275 | 275 | else if (pos[j] == ':') |
| 276 | 276 | { |
| 277 | − assert((i == 0 || src.source_id == v) && "Source position should not change across statements"); | |
| 278 | − src.source_id = v; | |
| 277 | + if (i == 0) | |
| 278 | + src.begin_source_id = v; | |
| 279 | + | |
| 280 | + src.end_source_id = v; | |
| 279 | 281 | fc.last_file = v; |
| 280 | 282 | } |
| 281 | 283 | } |
| @@ -310,7 +312,7 @@ namespace · 28 unmodified lines | ||
| 310 | 312 | curr_item.debug_statement = std::stoi(pc_item_parts[1]); |
| 311 | 313 | |
| 312 | 314 | // Record the current source and line ID since those are the new default values |
| 313 | − last_source = curr_item.source.source_id; | |
| 315 | + last_source = curr_item.source.end_source_id; | |
| 314 | 316 | last_line = curr_item.source.end_line; |
| 315 | 317 | |
| 316 | 318 | pc_table[i] = std::move(curr_item); |