Debugging Child Process

Sysprogs forums Forums VisualGDB Debugging Child Process

Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
    Posts
  • #9564
    support
    Keymaster

    Hi,

    OK, this looks like gdb 7.12 was either not compatible with your board, or built incorrectly. Hence the easiest way to get this to work would be using gdb directly on the board.

    If you are not using the Custom edition, this would involve cloning the current configuration and changing the new configuration properties as follows:

    1. Computer used for building and debugging: (your Wandboard)
    2. Debugged executable: (full path to the deployed executable on Wandboard)
    3. Additional startup commands: set follow-fork-mode child

    Then you could build the project using the regular configuration and debug it using the second configuration.

    If you were using the Custom edition, you could override the machine where gdb is launched (by default it is the same machine that compiles the code) and not need the second configuration.

    #9615
    sidprice
    Participant

    Thank you.

     

    I have purchased an upgrade to the Custom edition and upgraded my installation with the new key.

    However, I don’t seem to find how to tell VGDB to use GDB on my target board? When I try to customize the path to GDB the computer selection is greyed out. Is there some other setting I need to adjust first?

    Sid

    • This reply was modified 8 years ago by sidprice.
    #9628
    support
    Keymaster

    Hi,

    Yes, please check the ‘Allow choosing build/clean/debug command hosts independently’ checkbox on the Project Settings page of VisualGDB Project Properties.

    #9642
    sidprice
    Participant

    Okay, so I have VisualGDB set up to use the 7.12 GDB on my target. The first thing I notice is that starting my application takes forever! Lots of libraries being loaded from the target! This makes e hope that I do not have to stay using GDB on the target.

    Anyway, I still have the same issue I had when GDB was run on the build server. Without the “follow-fork-mode child” set the application runs to the first line, I have a breakpoint there. I also have other breakpoints set. When I run the application from this first line the target disconnects from GDB:

    -exec-continue
    ^running
    *running,thread-id=”all”
    ~”Error detected on fd 7\n”
    =thread-group-exited,id=”i1″
    &”Remote communication error. Target disconnected.: Resource temporarily unavailable.\n”

    I have narrowed down when this occurs, it is when my application executes a “system” command:

    int iReturn = system( &szCommand[0] );

    This does NOT occur if I run the 7.10 toolchain.

    Also, I tested using the 7.10 toolchain using GDB on the target with the “follow-fork-mode” set to “child” and GDB does NOT follow the fork to the child process.

    So, 7.10 does not allow child process debugging and 7.12 does not allow me to debug my application at all.

    Any help resolving this would be much appreciated,

    Sid.

    #9649
    support
    Keymaster

    Hi,

    Sorry, looks like you are still using the gdbserver. Otherwise the ‘Remote communication error.’ message will not be shown.

    Please try selecting the direct mode manually:

    1. Start gdb in the following mode: Custom mode
    2. GDB launch command: gdb –interpreter mi –args “$(TargetPath)”
    3. Use a gdbserver: no
    4. Target selection command: (empty)
    5. Debugging start mode: use “run” command
    #9650
    sidprice
    Participant

    Sorry I don’t understand your instructions. Where do I type these commands, directly on the target? I really need better instructions please,

    Sid

    #9651
    sidprice
    Participant

    One note, I am debugging an application and a shared library, the use of the target’s GDB is only in the project properties of the application. Do I need to change the properties of the library as well?

    Sid

    #9652
    support
    Keymaster

    Hi,

    Please refer to the screenshot below (this corresponds to the Debug Settings page of VisualGDB Project Properties):

    You only need to set those for the executable project.

    #9653
    sidprice
    Participant

    Thanks, I had just figured that out. The macro $(TargetPath) does not expand correctly, I had to place “/tmp/Wandboard_ISP” into the Launch Command. The debug session produces the following log output and does not run:

    (gdb begin)
    VisualGDB is licensed to Sid Price
    /usr/bin/gdb –interpreter mi –args “/tmp/Wandboard_ISP”
    =thread-group-added,id=”i1″
    ~”GNU gdb (GDB) 7.12\n”
    -gdb-version
    ~”Copyright (C) 2016 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”
    ~”This GDB was configured as \”arm-poky-linux-gnueabi\”.\nType \”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”
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”…\n”
    ~”Reading symbols from /tmp/Wandboard_ISP…”
    ~”done.\n”
    ~”GNU gdb (GDB) 7.12\n”
    ~”Copyright (C) 2016 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”
    ~”This GDB was configured as \”arm-poky-linux-gnueabi\”.\nType \”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”
    ~”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=”0x00010830″,func=”main(int, char**)”,file=”Wandboard_ISP.cpp”,fullname=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/Wandboard_ISP.cpp”,line=”50″,thread-groups=[“i1″],times=”0″,original-location=”main”}
    -gdb-set solib-search-path /tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/Debug:/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/ISP_Lib/Debug
    ^done
    -gdb-show sysroot
    ^done,value=”target:”
    -gdb-show debug-file-directory
    ^done,value=”/usr/lib/debug”
    -gdb-set debug-file-directory target:/usr/lib/debug
    ^done
    -inferior-tty-set /dev/pts/18
    ^done
    set output-radix 16
    &”set output-radix 16\n”
    ~”Output radix now set to decimal 16, hex 10, octal 20.\n”
    =cmd-param-changed,param=”output-radix”,value=”16″
    ^done
    info target
    &”info target\n”
    ~”Symbols from \”/tmp/Wandboard_ISP\”.\n”
    ~”Local exec file:\n”
    ~”\t`/tmp/Wandboard_ISP’, file type elf32-littlearm.\n”
    ~”\tEntry point: 0x106a0\n”
    ~”\t0x00010134 – 0x0001014d is .interp\n”
    ~”\t0x00010150 – 0x00010170 is .note.ABI-tag\n”
    ~”\t0x00010170 – 0x00010194 is .note.gnu.build-id\n”
    ~”\t0x00010194 – 0x0001023c is .gnu.hash\n”
    ~”\t0x0001023c – 0x000103ac is .dynsym\n”
    ~”\t0x000103ac – 0x00010553 is .dynstr\n”
    ~”\t0x00010554 – 0x00010582 is .gnu.version\n”
    ~”\t0x00010584 – 0x000105c4 is .gnu.version_r\n”
    ~”\t0x000105c4 – 0x000105cc is .rel.dyn\n”
    ~”\t0x000105cc – 0x00010614 is .rel.plt\n”
    ~”\t0x00010614 – 0x00010620 is .init\n”
    ~”\t0x00010620 – 0x000106a0 is .plt\n”
    ~”\t0x000106a0 – 0x000109c8 is .text\n”
    ~”\t0x000109c8 – 0x000109d0 is .fini\n”
    ~”\t0x000109d0 – 0x00010ad6 is .rodata\n”
    ~”\t0x00010ad8 – 0x00010af0 is .ARM.extab\n”
    ~”\t0x00010af0 – 0x00010b10 is .ARM.exidx\n”
    ~”\t0x00010b10 – 0x00010b14 is .eh_frame\n”
    ~”\t0x00020b14 – 0x00020b18 is .init_array\n”
    ~”\t0x00020b18 – 0x00020b1c is .fini_array\n”
    ~”\t0x00020b1c – 0x00020b20 is .jcr\n”
    ~”\t0x00020b20 – 0x00020c38 is .dynamic\n”
    ~”\t0x00020c38 – 0x00020c6c is .got\n”
    ~”\t0x00020c6c – 0x00020c78 is .data\n”
    ~”\t0x00020c78 – 0x00020c80 is .bss\n”
    ^done
    -break-insert -f /tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/ISP_Lib/ISP_Lib.cpp:485
    &”No source file named /tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/ISP_Lib/ISP_Lib.cpp.\n”
    ^done,bkpt={number=”2″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/ISP_Lib/ISP_Lib.cpp:485″,times=”0″,original-location=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/ISP_Lib/ISP_Lib.cpp:485″}
    -file-list-exec-source-files
    ^done,files=[{file=”Wandboard_ISP.cpp”,fullname=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/Wandboard_ISP.cpp”},{file=”/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0/include/stddef.h”,fullname=”/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0/include/stddef.h”},{file=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/bits/types.h”,fullname=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/bits/types.h”},{file=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/stdio.h”,fullname=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/stdio.h”},{file=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/libio.h”,fullname=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/libio.h”},{file=”../ISP_Lib/ISP_Lib_Errors.h”,fullname=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/../ISP_Lib/ISP_Lib_Errors.h”},{file=”../ISP_Lib/headers/WinTypes.h”,fullname=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/../ISP_Lib/headers/WinTypes.h”},{file=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/bits/confname.h”,fullname=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/bits/confname.h”},{file=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/pthread.h”,fullname=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/pthread.h”},{file=”../ISP_Lib/headers/ftd2xx.h”,fullname=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/../ISP_Lib/headers/ftd2xx.h”},{file=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/bits/fcntl-linux.h”,fullname=”/opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/bits/fcntl-linux.h”},{file=”../sysdeps/arm/crtn.S”,fullname=”/usr/src/debug/glibc/2.23-r0/git/sysdeps/arm/crtn.S”},{file=”/usr/src/debug/glibc/2.23-r0/git/csu/elf-init.c”,fullname=”/usr/src/debug/glibc/2.23-r0/git/csu/elf-init.c”},{file=”../sysdeps/arm/crti.S”,fullname=”/usr/src/debug/glibc/2.23-r0/git/sysdeps/arm/crti.S”},{file=”/usr/src/debug/glibc/2.23-r0/git/csu/init.c”,fullname=”/usr/src/debug/glibc/2.23-r0/git/csu/init.c”},{file=”../sysdeps/arm/start.S”,fullname=”/usr/src/debug/glibc/2.23-r0/git/sysdeps/arm/start.S”}]
    -break-after 2 0
    ^done
    -break-insert -f /tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/Wandboard_ISP.cpp:62
    ^done,bkpt={number=”3″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x00010878″,func=”main(int, char**)”,file=”Wandboard_ISP.cpp”,fullname=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/Wandboard_ISP.cpp”,line=”62″,thread-groups=[“i1″],times=”0″,original-location=”/tmp/VisualGDB/c/DataRoot/Projects/isp-library-and-application/Wandboard_ISP/Wandboard_ISP.cpp:62″}
    -break-after 3 0
    ^done
    info symbol 0x10878
    &”info symbol 0x10878\n”
    ~”main + 92 in section .text\n”
    ^done
    info line *0x10878
    &”info line *0x10878\n”
    ~”Line 62 of \”Wandboard_ISP.cpp\” starts at address 0x10878 <main(int, char**)+92> and ends at 0x10884 <main(int, char**)+104>.\n”
    ^done
    info signals
    &”info signals\n”
    ~”Signal Stop\tPrint\tPass to program\tDescription\n”
    ~”\n”
    ~”SIGHUP Yes\tYes\tYes\t\tHangup\n”
    ~”SIGINT Yes\tYes\tNo\t\tInterrupt\n”
    ~”SIGQUIT Yes\tYes\tYes\t\tQuit\n”
    ~”SIGILL Yes\tYes\tYes\t\tIllegal instruction\n”
    ~”SIGTRAP Yes\tYes\tNo\t\tTrace/breakpoint trap\n”
    ~”SIGABRT Yes\tYes\tYes\t\tAborted\n”
    ~”SIGEMT Yes\tYes\tYes\t\tEmulation trap\n”
    ~”SIGFPE Yes\tYes\tYes\t\tArithmetic exception\n”
    ~”SIGKILL Yes\tYes\tYes\t\tKilled\n”
    ~”SIGBUS Yes\tYes\tYes\t\tBus error\n”
    ~”SIGSEGV Yes\tYes\tYes\t\tSegmentation fault\n”
    ~”SIGSYS Yes\tYes\tYes\t\tBad system call\n”
    ~”SIGPIPE Yes\tYes\tYes\t\tBroken pipe\n”
    ~”SIGALRM No\tNo\tYes\t\tAlarm clock\n”
    ~”SIGTERM Yes\tYes\tYes\t\tTerminated\n”
    ~”SIGURG No\tNo\tYes\t\tUrgent I/O condition\n”
    ~”SIGSTOP Yes\tYes\tYes\t\tStopped (signal)\n”
    ~”SIGTSTP Yes\tYes\tYes\t\tStopped (user)\n”
    ~”SIGCONT Yes\tYes\tYes\t\tContinued\n”
    ~”SIGCHLD No\tNo\tYes\t\tChild status changed\n”
    ~”SIGTTIN Yes\tYes\tYes\t\tStopped (tty input)\n”
    ~”SIGTTOU Yes\tYes\tYes\t\tStopped (tty output)\n”
    ~”SIGIO No\tNo\tYes\t\tI/O possible\n”
    ~”SIGXCPU Yes\tYes\tYes\t\tCPU time limit exceeded\n”
    ~”SIGXFSZ Yes\tYes\tYes\t\tFile size limit exceeded\n”
    ~”SIGVTALRM No\tNo\tYes\t\tVirtual timer expired\n”
    ~”SIGPROF No\tNo\tYes\t\tProfiling timer expired\n”
    ~”SIGWINCH No\tNo\tYes\t\tWindow size changed\n”
    ~”SIGLOST Yes\tYes\tYes\t\tResource lost\n”
    ~”SIGUSR1 Yes\tYes\tYes\t\tUser defined signal 1\n”
    ~”SIGUSR2 Yes\tYes\tYes\t\tUser defined signal 2\n”
    ~”SIGPWR Yes\tYes\tYes\t\tPower fail/restart\n”
    ~”SIGPOLL No\tNo\tYes\t\tPollable event occurred\n”
    ~”SIGWIND Yes\tYes\tYes\t\tSIGWIND\n”
    ~”SIGPHONE Yes\tYes\tYes\t\tSIGPHONE\n”
    ~”SIGWAITING No\tNo\tYes\t\tProcess’s LWPs are blocked\n”
    ~”SIGLWP No\tNo\tYes\t\tSignal LWP\n”
    ~”SIGDANGER Yes\tYes\tYes\t\tSwap space dangerously low\n”
    ~”SIGGRANT Yes\tYes\tYes\t\tMonitor mode granted\n”
    ~”SIGRETRACT Yes\tYes\tYes\t\tNeed to relinquish monitor mode\n”
    ~”SIGMSG Yes\tYes\tYes\t\tMonitor mode data available\n”
    ~”SIGSOUND Yes\tYes\tYes\t\tSound completed\n”
    ~”SIGSAK Yes\tYes\tYes\t\tSecure attention\n”
    ~”SIGPRIO No\tNo\tYes\t\tSIGPRIO\n”
    ~”SIG33 Yes\tYes\tYes\t\tReal-time event 33\n”
    ~”SIG34 Yes\tYes\tYes\t\tReal-time event 34\n”
    ~”SIG35 Yes\tYes\tYes\t\tReal-time event 35\n”
    ~”SIG36 Yes\tYes\tYes\t\tReal-time event 36\n”
    ~”SIG37 Yes\tYes\tYes\t\tReal-time event 37\n”
    ~”SIG38 Yes\tYes\tYes\t\tReal-time event 38\n”
    ~”SIG39 Yes\tYes\tYes\t\tReal-time event 39\n”
    ~”SIG40 Yes\tYes\tYes\t\tReal-time event 40\n”
    ~”SIG41 Yes\tYes\tYes\t\tReal-time event 41\n”
    ~”SIG42 Yes\tYes\tYes\t\tReal-time event 42\n”
    ~”SIG43 Yes\tYes\tYes\t\tReal-time event 43\n”
    ~”SIG44 Yes\tYes\tYes\t\tReal-time event 44\n”
    ~”SIG45 Yes\tYes\tYes\t\tReal-time event 45\n”
    ~”SIG46 Yes\tYes\tYes\t\tReal-time event 46\n”
    ~”SIG47 Yes\tYes\tYes\t\tReal-time event 47\n”
    ~”SIG48 Yes\tYes\tYes\t\tReal-time event 48\n”
    ~”SIG49 Yes\tYes\tYes\t\tReal-time event 49\n”
    ~”SIG50 Yes\tYes\tYes\t\tReal-time event 50\n”
    ~”SIG51 Yes\tYes\tYes\t\tReal-time event 51\n”
    ~”SIG52 Yes\tYes\tYes\t\tReal-time event 52\n”
    ~”SIG53 Yes\tYes\tYes\t\tReal-time event 53\n”
    ~”SIG54 Yes\tYes\tYes\t\tReal-time event 54\n”
    ~”SIG55 Yes\tYes\tYes\t\tReal-time event 55\n”
    ~”SIG56 Yes\tYes\tYes\t\tReal-time event 56\n”
    ~”SIG57 Yes\tYes\tYes\t\tReal-time event 57\n”
    ~”SIG58 Yes\tYes\tYes\t\tReal-time event 58\n”
    ~”SIG59 Yes\tYes\tYes\t\tReal-time event 59\n”
    ~”SIG60 Yes\tYes\tYes\t\tReal-time event 60\n”
    ~”SIG61 Yes\tYes\tYes\t\tReal-time event 61\n”
    ~”SIG62 Yes\tYes\tYes\t\tReal-time event 62\n”
    ~”SIG63 Yes\tYes\tYes\t\tReal-time event 63\n”
    ~”SIGCANCEL No\tNo\tYes\t\tLWP internal signal\n”
    ~”SIG32 Yes\tYes\tYes\t\tReal-time event 32\n”
    ~”SIG64 Yes\tYes\tYes\t\tReal-time event 64\n”
    ~”SIG65 Yes\tYes\tYes\t\tReal-time event 65\n”
    ~”SIG66 Yes\tYes\tYes\t\tReal-time event 66\n”
    ~”SIG67 Yes\tYes\tYes\t\tReal-time event 67\n”
    ~”SIG68 Yes\tYes\tYes\t\tReal-time event 68\n”
    ~”SIG69 Yes\tYes\tYes\t\tReal-time event 69\n”
    ~”SIG70 Yes\tYes\tYes\t\tReal-time event 70\n”
    ~”SIG71 Yes\tYes\tYes\t\tReal-time event 71\n”
    ~”SIG72 Yes\tYes\tYes\t\tReal-time event 72\n”
    ~”SIG73 Yes\tYes\tYes\t\tReal-time event 73\n”
    ~”SIG74 Yes\tYes\tYes\t\tReal-time event 74\n”
    ~”SIG75 Yes\tYes\tYes\t\tReal-time event 75\n”
    ~”SIG76 Yes\tYes\tYes\t\tReal-time event 76\n”
    ~”SIG77 Yes\tYes\tYes\t\tReal-time event 77\n”
    ~”SIG78 Yes\tYes\tYes\t\tReal-time event 78\n”
    ~”SIG79 Yes\tYes\tYes\t\tReal-time event 79\n”
    ~”SIG80 Yes\tYes\tYes\t\tReal-time event 80\n”
    ~”SIG81 Yes\tYes\tYes\t\tReal-time event 81\n”
    ~”SIG82 Yes\tYes\tYes\t\tReal-time event 82\n”
    ~”SIG83 Yes\tYes\tYes\t\tReal-time event 83\n”
    ~”SIG84 Yes\tYes\tYes\t\tReal-time event 84\n”
    ~”SIG85 Yes\tYes\tYes\t\tReal-time event 85\n”
    ~”SIG86 Yes\tYes\tYes\t\tReal-time event 86\n”
    ~”SIG87 Yes\tYes\tYes\t\tReal-time event 87\n”
    ~”SIG88 Yes\tYes\tYes\t\tReal-time event 88\n”
    ~”SIG89 Yes\tYes\tYes\t\tReal-time event 89\n”
    ~”SIG90 Yes\tYes\tYes\t\tReal-time event 90\n”
    ~”SIG91 Yes\tYes\tYes\t\tReal-time event 91\n”
    ~”SIG92 Yes\tYes\tYes\t\tReal-time event 92\n”
    ~”SIG93 Yes\tYes\tYes\t\tReal-time event 93\n”
    ~”SIG94 Yes\tYes\tYes\t\tReal-time event 94\n”
    ~”SIG95 Yes\tYes\tYes\t\tReal-time event 95\n”
    ~”SIG96 Yes\tYes\tYes\t\tReal-time event 96\n”
    ~”SIG97 Yes\tYes\tYes\t\tReal-time event 97\n”
    ~”SIG98 Yes\tYes\tYes\t\tReal-time event 98\n”
    ~”SIG99 Yes\tYes\tYes\t\tReal-time event 99\n”
    ~”SIG100 Yes\tYes\tYes\t\tReal-time event 100\n”
    ~”SIG101 Yes\tYes\tYes\t\tReal-time event 101\n”
    ~”SIG102 Yes\tYes\tYes\t\tReal-time event 102\n”
    ~”SIG103 Yes\tYes\tYes\t\tReal-time event 103\n”
    ~”SIG104 Yes\tYes\tYes\t\tReal-time event 104\n”
    ~”SIG105 Yes\tYes\tYes\t\tReal-time event 105\n”
    ~”SIG106 Yes\tYes\tYes\t\tReal-time event 106\n”
    ~”SIG107 Yes\tYes\tYes\t\tReal-time event 107\n”
    ~”SIG108 Yes\tYes\tYes\t\tReal-time event 108\n”
    ~”SIG109 Yes\tYes\tYes\t\tReal-time event 109\n”
    ~”SIG110 Yes\tYes\tYes\t\tReal-time event 110\n”
    ~”SIG111 Yes\tYes\tYes\t\tReal-time event 111\n”
    ~”SIG112 Yes\tYes\tYes\t\tReal-time event 112\n”
    ~”SIG113 Yes\tYes\tYes\t\tReal-time event 113\n”
    ~”SIG114 Yes\tYes\tYes\t\tReal-time event 114\n”
    ~”SIG115 Yes\tYes\tYes\t\tReal-time event 115\n”
    ~”SIG116 Yes\tYes\tYes\t\tReal-time event 116\n”
    ~”SIG117 Yes\tYes\tYes\t\tReal-time event 117\n”
    ~”SIG118 Yes\tYes\tYes\t\tReal-time event 118\n”
    ~”SIG119 Yes\tYes\tYes\t\tReal-time event 119\n”
    ~”SIG120 Yes\tYes\tYes\t\tReal-time event 120\n”
    ~”SIG121 Yes\tYes\tYes\t\tReal-time event 121\n”
    ~”SIG122 Yes\tYes\tYes\t\tReal-time event 122\n”
    ~”SIG123 Yes\tYes\tYes\t\tReal-time event 123\n”
    ~”SIG124 Yes\tYes\tYes\t\tReal-time event 124\n”
    ~”SIG125 Yes\tYes\tYes\t\tReal-time event 125\n”
    ~”SIG126 Yes\tYes\tYes\t\tReal-time event 126\n”
    ~”SIG127 Yes\tYes\tYes\t\tReal-time event 127\n”
    ~”SIGINFO Yes\tYes\tYes\t\tInformation request\n”
    ~”EXC_BAD_ACCESS Yes\tYes\tYes\t\tCould not access memory\n”
    ~”EXC_BAD_INSTRUCTION Yes\tYes\tYes\t\tIllegal instruction/operand\n”
    ~”EXC_ARITHMETIC Yes\tYes\tYes\t\tArithmetic exception\n”
    ~”EXC_EMULATION Yes\tYes\tYes\t\tEmulation instruction\n”
    ~”EXC_SOFTWARE Yes\tYes\tYes\t\tSoftware generated exception\n”
    ~”EXC_BREAKPOINT Yes\tYes\tYes\t\tBreakpoint\n”
    ~”SIGLIBRT No\tNo\tYes\t\tlibrt internal signal\n”
    ~”\nUse the \”handle\” command to change these tables.\n”
    ^done
    -data-evaluate-expression “sizeof(void *)”
    ^done,value=”0x4″
    handle SIGUSR1 nostop
    &”handle SIGUSR1 nostop\n”
    ~”Signal Stop\tPrint\tPass to program\tDescription\n”
    ~”SIGUSR1 No\tYes\tYes\t\tUser defined signal 1\n”
    ^done
    handle SIGUSR2 nostop
    &”handle SIGUSR2 nostop\n”
    ~”Signal Stop\tPrint\tPass to program\tDescription\n”
    ~”SIGUSR2 No\tYes\tYes\t\tUser defined signal 2\n”
    ^done
    -exec-run
    &”/dev/pts/18: No such file or directory.\n”
    =thread-group-started,id=”i1″,pid=”4411″
    =thread-created,id=”1″,group-id=”i1″
    =thread-exited,id=”1″,group-id=”i1″
    =thread-group-exited,id=”i1″
    ^error,msg=”During startup program exited with code 1.”

    #9654
    support
    Keymaster

    Hi,

    Sorry, looks like the virtual terminal mechanism used by VisualGDB to redirect the program output is broken on your Linux distro:

    &”/dev/pts/18: No such file or directory.\n”

    The only workaround we could suggest is to explicitly forward the program output to a file:

    1. Create an empty file on the Linux machine (e.g. /tmp/output) by running the following command on Linux via SmarTTY: echo > /tmp/output
    2. Add the following command to the GDB commands after selecting a target (Additional GDB Commands page): tty /tmp/output

    Note that you will not see the program output in real time then as it will be forwarded to a file.

    #9655
    sidprice
    Participant

    We seem to go in infinite circles here. I don’t understand why all of this worked with v7.10 and so broken with 7.12, my target is unchanged other than the toolchain.

    Sid

    #9657
    support
    Keymaster

    Hi,

    Sorry, GNU tools like GDB are often unreliable and some versions may simply be not compatible with certain OS versions. If the version 7.12 does not work, the only advice we can give is to revert back to v7.10. As long as you are using the new method to run gdb directly on the target, both 7.10 and 7.12 should work.

    #9661
    sidprice
    Participant

    To close out this issue since with the help of VisualGDB support we are now able to debug child processes …

    At this time we are running GDB on the target board and not using GDBServer.

    The “follow-fork-mode” was being set in the GDB startup options; before the application did a “fork” to the child process needing to be debugged the application was using some “system” calls to execute some commands. When the first “system” call was executed a new shell was being forked and GDB followed that child process. After the shell terminated GDB did not follow any further forks and the application’s child process was therefore not being debugged.

    The solution was either to not set the “follow-fork-mode” option until after the “system” commands had been executed or to simply place a breakpoint at the application’s “fork” instruction, and then set the “follow-fork-mode” option manually.

    This procedure worked with GDB 7.12 and we will test it with v7.10 because with v7,12 there appears to be an issue with the virtual terminal and we would prefer to have console output reported to Visual Studio as the application runs rather than to a file (the current work-around).

    Many thanks for the support!

    Sid

Viewing 13 posts - 16 through 28 (of 28 total)
  • You must be logged in to reply to this topic.