esp32-backtrace
esp32-backtrace copied to clipboard
regex match not working
None of the regex matches are working in my script. Test case:
p='PC : 0x4011aa98 PS : 0x00060f30 A0 : 0x80082766 A1 : 0x3ffe3be0'
rePC='PC\s*:? (0x40[0-2][0-9a-f]*)'
if [[ "$p" =~ $rePC ]]; then
echo Match!
else
echo No match
fi
echo $BASH_VERSION
Output:
No match
5.1.0(1)-release
Hence gdb is never called. Perhaps "my" bash is broken. I work on a mac, same behavior with preinstalled version and upgrade to newest.
Works fine on Linux with version 5.0.17(1)-release.