z88dk
z88dk copied to clipboard
GDB automation improvements
A couple of suggestions:
- [x] A command to run others whenever execution stops. Something like
tracecmds command ; command ; command ; .... It would only function whentrace on. The registers would appear after the user specified commands. Alternatively, don't output the registers when the user specifies tracecmds and require it to be specified explicitly. - [x] To support this command, add an option to
xto specify the number of bytes to return. GDB does this using regex (rough example):x\s*/(\d+)(\w)*\s+([\w\d]+), where group $0 is the whole match, group $1 is the number of elements to return, group $2 any number of format specifier characters , and group $3 is the address or symbol. I will not implement the format specifier right now. If the length is not specified, use the current default length of 128. - [x] A command line option to execute commands upon startup from a file. After executing it will wait for further input from the user.
I intend to implement these today if it doesn't seem insane to you.