mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
Fix stepping/jumping between procedures/files.
This commit is contained in:
+7
-2
@@ -1951,31 +1951,36 @@ void print_llvm_ir(irGen *ir) {
|
|||||||
", globals: !0"
|
", globals: !0"
|
||||||
")",
|
")",
|
||||||
file->id, LIT(build_context.ODIN_VERSION));
|
file->id, LIT(build_context.ODIN_VERSION));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case irDebugInfo_File:
|
case irDebugInfo_File:
|
||||||
|
// TODO(lachsinc): Does windows debug info expect '/' or '\5C' path separators ??
|
||||||
ir_fprintf(f, "!DIFile(filename: \""); ir_print_escape_path(f, di->File.filename);
|
ir_fprintf(f, "!DIFile(filename: \""); ir_print_escape_path(f, di->File.filename);
|
||||||
ir_fprintf(f, "\", directory: \""); ir_print_escape_path(f, di->File.directory);
|
ir_fprintf(f, "\", directory: \""); ir_print_escape_path(f, di->File.directory);
|
||||||
ir_fprintf(f, "\"");
|
ir_fprintf(f, "\"");
|
||||||
ir_fprintf(f, ")");
|
ir_fprintf(f, ")");
|
||||||
break;
|
break;
|
||||||
case irDebugInfo_Proc:
|
case irDebugInfo_Proc:
|
||||||
|
// TODO(lach): We need to store scope info inside di, not just file info, for procs.
|
||||||
ir_fprintf(f, "distinct !DISubprogram("
|
ir_fprintf(f, "distinct !DISubprogram("
|
||||||
"name: \"%.*s\""
|
"name: \"%.*s\""
|
||||||
", linkageName: \"%.*s\""
|
", linkageName: \"%.*s\""
|
||||||
|
", scope: !%d"
|
||||||
", file: !%d"
|
", file: !%d"
|
||||||
", line: %td"
|
", line: %td"
|
||||||
|
", scopeLine: %td"
|
||||||
", isDefinition: true"
|
", isDefinition: true"
|
||||||
", isLocal: true"
|
", isLocal: false" // TODO(lach): This used to be always set to true, pretend no local for now. We need to check if scope == file.
|
||||||
", flags: DIFlagPrototyped"
|
", flags: DIFlagPrototyped"
|
||||||
", isOptimized: false"
|
", isOptimized: false"
|
||||||
", unit: !%d"
|
", unit: !%d"
|
||||||
", type: !DISubroutineType(types: !{",
|
", type: !DISubroutineType(types: !{",
|
||||||
LIT(di->Proc.entity->token.string),
|
LIT(di->Proc.entity->token.string),
|
||||||
LIT(di->Proc.name),
|
LIT(di->Proc.name),
|
||||||
|
di->Proc.file->id, // TODO(lachsinc): HACK For now lets pretend all procs scope's == file.
|
||||||
di->Proc.file->id,
|
di->Proc.file->id,
|
||||||
di->Proc.pos.line,
|
di->Proc.pos.line,
|
||||||
|
di->Proc.pos.line, // NOTE(lachsinc): Assume scopeLine always same as line.
|
||||||
m->debug_compile_unit->id);
|
m->debug_compile_unit->id);
|
||||||
if (di->Proc.return_types.count == 0) {
|
if (di->Proc.return_types.count == 0) {
|
||||||
ir_fprintf(f, "null})");
|
ir_fprintf(f, "null})");
|
||||||
|
|||||||
Reference in New Issue
Block a user