Thanks for your reply.
For example this line will generate the console message:
fp = popen("/sbin/ip route | grep default | awk '{print $3}'", "r");
As you suggested it is probably an GDB “issue” but i have no experience in patching the GDB source.
If there is no simple option to disable the message i will have to deal with it.