Skip to content

gcc-arm-embedded-13: Python in gdb is broken, import subprocess fails #303651

@lukash

Description

@lukash

Describe the bug

Importing Python's subprocess module in a gdb python script fails with an import error.

Note this is before python38 removal, now arm-none-eabi-gdb is broken altogether as reported in #299754.

Steps To Reproduce

$ arm-none-eabi-gdb
(gdb) python import subprocess; end
Traceback (most recent call last):
  File "/nix/store/zlsiqrqm823yp9r9zsbg6q9yrr129kfi-python3-3.8.18/lib/python3.8/subprocess.py", line 64, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/nix/store/zlsiqrqm823yp9r9zsbg6q9yrr129kfi-python3-3.8.18/lib/python3.8/subprocess.py", line 69, in <module>
    import _posixsubprocess
ModuleNotFoundError: No module named '_posixsubprocess'
Error while executing Python code.

Expected behavior

Importing the subprocess module works without error.

Notify maintainers

@mweinelt @prusnak

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.69, NixOS, 23.11 (Tapir), 23.11.20240103.b0b2c54`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions