Git Product home page Git Product logo

Comments (3)

guidorice avatar guidorice commented on August 24, 2024

Mojo build has this warning in it's help banner:

Please note that there are issues when generating debug info for some Mojo programs that have yet to be addressed.

Alas, I tried some experiments with the mojo debugger, but failed to emit the file and line number of the mojo source:

$ mojo build --no-optimization --debug-info-language Mojo --debug-level full pytest_experiment.mojo 

$ mojo debug pytest_experiment
Current executable set to '/Users/guidorice/mojo/scratch/pytest_experiment' (arm64).
(lldb) b main
Breakpoint 1: 2 locations.
(lldb) r
Process 82556 launched: '/Users/guidorice/mojo/scratch/pytest_experiment' (arm64)
Process 82556 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2
    frame #0: 0x0000000100008d98 pytest_experiment`main
pytest_experiment`main:
->  0x100008d98 <+0>:  stp    x29, x30, [sp, #-0x10]!
    0x100008d9c <+4>:  bl     0x100008724    ; _builtin__startup___wrap_and_execute_main_fn_None_builtin_simd_SIMD_si32_1___mlir_type_kgen_pointer_pointer_scalar_ui8__12x5_main_func_pytest_experiment_mainkA6A6AkA6A6AcBoApAgAtA_AgAeBoAkA6A6AkA6A6AcB8B_BsAgA8B_BeBsAuAhAuA8A8A8A_A_A_ApAsA9ABBiAkA6A6AoApAiA
    0x100008da0 <+8>:  ldp    x29, x30, [sp], #0x10
    0x100008da4 <+12>: ret    
(lldb) image lookup --address 0x100008d98
      Address: pytest_experiment[0x0000000100008d98] (pytest_experiment.__TEXT.__text + 17744)
      Summary: pytest_experiment`main

Reference: https://stackoverflow.com/questions/59013694/how-to-get-line-numbers-same-as-lldb-using-atos-addr2line-llvm-symbolizer-lldb-i

from mojo-pytest.

guidorice avatar guidorice commented on August 24, 2024

Need to re-evaluate if this is feasible, after #17 .

from mojo-pytest.

guidorice avatar guidorice commented on August 24, 2024

Closing this until such time as mojo test produces code coverage info in it's diagnostic output.

from mojo-pytest.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.