When both Q_DECLARE_METATYPE and qRegisterMetaType are used, debugging application crashes on SIGSEGV in _dl_debug_initialize function before the application itself has started (when running application without debugging, it runs fine). When either of these (or both) are commented out, the application can be debugged without a problem.
This happens on at least Toradex Colibri IMX6, VF61 and Beaglebone Black, may happen on other embedded devices too. Doesn't happen on desktop. The 5.7.0 seems to be the affected version, 5.6 works.
Steps to reproduce:
1. Extract, compile and debug the example application on an embedded device (preferably on Toradex Colibri)
-> SIGSEGV on line 55 in _dl_debug_initialize
Example application, stacktrace and debug logs attached.