[ANSWERED/CLOSED]Semihosting in GDB server

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

  • [ANSWERED/CLOSED]Semihosting in GDB server

    I'm using JLink+GDBServer+GDB to debug my program on a Cortex-M3 chip. I used gdb command "monitor semihosting enable" to enable semihosting, but it doesn't seem to work. GDB stops when it hits "bkpt 0xab" with message like "Program received signal SIGTRAP". No semihosting output as I expected.

    Same thing happens even I use monitor semihosting ThumbSWI 0xab as document described.

    Any thing wrong here?

    Thanks - Joey
  • Hi,

    Just found this old thread which seems to somewhat abandoned...
    Anyhow, just want to make sure that it can also be considered as closed.

    We have massively worked on the semihosting support of J-Link GDBServer and in the meantime, a lot of users are using the semihosting support.
    All that needs to be done is adding 1-2 monitor commands for semihosting to your .gdbinit file.

    The commands are explained in UM08001 (J-Link User Guide, GDBServer User Guide has been merged with this manual):
    segger.com/admin/uploads/productDocs/UM08001_JLinkARM.pdf

    Section "J-Link GDB Server -> Supported remote (monitor) commands". The monitor semihosting xxx commands are the interesting ones.


    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.