I am debugging my c ++ program using gdb. I am having difficulty setting a simple double variable due to the German locale.
gdb will not accept decimal point values. Written with a German decimal point (comma), gdb ignores everything after the decimal point.
(gdb) p this->foodSupply $1 = 1 (gdb) set this->foodSupply = 4.3 Ungültige Nummer »4.3«. (gdb) p this->foodSupply $1 = 1 (gdb) set this->foodSupply = 4,3 (gdb) p this->foodSupply $3 = 4
I decided that I could avoid the problem by running gdb with LC_ALL=EN gdb ... But since it’s not so easy when developing my IDE, I want to know if there is another way.
How can a German user enter a decimal point in gdb?
source share