We have moved to a new Sailfish OS Forum. Please start new discussions there.

Breakpoint issue in the Sailfish OS SDK

Tracked by Jolla (In progress)

asked 2017-05-17 12:57:12 +0200

chuvilin gravatar image

updated 2017-05-17 13:23:29 +0200

This project shows an example of how a breakpoint in the source code of a subproject library is ignored: https://bitbucket.org/chuvilin/sailfishos-subproject-breakpoint-issue/src

The test was performed in Sailfihs OS SDK 1701-1, the application was launched in the emulator. To reproduce the problem put two breakpoints:

  • sample/src/sample.cpp, line 11
  • libtest/TestClass.cpp, line 8

and start debugging. At the first point the application will stop, but the second will be ignored.

Is there any way to fix this from the side of the project without changing the SDK?

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted

answered 2017-05-23 17:04:52 +0200

martyone gravatar image

updated 2017-05-24 18:04:25 +0200

As a workaround you can manually set GDB's solib-search-path so that it looks into the libs subdirectory of your build directory:

  1. start debugging with breakpoint in main(), wait until it stops on that breakpoint
  2. in Debug mode use menu Window > Views > Debugger Log to dislay the debugger log view
  3. type set solib-search-path <absolute-path-to-your-build-dir>/libs in Command field
  4. now it should resolve your breakpoints in the subproject library

Note: Setting this permanently via Options > Debugger > GDB > Additional Startup Commands does not work (leads to crash) due to a GDB bug.

edit flag offensive delete publish link more


2012 year bug? ...

coderus ( 2017-05-24 20:35:37 +0200 )edit

Thank you, the workaround works. Whaiting for fixing this issue in the SDK :)

chuvilin ( 2017-06-01 13:42:49 +0200 )edit

its not fixed yet ) i still cant debug sub project libs! but really thanks for hack )

sashikknox ( 2018-07-20 23:05:30 +0200 )edit

@sashikknox I couldn't reproduce this with SDK 1804. Could you please add more info how do you reproduce it?

martyone ( 2018-07-25 08:54:52 +0200 )edit

@martyone build this project, sailfish-subpro.pro. Set breakpoints in FirstClass, SecondClass and ThirdClass in constructors and their functions.

sashikknox ( 2018-07-25 15:29:51 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2017-05-17 12:57:12 +0200

Seen: 464 times

Last updated: May 24 '17