Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Debugging Raspberry PI with gdb-multiarch



  • Hi,
    I have Cross compiled a toolchain for the Raspberry PI3 unter Arch labs Linux. Deploy and everything works, debugging can be done with gdb-mulitarch. Unfortunately, the gdb requires specification of an additional startup command (set gnutarget elf32-littlearm). If specified, deploy and debug to the Raspberry works fine, but then the Desktop debugging does not work anymore. Without setting the command, gdb tells me that there is an ambiguous file format (elf32-littlearm, elf32-littlearm-symbian elf32-littlearm-vxworks).
    Is there a way to specify the command for the kit only or maybe remove the other formats from gdb-multiarch? Sorry if I should better post that question in a gdb forum, but thank you for your help anyway.


  • Lifetime Qt Champion

    Hi
    Creator as a gdb console/shell that allows live/runtime parameters.
    I use it to skip std:.vector etc.
    Im wondering if you can use that for inserting
    set gnutarget elf32-littlearm
    http://doc.qt.io/qtcreator/creator-debug-mode.html#directly-interacting-with-native-debuggers

    I assume if you write in here
    alt text

    Its the case where it breaks the "Desktop debugging" part ?



  • Yes, I already used this and it works. The only problem is that this setting is global and not limited to the Kit used, therefore debugging the project in the Desktop version does not work anymore.


  • Lifetime Qt Champion

    @ppreininger
    Ok. as i assumed.
    I never did find same sort of setting pr kit so we resorted to live pasting it but
    im not sure if your "set gnutarget " must be run before attach.

    Did you look into using a .gdbinit file ?
    You might be able to pass -x path to init file and use different settings that way but
    i didnt test it.



  • Thanks, I'll have a try tomorrow



  • Didn't work unfortunately. Does not matter. I'll manage. Thank you


Log in to reply