[gdb] Check strpbrk against nullptr

In noticed two occurrences of "if (strpbrk (...))".

Fix this style issue by checking against nullptr.
2 files changed