Permalink
Browse files

better stack traces for ELF x86_64

  • Loading branch information...
andrewrk committed Apr 24, 2017
1 parent 08a871f commit 245eed8afee899cb0d0a2dac60c8a1edc6be654d
Showing with 573 additions and 68 deletions.
  1. +1 −0 src/analyze.cpp
  2. +1 −1 src/codegen.cpp
  3. +1 −1 src/main.cpp
  4. +453 −58 std/debug.zig
  5. +21 −0 std/dwarf.zig
  6. +2 −3 std/elf.zig
  7. +16 −2 std/io.zig
  8. +72 −2 std/os/linux.zig
  9. +4 −1 std/os/path.zig
  10. +2 −0 std/special/bootstrap.zig
View
@@ -2894,6 +2894,7 @@ ImportTableEntry *add_source_file(CodeGen *g, PackageTableEntry *package,
ast_print(stderr, import_entry->root, 0);
}
+ // TODO: assert that src_basename has no '/' in it
import_entry->di_file = ZigLLVMCreateFile(g->dbuilder, buf_ptr(src_basename), buf_ptr(src_dirname));
g->import_table.put(abs_full_path, import_entry);
g->import_queue.append(import_entry);
View
@@ -4647,7 +4647,7 @@ static void init(CodeGen *g, Buf *source_path) {
bool is_optimized = g->is_release_build;
const char *flags = "";
unsigned runtime_version = 0;
- ZigLLVMDIFile *compile_unit_file = ZigLLVMCreateFile(g->dbuilder, buf_ptr(source_path),
+ ZigLLVMDIFile *compile_unit_file = ZigLLVMCreateFile(g->dbuilder, buf_ptr(g->root_out_name),
buf_ptr(&g->root_package->root_src_dir));
g->compile_unit = ZigLLVMCreateCompileUnit(g->dbuilder, ZigLLVMLang_DW_LANG_C99(),
compile_unit_file, buf_ptr(producer), is_optimized, flags, runtime_version,
View
@@ -475,7 +475,7 @@ int main(int argc, char **argv) {
}
}
- bool need_name = (cmd == CmdBuild || cmd == CmdAsm || cmd == CmdLink);
+ bool need_name = (cmd == CmdBuild || cmd == CmdAsm || cmd == CmdLink || cmd == CmdParseH);
Buf in_file_buf = BUF_INIT;
Oops, something went wrong.

0 comments on commit 245eed8

Please sign in to comment.