Cannot debug anyone in one project

Sysprogs forums Forums VisualGDB Cannot debug anyone in one project

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #20540
    JoeWright
    Participant

    One project that was previously working fine, now refuses to launch the debugger (stops just before it should flash).  The odd thing is, a more recently created project, with identical settings, still works fine.

    Here is the output:

    C:\Users\Joe\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\bin\openocd.exe -c “gdb_port 51213” -c “telnet_port 51214” -f interface/stlink-v2.cfg -f target/stm32f3x.cfg -c init -c “reset init” -c “echo VisualGDB_OpenOCD_Ready”
    Open On-Chip Debugger 0.10.0 (2017-10-27) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select <transport>’.
    adapter speed: 1000 kHz
    adapter_nsrst_delay: 100
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    none separate
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    Info : clock speed 950 kHz
    Info : STLINK v2 JTAG v28 API v2 SWIM v6 VID 0x0483 PID 0x3748
    Info : using stlink api v2
    Info : Target voltage: 3.228402
    Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    adapter speed: 950 kHz
    target halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x0800fc30 msp: 0x20006000
    Info : Unable to match requested speed 8000 kHz, using 4000 kHz
    Info : Unable to match requested speed 8000 kHz, using 4000 kHz
    adapter speed: 4000 kHz
    VisualGDB_OpenOCD_Ready
    Info : accepting ‘gdb’ connection on tcp/51213
    Info : device id = 0x20006432
    Info : flash size = 128kbytes
    Info : dropped ‘gdb’ connection (error -400)

    In general, I’m finding that projects can get into these funny corrupted states.  I don’t know if it’s my habit of hibernating that is causing problems, because I know visualgdb has issues with this.  But recently there was an update to the toolchain or whatever, and it didn’t work properly.  I had to delete and re-download.  The project which was opened at the time refused to work properly after that.

    Obviously I can create new projects each time there’s a problem, but its a bit annoying.  Would like some sort of project clean-up function perhaps.

    Joe

    #20541
    support
    Keymaster

    Hi,

    Strange, the log doesn’t indicate any known error. As a quick check, does restarting your computer solve the problem?

    #20542
    JoeWright
    Participant

    No, I did a full reboot but it did not help.  Loading up the two different projects – one works, one doesn’t.  Went in and checked the gdb settings were the same and they were (as far as I can tell).  Have also tried switching off the firewall but that didn’t work either.

    #20544
    JoeWright
    Participant

    Did an ignore and then looked at the gdb session details:

     

    VisualGDB is licensed to Joe Wright
    C:\SysGCC\arm-eabi\bin\arm-eabi-gdb.exe –interpreter mi E:\projects\IMU\STM32_Projects\Handle_6\VisualGDB\Debug\Handle_6
    -gdb-version
    =thread-group-added,id=”i1″
    ~”GNU gdb (GDB) 8.0.1\n”
    ~”Copyright (C) 2017 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \”show copying\”\nand \”show warranty\” for details.\n”
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type “show copying”
    and “show warranty” for details.
    ~”This GDB was configured as \”–host=i686-w64-mingw32 –target=arm-eabi\”.\nType \”show configuration\” for configuration details.”
    This GDB was configured as “–host=i686-w64-mingw32 –target=arm-eabi”.
    Type “show configuration” for configuration details.
    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/&gt;.
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”…\n”
    ~”Reading symbols from E:\\projects\\IMU\\STM32_Projects\\Handle_6\\VisualGDB\\Debug\\Handle_6…”
    ~”done.\n”
    ~”GNU gdb (GDB) 8.0.1\n”
    ~”Copyright (C) 2017 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \”show copying\”\nand \”show warranty\” for details.\n”
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type “show copying”
    and “show warranty” for details.
    ~”This GDB was configured as \”–host=i686-w64-mingw32 –target=arm-eabi\”.\nType \”show configuration\” for configuration details.”
    This GDB was configured as “–host=i686-w64-mingw32 –target=arm-eabi”.
    Type “show configuration” for configuration details.
    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/&gt;.
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”.\n”
    ^done
    -list-features
    ^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”data-read-memory-bytes”,”breakpoint-notifications”,”ada-task-info”,”language-option”,”info-gdb-mi-command”,”undefined-command-error-code”,”exec-run-start-option”]
    -gdb-set disassembly-flavor intel
    ^error,msg=”No symbol \”disassembly\” in current context.”
    -gdb-set print demangle off
    ^done
    -break-insert -f main
    ^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x08013302″,func=”main()”,file=”Src/main.cpp”,fullname=”E:\\projects\\IMU\\STM32_Projects\\Handle_6\\Src\\main.cpp”,line=”219″,thread-groups=[“i1″],times=”0″,original-location=”main”}
    set remotetimeout 60
    &”set remotetimeout 60\n”
    =cmd-param-changed,param=”remotetimeout”,value=”60″
    ^done
    target remote :55440
    &”target remote :55440\n”
    ~”Remote debugging using :55440\n”
    =thread-group-started,id=”i1″,pid=”42000″
    =thread-created,id=”1″,group-id=”i1″
    ~”../../gdb-8.0.1/gdb/frame.c:542: internal-error: frame_id get_frame_id(frame_info*): Assertion `stashed’ failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? ”
    ../../gdb-8.0.1/gdb/frame.c:542: internal-error: frame_id get_frame_id(frame_info*): Assertion `stashed’ failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session?
    ~”(y or n) [answered Y; input not from terminal]\n”
    &”\nThis is a bug, please report it.”
    &” For instructions, see:\n<http://www.gnu.org/software/gdb/bugs/&gt;.”
    &”\n\n”
    ~”../../gdb-8.0.1/gdb/frame.c:542: internal-error: frame_id get_frame_id(frame_info*): Assertion `stashed’ failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB? ”
    ../../gdb-8.0.1/gdb/frame.c:542: internal-error: frame_id get_frame_id(frame_info*): Assertion `stashed’ failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Create a core file of GDB?
    ~”(y or n) [answered Y; input not from terminal]\n”
    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application’s support team for more information.

    #20545
    support
    Keymaster

    Hi,

    Thanks for sharing the log. This looks like an internal bug of the gdb debugger included in your toolchain. Please try using a different gdb version (e.g. from an older toolchain), or try changing the debug information format in your project properties as this might stop the bug from being triggered.

    #20547
    JoeWright
    Participant

    Ok, I’ve just changed it to dwarf 2, and it worked.  Then changed it back to gdb optimised and it still worked!  Obviously that tidied up something that a clean and rebuild didn’t.  So all working now, thanks.

    Btw, the version of gdb that I’m using is whatever comes with visualgdb.  Wouldn’t know where to start with going to an older version but since its working now, I’ll leave alone.

     

    Thanks, Joe

    #20550
    support
    Keymaster

    Hi,

    Yes, we indeed ship the pre-built recent versions of the GNU tools like GCC and GDB, however unfortunately resolving the internal bugs of those tools is beyond what we can offer. Hence our best advice for this type of problems (if you run into it again and cannot resolve it via compiler settings) would be to downgrade to a previous gdb release until we release another pre-built version based on newer sources.

    You can always download the older toolchain versions here: http://gnutoolchains.com/arm-eabi/

    Simply copy the arm-eabi-gdb.exe executable from an older toolchain to the newer one and you will be able to use the newest toolchain (including all optimization features it offers) with the old gdb debugger.

     

    #20554
    JoeWright
    Participant

    Ah ok, thanks.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.