On Thu, Oct 21, 2010 at 03:35:20PM +0300, Alexander Perepelica wrote:
> Hello!
> I try use snapsoth version of QtCreator. And all work fine but in one
> project I have problem with debugging (other projects work good).
> Problem is when debugger stop on breakpoint and then I press "Step Over" I
> get moved to another thread not where I was before.
> In debugger log I see some errors
> 
> 26threadnames 20
> >&"threadnames 20\n"
> >~"Traceback (most recent call last):\n"
> >~"  File \"/home/avp/qtc/share/qtcreator/gdbmacros/dumper.py\", line 1755,
> in invoke\n"
> >~"    out += encodeString(objectName)\n"
> >~"  File \"/home/avp/qtc/share/qtcreator/gdbmacros/dumper.py\", line 822,
> in encodeString\n"
> >~"    d_ptr = value['d'].dereference()\n"
> >~"RuntimeError: Cannot access memory at address 0x30\n"
> >&"Error occurred in Python command: Cannot access memory at address 0x30\n"
> >26^error,msg="Error occurred in Python command: Cannot access memory at
> address 0x30"
> >=thread-selected,id="12"
> sThread 12 selected
> 
> So could somebody help me with this?

Looks like the new ThreadNamesCommand should have a try... except...
block around the member accesses in the invoke method, i.e. something
similar to:

    try:
        thrptr = e.read_var("thr").dereference()
        obtype = lookupType(ns + "QObjectPrivate").pointer()
        d_ptr = thrptr["d_ptr"]["d"].cast(obtype).dereference()
        objectName = d_ptr["objectName"]
        entry = '{valueencoded="';
        entry += str(Hex4EncodedLittleEndianWithoutQuotes)+'",id="'
        entry += str(thread.num) + '",value="'
        entry += encodeString(objectName)
        entry += '"},'
        out += entry
    except:
        pass

Can someone please take care of that?

Andre'

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to