GDB stepping from python script does not work synchronously
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
When I up upgraded to a recent version of the GNU ARM Embedded toolchain, a gdb script I had stopped working correctly. I narrowed this down to synchronous single stepping in the script. Even though it was called synchronously, the command ran asynchronously and caused the next step to fail. I have attached a simple script to reproduce this. This problem started on 2016q4 release.
Versions working correctly:
gcc-arm-
gcc-arm-
gcc-arm-
Versions exhibiting this problem:
gcc-arm-
gcc-arm-
To reproduce this problem you'll need to run a gdb server in one terminal (in this case pyOCD) and the attached gdb_script_
Terminal 1:
pip install pyocd
pyocd-gdbserver -p 3334
Terminal 2:
arm-none-
Test script output 2016q3:
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) 0x000004b0 in ?? ()
Step returned: '0x00000442 in ?? ()
'
Step returned: '0x00000446 in ?? ()
'
Step returned: '0x00000448 in ?? ()
'
Step returned: '0x0000044a in ?? ()
'
Step returned: '0x000004a8 in ?? ()
'
Stepping successful
Test script output 2016q4:
GNU gdb (GNU Tools for ARM Embedded Processors) 7.12.0.20161204-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) 0x000004a8 in ?? ()
Step returned: ''
0x000004ac in ?? ()
Hi Russ,
I can't seem to reproduce this either on Linux or Windows. On Windows I tried using the pyocd_win.exe from https:/ /developer. mbed.org/ blog/entry/ pyOCD-Binary- Version/ but the stepping does not seem to proceed in either case. GDB just opens and waits for input. What am missing?