Skip to content

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

Open
@Kwangbaek

Description

@Kwangbaek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions