[SailfishDevel] Debugging external libraries

Andrey Kozhevnikov coderusinbox at gmail.com
Sun Mar 15 17:10:16 UTC 2015


Yes i was thinking about no contacts case. As seaside is cached database 
it can not produce any calls if no contacts. Talking about debugging 
imho you need to build a static library to see what happening inside it. 
But i may be wrong.

15.03.2015 18:08, Dmitriy Purgin пишет:
> Hi,
>
> thanks for answering.
>
> What difference does debugging on device or emulator make to debugging 
> the contacts lib itself if the environment is set properly for both? 
> The worst case you get is that it tells you that there are no contacts 
> whatsoever. The question is not about debugging the contacts database 
> but about the principles of debugging any shared library. The only 
> reason I've brought the contacts lib as an example is because I'm 
> working with it now.
>
> So in this case I'd like to trace the execution of 
> personByPhoneNumber(). In other words, step into 
> seasidefiltermodel.cpp and look what's happening 
> inSeasideFilteredModel::personByPhoneNumber and further 
> seasidecache.cpp's SeasideCache::itemByPhoneNumber, and so on.
>
> Cheers
> Dmitriy
>
> 2015-03-15 18:00 GMT+06:00 Andrey Kozhevnikov <coderusinbox at gmail.com 
> <mailto:coderusinbox at gmail.com>>:
>
>     imho you need to install it to phone and debug contacts on device,
>     not emulator?
>
>     15.03.2015 16:47, Dmitriy Purgin пишет:
>>     Hi,
>>
>>     I'm struggling the whole day with this problem. Is there a way to
>>     debug a shared library not included to a project? In particular
>>     I'd like to see what's happening in
>>     nemomobile-qml-plugin-contacts-qt5.
>>
>>     I have the following sample code being executed in Sailfish Emulator:
>>
>>     import org.nemomobile.contacts 1.0
>>
>>     // ...
>>
>>     PeopleModel {
>>     id: people
>>     }
>>
>>     // ...
>>
>>     var p = people.personByPhoneNumber('somephonenumber');
>>
>>     I'm putting a break point on people.personByPhoneNumber() call
>>     and try to step in, and it doesn't work.
>>
>>     Prior to trying to step into the library code I've installed both
>>     nemomobile-qml-plugin-contacts-qt5-debuginfo and
>>     nemomobile-qml-plugin-contacts-qt5-debugsource to i486 target
>>     using Qt Creator's SailfishOS tab. After that stepping in didn't
>>     work. Then I pushed the 'sync' button  a couple of times to make
>>     sure it worked but it didn't.
>>
>>     Then I've logged into the build machine and installed these
>>     packages using zypper. Pushed the 'sync' button in Qt Creator but
>>     stepping in still didn't work. Interesting thing is though that
>>     the packages were installed as if there were no packages
>>     installed using Qt Creator.
>>
>>     I've looked into gdb output and saw that it sets substitute-path
>>
>>     SailfishOS/mersdk/targets/SailfishOS-i486/usr/src for /usr/src. I
>>     didn't have anything in
>>     SailfishOS/mersdk/targets/SailfishOS-i486/usr/src, in fact, I
>>     didn't have the src directory at all. It seems like the packages
>>     I've installed in the build machine were not synchonised with my
>>     host machine. I've done it with scp transfer but stepping in
>>     still doesn't work.
>>
>>
>>     Could anyone please give me some hints on debugging external
>>     libraries or guide me to any resource explaining the process?
>>
>>
>>     Thanks.
>>
>>
>>     Cheers
>>
>>     Dmitriy Purgin
>>
>>
>>
>>
>>     _______________________________________________
>>     SailfishOS.org Devel mailing list
>>     To unsubscribe, please send a mail todevel-unsubscribe at lists.sailfishos.org  <mailto:devel-unsubscribe at lists.sailfishos.org>
>
>
>     _______________________________________________
>     SailfishOS.org Devel mailing list
>     To unsubscribe, please send a mail to
>     devel-unsubscribe at lists.sailfishos.org
>     <mailto:devel-unsubscribe at lists.sailfishos.org>
>
>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20150315/5ff6a7e0/attachment.html>


More information about the Devel mailing list