This comes from bug 20613 and http://www.viva64.com/en/b/0430/ string_to_explicit_location compares a char* against '\0': if (argp == NULL || *argp == '\0' That second comparison should probably be == NULL
The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e742d386c480efa5229bc8b1887a7718f840a457 commit e742d386c480efa5229bc8b1887a7718f840a457 Author: Tom Tromey <tom@tromey.com> Date: Fri Sep 30 15:43:40 2016 -0600 PR gdb/20653 - small cleanup in string_to_explicit_location This bug points out that string_to_explicit_location compares a char* against '\0'; whereas comparing against NULL is more normal. 2016-10-05 Tom Tromey <tom@tromey.com> PR breakpoints/20653: * location.c (string_to_explicit_location): Use NULL, not '\0'.
Fixed.
The gdb-7.12-branch branch has been updated by Yao Qi <qiyao@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=909de2c5cc91b815d671f7018da2a925fbd19aaf commit 909de2c5cc91b815d671f7018da2a925fbd19aaf Author: Tom Tromey <tom@tromey.com> Date: Mon Oct 24 12:06:39 2016 +0100 PR gdb/20653 - small cleanup in string_to_explicit_location This bug points out that string_to_explicit_location compares a char* against '\0'; whereas comparing against NULL is more normal. 2016-10-24 Tom Tromey <tom@tromey.com> PR breakpoints/20653: * location.c (string_to_explicit_location): Use NULL, not '\0'.
I backport it to 7.12 branch, otherwise, 7.12 failed to compile with recent gcc, ../../binutils-gdb/gdb/location.c: In function ‘event_location* string_to_explicit_location(const char**, const language_defn*, int)’: ../../binutils-gdb/gdb/location.c:527:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] || *argp == '\0' ^~~~ make[2]: *** [location.o] Error 1