Comment 4 for bug 1341125

Revision history for this message
Fabrizio Gennari (fabrizio-ge) wrote :

Sorry, but I can still reproduce it.

Precondition is that gdb is built with Python 3 support (and the one distributed with Ubuntu 14.10 is) and the current locale has a comma as decimal separator (I am using it_IT.UTF-8).

At startup, gdb executes _initialize_python () (in file python/python.c): the following lines of code changhe the locale from C (which is the appropriate one, since gdb must be able to parse numbers that are valid in C language) to the one of the machine

1651 progname = concat (ldirname (python_libdir), SLASH_STRING, "bin",
1652 SLASH_STRING, "python", NULL);
1653 #ifdef IS_PY3K
1654 oldloc = setlocale (LC_ALL, NULL);
1655 setlocale (LC_ALL, "");

From this point on, gdb assumes that the decimal separator is a comma, and becomes unable to parse the number 1.0