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

make debug broken on native #20265

Closed
benpicco opened this issue Jan 16, 2024 · 0 comments · Fixed by #20264
Closed

make debug broken on native #20265

benpicco opened this issue Jan 16, 2024 · 0 comments · Fixed by #20264
Assignees
Labels
Platform: native Platform: This PR/issue effects the native platform Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@benpicco
Copy link
Contributor

benpicco commented Jan 16, 2024

Description

The pyterm wrapper interferes with make debug. The additional pyterm args are always added the native parameters even when not pyterm is used.
As a workaround, you can set RIOT_TERMINAL=native on the command line.

Steps to reproduce the issue

Run make debug for any native app.

Expected results

% make -C examples/hello-world debug                                                                                                                                                                                                                                                                                 
make: Entering directory '/home/benpicco/dev/RIOT/examples/hello-world'
gdb -q --args /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf tap0
Reading symbols from /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf...
(gdb) r
Starting program: /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf tap0

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]                                                                                                                                                                                                                                                                                                                                                 
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
RIOT native interrupts/signals initialized.
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2024.01-devel-601-gfbae3)
Hello World!
You are running RIOT on a(n) native board.
This board features a(n) native MCU.

Actual results

% make -C examples/hello-world debug
make: Entering directory '/home/benpicco/dev/RIOT/examples/hello-world'
gdb -q --args /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf -ps /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf --process-args tap0
Reading symbols from /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf...
(gdb) r
Starting program: /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf -ps /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf --process-args tap0

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]                                                                                                                                                                                                                                                                                                                                                 
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
usage: /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf [-i <id>] [-d] [-e|-E] [-o] [-c <tty>] [-g <gpiochip>] [-i <id>] [-d] [-e|-E] [-o] [-c <tty>]

help: /home/benpicco/dev/RIOT/examples/hello-world/bin/native/hello-world.elf -h

Options:
    -h, --help
        print this help message
    -i <id>, --id=<id>
        specify instance id (set by config module)
    -s <seed>, --seed=<seed>
        specify srandom(3) seed (/dev/random is used instead of random(3) if
        the option is omitted)
    -d, --daemonize
        daemonize native instance
    -e, --stderr-pipe
        redirect stderr to file
    -E, --stderr-noredirect
        do not redirect stderr (i.e. leave sterr unchanged despite
        daemon/socket io)
    -o, --stdout-pipe
        redirect stdout to file (/tmp/riot.stdout.PID) when not attached
        to socket
    -c <tty>, --uart-tty=<tty>
        specify TTY device for UART. This argument can be used multiple
        times (up to UART_NUMOF)
    -g <gpio>, --gpio=<gpio>
        specify gpiochip device for GPIO access.
        This argument can be used multiple times.
        Example: --gpio=/dev/gpiochip0 uses gpiochip0 for port 0
[Inferior 1 (process 55075) exited with code 01]
(gdb)

Versions

introduced by #20172

@benpicco benpicco added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Platform: native Platform: This PR/issue effects the native platform labels Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: native Platform: This PR/issue effects the native platform Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants