GDB server tray icon is not removed

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • GDB server tray icon is not removed

    When I have a tool which is automatically launching the GDB server and also terminates the process after finish, the icon is not removed from the tray. I will end up with >50 icons after a day in the tray which will remove if I hoover with the mouse over the Icons.

    System: Windows 7 x64
  • Hi,

    Terminating the GDBServer from outside is not a good idea since this kills the process without giving it the chance to shut down properly.
    This can lead to the behavior you are seeing.
    We recommend to start GDBServer with the "-s" command line option which means "single run mode". It will then shut down automatically as soon as GDB disconnects.


    Best regards
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Thanks. Is it possible to turn off the tray icon's?

    Because it is an helper process one should be able to kill the process without problems. The same, as is, for compiler applications in the background.
    There is also a icon on the taskbar (which is removed as expected) so how many icon's do we need?

    The post was edited 1 time, last by EmBlocks ().

  • Hi,

    There is no possibility to turn off the tray icon of GDBServer.

    If you close the GDBServer in a proper way it will terminate and clean itself from the tray.
    There should be a possibility to close GDBServer without killing it.
    The same, as is, for compiler applications in the background.
    There is also a icon on the taskbar (which is removed as expected) so how many icon's do we need?
    The compiler has nothing to do with J-Link and it depends on which compiler you are using, if it creates a tray icon, or not.

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Thanks,

    Could it be that the server is not reacting right on a windows message

    :: PostMessage( <gdb_server_handle>, WM_QUIT, 0, 0);

    I guess that the GDB server should go in a clean shutdown when receiving this message.

    According MSDN "Indicates a request to terminate an application.."

    The server is quiting as expected but the tray icon is still there (only removes after mouse hoover).
  • No jlink has nothing to do with the compiler but they have in common that they both are helper processes.
    Compiler processes are also killable by IDE's otherwise a lot of IDE's would become unresponsive.

    But I have solved this issue with the -s workaround (I would preferred to switch of tray icons or no icons for the CL version, but ok).

    The Em::Blocks GUI squirrel script for a generic family type looks like this:

    Source Code

    1. function InitDebugSession()
    2. {
    3. local string = ::wxString(); // our local wxString instance
    4. // We have to disable the active_close every session because it's turned on per default.
    5. // We use the '-s' option at the Segger commandline so that it will terminate if the
    6. // connection is lost. This will prevent a lot of tray icons which are otherwise not cleaned up.
    7. dbginterface.SetValue(_T("ID_SERVER_ACTIVE_CLOSE"), _T("0") );
    8. string = _T("-s "); // The '-s' option in front of it
    9. string.Add(dbginterface.GetValue(_T("ID_GDB_SERVER_CL")) );
    10. dbginterface.SetServerArguments(string);
    11. dbginterface.SetResetCommands( dbginterface.GetValue(_T("ID_CMD_RESET")) );
    12. dbginterface.SetBeforeConnectCommands( dbginterface.GetValue(_T("ID_CMD_BEFORE")) );
    13. dbginterface.SetAfterConnectCommands(dbginterface.GetValue(_T("ID_CMD_AFTER")));
    14. }
    Display All


    Thanks again.