Skip to content

Need help debugging qemu #234

@fujexo

Description

@fujexo

I'm not sure if I am missing something or not. I think I don't have everything neccessary installed but cannot figure out what's missing and how to install it.

src/libcore/slice/mod.rs: No such file or directory.

Maybe you can point me in the right direction?

$ cargo build --target thumbv7m-none-eabi --example hello --release
   Compiling typenum v1.12.0
   Compiling semver-parser v0.7.0
   Compiling proc-macro2 v1.0.10
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.18
   Compiling cortex-m v0.6.2
   Compiling stable_deref_trait v1.1.1
   Compiling vcell v0.1.2
   Compiling cortex-m-rt v0.6.12
   Compiling cortex-m-semihosting v0.3.5
   Compiling r0 v0.2.2
   Compiling panic-halt v0.2.0
   Compiling semver v0.9.0
   Compiling volatile-register v0.2.0
   Compiling rustc_version v0.2.3
   Compiling quote v1.0.4
   Compiling bare-metal v0.2.5
   Compiling generic-array v0.12.3
   Compiling generic-array v0.13.2
   Compiling as-slice v0.1.3
   Compiling aligned v0.3.2
   Compiling cortex-m-rt-macros v0.1.8
   Compiling app v0.1.0 (/home/fuj/git/home/rust-playground/embedded/app)
    Finished release [optimized + debuginfo] target(s) in 54.48s

$ qemu-system-arm \
                         -cpu cortex-m3 \
                         -machine lm3s6965evb \
                         -nographic \
                         -semihosting-config enable=on,target=native \
                         -gdb tcp::3333 \
                         -S \
                         -kernel target/thumbv7m-none-eabi/debug/examples/hello
Hello, world!

When I attach gdb, I get an error that some files are missing:

$ arm-none-eabi-gdb -f target/thumbv7m-none-eabi/debug/examples/hello
GNU gdb (GDB) 9.1
<snip>
Reading symbols from target/thumbv7m-none-eabi/debug/examples/hello...
(gdb) target remote :3333
Remote debugging using :3333
0x000012cc in <core::ops::range::Range<usize> as core::slice::SliceIndex<[T]>>::index_mut () at src/libcore/slice/mod.rs:2927
2927    src/libcore/slice/mod.rs: No such file or directory.
(gdb) break main
Breakpoint 1 at 0x444: file examples/hello.rs, line 11.
(gdb) continue
Continuing.

Breakpoint 1, main () at examples/hello.rs:11
/home/fuj/git/home/rust-playground/embedded/app/examples/hello.rs:11:186:beg:0x444
11      #[entry]
(gdb) next
[Inferior 1 (process 1) exited normally]
(gdb) quit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions