GDB failed due to extra UTF emoji ('gbk' codec can't encode character '\u2714' in position 0)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
Platform: Windows10 with language "ZH_CN", using VS Code with "Cortex-Debug" plugin
Process: Run debug test below:
{
"showDevDebugOutput": "parsed",
"name": "pyocd STM Debug",
"type": "cortex-debug",
"request": "launch",
"servertype": "pyocd",
"cwd": "${workspaceRoot}",
"executable": "./build/wrightRobot_C8T6.elf",
"gdbTarget": "arm-none-eabi-gdb",
"svdFile": "./STM32F103.svd",
"runToEntryPoint": "main",
"device": "STM32F103C8"
}
Output:
Waiting for gdb server to start...[2024-02-17T10:53:06.349Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
pyocd gdbserver --port 50000 --telnet-port 50001
Probe/Board Unique ID Target
0 ARM QYF-CMSIS-DAP 0000976 C 'gbk' codec can't encode character '\u2714' in position 0: illegal multibyte sequence [main]
070000811a5a5bb50000000001eefd13a5a5a5a597969908 [2024-02-17T10:53:07.668Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
When flashing, the output is:
0 ARM QYF-CMSIS-DAP 070000811a5a5bb50000000001eefd13a5a5a5a597969908 ✔︎ stm
32f103rb
So the problem was that the '✔︎' caused crash on non-western system's gdb server.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the pyOCD gdbserver output path that prints the probe and target listing, using the reported Windows 10 ZH_CN configuration and flashing output to reproduce the encoding failure. Done means the GDB server no longer crashes when the listing contains the checkmark character and the device information remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools, embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100