GithubHelp home page GithubHelp logo

Comments (4)

jonas-schievink avatar jonas-schievink commented on September 26, 2024

It looks like the backtrace crate (and thus libstd) do still use libunwind to unwind the stack, just symbolication is done with gimli. So that explains why it works there even without debuginfo.

from probe-run.

jonas-schievink avatar jonas-schievink commented on September 26, 2024

It actually looks like there simply isn't any DWARF data for certain functions when setting debug = false. My current assumption is that this means that unwinding is trivial (ie. just follow LR), and that seems to hold up in practice so far, except that we cannot detect the end of the stack properly since 0xFFFFFFFF never ends up in LR this way.

from probe-run.

japaric avatar japaric commented on September 26, 2024

Hitting this with the LPC845. I get roughly the same output using both the dev and release profile:

stack backtrace:
   0: 0x000002f0 - __bkpt
   1: 0x000002e4 - my_app::exit
   2: 0x00000160 - hello::__cortex_m_rt_main
   3: 0x000000c8 - main
   4: 0x000001a2 - Reset
   5: 0x0f0002e4 - <unknown>

It seems the unwinder is going beyond the zero-th stack frame. It could be that this particular hardware (Cortex-M0+) initializes the LR register on reset to the value 0x0f0002e4? If that's the case perhaps we could have probe-run set LR to 0xFFFFFFFF after flash+reset-ing the device (there should be some API to reset and halt right after reset)

from probe-run.

japaric avatar japaric commented on September 26, 2024

ran into this issue today while running cargo test. This error path makes probe-run exit with a non-zero code so this bug is making cargo test fail even though 'all tests passed' was printed. Will investigate more tomorrow.

from probe-run.

Related Issues (20)

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.