Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GDB Client/Server] Coredump.bin decoding error #743

Open
Kwangbaek opened this issue Apr 4, 2024 · 0 comments
Open

[GDB Client/Server] Coredump.bin decoding error #743

Kwangbaek opened this issue Apr 4, 2024 · 0 comments

Comments

@Kwangbaek
Copy link

Kwangbaek commented Apr 4, 2024

Hi folks,

This problem(the script, 'scripts/coredump/coredump_gdbserver.py', seems to have difficulty in decoding a coredump.bin, especially for riscv64 architecture.) happened when I tried to run a gdb client and it doesn't show any information(no stack, the program is not being run.).

My environment and reproduction steps are as follows.

*. Environments
- OS : Ubuntu_22.04.4
- Zephyr : 3.6.99
- Zephyr SDK : 0.16.5-1

*. Reproduction steps

  1. Modify source code "$ZEPHYR_BASE/samples/hello_world/src/main.c"
    image

  2. enable COREDUMP "$ZEPHYR_BASE/samples/hello_world/prj.conf"
    image

  3. build the example and run it on QEMU
    $ cd $ZEPHYR_BASE
    $ mkdir build-example
    $ cd build-example
    $ cmake -DBOARD=qemu_riscv32 $ZEPHYR_BASE/samples/hello_world
    $ make
    $ make run

  4. save the output from serial("coredump.txt") and convert it into a coredump binary("coredump.bin") by runnig a coredump parser script

    1. $ZEPHYR_BASE/scripts/coredump/coredump_serial_log_parser.py coredump.txt coredump.bin
  5. run a coredump gdb server on one terminal & a gdb client on the other terminal

  • on one terminsl,
    $ZEPHYR_BASE/scripts/coredump/coredump_gdbserver.py zephyr/zephyr.elf coredump.bin
  • on the other terminal,
    $ZEPHYR_SDK_BASE/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gdb zephyr/zephyr.elf
  1. GDB client screen shot
    image

Kind regards,

Kevin

@Kwangbaek Kwangbaek changed the title Coredump.bin decoding error [GDB Client/Server] Coredump.bin decoding error Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant