USB GDB Server

Sysprogs forums Forums VisualGDB USB GDB Server

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #698
    Anonymous
    Participant

    I have a program that starts a USB GDB Server for a portable device (PSP). I can connect to it and debug through the command prompt like so:

    path-to-gdbpsp-gdb.exe path-to-elfhello_world.elf
    *gdb starts up*
    (gdb) target remote :10001
    (gdb) continue

    Is it possible to start this process with VisualGDB so that I can use the VS debugger rather than the command prompt?

    I’ve set up a MinGW project using a custom toolchain. I’ve changed debug settings to start GDB in “Custom mode” with the launch command above. The target selection command is also identical to the above example. Compilation is working fine, but GDB never responds when the debugger starts.

    #2842
    drakeh
    Participant

    After enabling the diagnostic logs I can see that gdb doesn’t recognize any commands passed to it besides “target remote :10001” which works but VS just reports it as another command that won’t respond.

    C:pspsdkbinpsp-gdb.exe "C:UsersDrakeDocumentsVisual Studio 2012ProjectsMultiplatformPSPLibhello_world.elf"
    -list-features
    GNU gdb 6.8
    Copyright (C) 2008 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later 
    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-pc-mingw32 --target=psp"...
    Undefined command: "-list-features". Try "help".
    -gdb-set stop-on-solib-events 1
    Quit (expect signal SIGINT when the program is resumed)
    Undefined command: "-gdb-set". Try "help".
    -data-list-register-names
    Quit (expect signal SIGINT when the program is resumed)
    Undefined command: "-data-list-register-names". Try "help".
    -gdb-set disassembly-flavor intel
    Quit (expect signal SIGINT when the program is resumed)
    Undefined command: "-gdb-set". Try "help".
    -gdb-set print demangle off
    Quit (expect signal SIGINT when the program is resumed)
    Undefined command: "-gdb-set". Try "help".
    -gdb-version
    Quit (expect signal SIGINT when the program is resumed)
    Undefined command: "-gdb-version". Try "help".
    -gdb-set new-console on
    Quit (expect signal SIGINT when the program is resumed)
    Undefined command: "-gdb-set". Try "help".
    target remote :10001
    Quit (expect signal SIGINT when the program is resumed)
    [New Thread 0]
    _start (args=0, argp=0x0) at ../../../../pspsdk/src/startup/crt0_prx.c:109
    in ../../../../pspsdk/src/startup/crt0_prx.c
    Current language: auto; currently c
    109 ../../../../pspsdk/src/startup/crt0_prx.c: No such file or directory.
    -exec-continue
    Quit (expect signal SIGINT when the program is resumed)
    Undefined command: "-exec-continue". Try "help".
    -thread-select 1
    Quit (expect signal SIGINT when the program is resumed)
    Undefined command: "-thread-select". Try "help".

    Can I customize which commands are sent to gdb? Also, why can’t I see any of this info in the gdb session panel in VS?

    #2843
    ket
    Participant

    Hi,

    VisualGDB uses the machine interface when issuing commands to gdb. Make sure that you are starting gdb with the argument “–interpreter mi”.
    You can see the full gdb log also from the GDB Session window, just set the filter above to “All GDB interaction”, the content of the log is usually filtered because it provides a lot of output.

    #2844
    drakeh
    Participant

    “–interpreter mi” did the trick, thank you!

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