You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing https://github.com/Linaro/aerology with a DAPLINK via pyocd GDB server to an nRF52840 target reveals an interesting result, aerology sends a command which pyocd does not support qXfer:features:read:arm-m-profile.xml:0,1000, but the response that it sends back is 9+, where the 9 is unexpected. This causes the aerology program to wait for data which never arrives, verbose output from pyocd:
0028146:DEBUG:packet_io:Starting GDB server packet I/O thread
0028146:DEBUG:cortex_m:halting core 0
0028147:INFO:gdbserver:Client connected to port 3333!
0028147:DEBUG:gdbserver:GDB received query: [b'Supported#37']
0028147:DEBUG:gdbserver:GDB received query: [b'Xfer', b'features', b'read', b'target.xml', b'0,1000#0c']
0028147:DEBUG:gdbserver:GDB query b'read_feature': offset: 0, size: 4096
0028148:DEBUG:gdbserver:GDB received query: [b'Xfer', b'features', b'read', b'arm-m-profile.xml', b'0,1000#79']
0028148:DEBUG:gdbserver:Unsupported qXfer request: b'features':b'read':b'arm-m-profile.xml':b'0,1000#79'
This is with pyocd 0.31.0, I've upgraded to 0.33.1 and the bug still seems present, it just puts the '9' and '+' in separate responses:
0000886 D Running task notify [sequencer]
0000887 D Setting vector catch to 0x00000001 [cortex_m]
0000889 I Semihost server started on port 4444 (core 0) [server]
0000904 I GDB server started on port 3333 (core 0) [gdbserver]
0004863 D Starting GDB server packet I/O thread [packet_io]
0004863 D halting core 0 [cortex_m]
0004864 I Client connected to port 3333! [gdbserver]
0004864 D GDB received query: [b'Supported#37'] [gdbserver]
0004864 D GDB received query: [b'Xfer', b'features', b'read', b'target.xml', b'0,1000#0c'] [gdbserver]
0004864 D GDB query b'read_feature': offset: 0, size: 4096 [gdbserver]
0004864 D GDB received query: [b'Xfer', b'features', b'read', b'arm-m-profile.xml', b'0,1000#79'] [gdbserver]
0004864 D Unsupported qXfer request: b'features':b'read':b'arm-m-profile.xml':b'0,1000#79' [gdbserver]
Thanks for the report. Interesting and odd that aerology requests arm-m-profile.xml. That file is defined within gdb, but gdb itself never asks for it and only uses it internally from the Arm tdesc.
The issue is pretty clear in the pyocd code. It's got a fixed check for target.xml. Not sure where the "9" comes from, will have to debug to resolve that.
I didn't take the time to figure out where the "9" came from, but the gdbserver should reply with valid packets (or empty packets as required) in all cases.
Testing https://github.com/Linaro/aerology with a DAPLINK via pyocd GDB server to an nRF52840 target reveals an interesting result, aerology sends a command which pyocd does not support
qXfer:features:read:arm-m-profile.xml:0,1000
, but the response that it sends back is9+
, where the 9 is unexpected. This causes the aerology program to wait for data which never arrives, verbose output from pyocd:strace showing strange response:
This is with pyocd 0.31.0, I've upgraded to 0.33.1 and the bug still seems present, it just puts the '9' and '+' in separate responses:
strace log:
According to the GDB remote serial protocol, it should respond with an empty packet if the command is unsupported
The text was updated successfully, but these errors were encountered: