This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tui/17823] New: gdb TUI cannot recognize floating point numbers if LC_NUMERIC environment variable is set to nl_NL.UTF-8


https://sourceware.org/bugzilla/show_bug.cgi?id=17823

            Bug ID: 17823
           Summary: gdb TUI cannot recognize floating point numbers if
                    LC_NUMERIC environment variable is set to nl_NL.UTF-8
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tui
          Assignee: unassigned at sourceware dot org
          Reporter: georgezhu at yandex dot com

See: http://pastebin.com/srH0Ug4k

My environment variable LC_NUMERIC is set to nl_NL.UTF-8, and this causes 2
things:

First, doubles and floats are printed with a comma instead of a dot(0,5, 0,1,
etc.) This is correct Dutch numeric style but in the context of programming
this is bad and somewhat confusing, since you're using dots in the source code
and they come out as commas.

Second, and more importantly, I can't seem to be able to print or type in
floats at all in the interface. Whenever I type 0.5 or 0.5f it tells me it's an
"Invalid number", and if I type to type "0,5" it seems to just ignore the 0 and
just interpret it as 5.

This is annoying because I'd like to do some floating point calculations in
gdb, which is made a lot harder with it not interpeting my floats correctly.

My suggested solution would be to ignore LC_NUMERIC and always use English
numbers. That's what I'll be using in the source code anyway for any
programming language I know.

My current workaround is of course to just call gdb with
`LC_NUMERIC=en_US.UTF-8 gdb'

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]