From 4497d136ceb23d7dc1727812ac41fd541adf3648 Mon Sep 17 00:00:00 2001 From: hjk <hjk121@nokiamail.com> Date: Tue, 22 Oct 2013 18:58:19 +0200 Subject: [PATCH] Debugger: Leave GDB default setting for 'set overload resolution' ... and work around the pecularities on the dumper side instead. Change-Id: I0c2703aae13dabc0f3f45efb46bd556c8741a15f Reviewed-by: hjk <hjk121@nokiamail.com> --- src/plugins/debugger/gdb/gdbengine.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index ea2b2381c49..7e8febf779c 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4836,8 +4836,15 @@ void GdbEngine::startGdb(const QStringList &args) // template <class T> T foo() { return T(0); } // int main() { return foo<int>(); } // (gdb) call 'int foo<int>'() - // /build/buildd/gdb-6.8/gdb/valops.c:2069: internal-error: - postCommand("set overload-resolution off"); + // /build/buildd/gdb-6.8/gdb/valops.c:2069: internal-error + // This seems to be fixed, however, with 'on' it seems to _require_ + // explicit casting of function pointers: + // GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu + // (gdb) p &Myns::QMetaType::typeName -> $1 = (const char *(*)(int)) 0xb7cf73b0 <Myns::QMetaType::typeName(int)> + // (gdb) p Myns::QMetaType::typeName(1024) -> 31^error,msg="Couldn't find method Myns::QMetaType::typeName" + // But we can work around on the dumper side. So let's use the default (i.e. 'on') + //postCommand("set overload-resolution off"); + //postCommand(_("set demangle-style none")); // From the docs: // Stop means reenter debugger if this signal happens (implies print). -- GitLab