I have a issue with gdb printf in version 9.1
echo -e '#include<stdio.h> \n int main(){ \n printf("Hello"); \n }' > test.c gcc -g test.c -o test echo 'break test.c:4' > test.gdb echo 'run' >> test.gdb echo 'set $aux = (char*)malloc(256)' >> test.gdb echo 'set $e = strcpy($aux, "abc")' >> test.gdb echo 'printf "%s", $aux' >> test.gdb gdb --batch --command=test.gdb test Output with gdb 9.1:
Breakpoint 1 at 0x1167: file test.c, line 4. Breakpoint 1, main () at test.c:4 4 } �e��� Expected output (same as gdb v8):
Breakpoint 1 at 0x1167: file test.c, line 4. Breakpoint 1, main () at test.c:4 4 } abc I've checked charset, but it seems ok. Any idea about that?