Skip to content

2025.10: GDB parsing errors when debugging firmware with zcmt extension - different behaviors on Windows and Linux #54

@bigmagic123

Description

@bigmagic123

Description

When using the 2025.10 version of the toolchain to debug firmware compiled with the zcmt extension, GDB exhibits parsing abnormalities when viewing the disassembly of zcmt instructions in the GDB window.

Current Behavior

The issue manifests differently on Windows and Linux systems:

Linux
When using the GDB window's disassemble function on functions containing zcmt instructions, GDB crashes with: Segmentation fault
Windows
GDB does not crash with a segmentation fault, but displays abnormal comments corresponding to zcmt instructions.

Root Cause

The root cause of this issue is that the zcmt functionality implementation was not adapted for GDB scenarios. When zcmt extension is enabled and users attempt to use GDB to view the disassembly display, this incompatibility leads to parsing errors or crashes.

Reproduction Steps

Compile firmware with zcmt extension enabled
Use GDB to debug the firmware
Attempt to view the disassembly of zcmt instructions in the GDB window
Observe the parsing error (segmentation fault on Linux, abnormal comments on Windows)

Workaround

Currently, it is recommended not to use the GDB window to view the disassembly of files compiled with zcmt extension to avoid this issue.

Fix Status

This issue is scheduled to be fixed in the next toolchain release.

Environment

Toolchain version: 2025.10
Architecture: RISC-V
Extension affected: zcmt sub-extension of zc extensions
Component affected: GDB (GNU Debugger)
Platforms affected: Linux (Segmentation fault), Windows (abnormal comments)

Additional Information

This bug affects all users who need to debug zcmt-enabled firmware using GDB's disassembly features. The temporary workaround is to avoid viewing zcmt instruction disassembly in GDB until the fix is released.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P:1Medium impact/importance bugbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions