Skip to content
  • Liviu Ionescu's avatar
    a38bb079
    Add the "-semihosting-config" option. · a38bb079
    Liviu Ionescu authored
    
    
    The usual semihosting behaviour is to process the system calls locally and
    return; unfortuantelly the initial implementation dinamically changed the
    target to GDB during debug sessions, which, for the usual arm-none-eabi-gdb,
    is not implemented. The result was that during debug sessions the semihosting
    calls were discarded.
    
    This patch adds a configuration variable and an option to set it on the
    command line:
    
        -semihosting-config [enable=on|off,]target=native|gdb|auto
    
    This option enables semihosting and defines where the semihosting calls will
    be addressed, to QEMU ('native') or to GDB ('gdb'). The default is auto, which
    means 'gdb' during debug sessions and 'native' otherwise.
    
    Signed-off-by: default avatarLiviu Ionescu <ilg@livius.net>
    Message-id: 1416341957-9796-1-git-send-email-ilg@livius.net
    [PMM: moved declaration and definition of semihosting_target to
     gdbstub.h and gdbstub.c to fix build failure on linux-user]
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    a38bb079
    Add the "-semihosting-config" option.
    Liviu Ionescu authored
    
    
    The usual semihosting behaviour is to process the system calls locally and
    return; unfortuantelly the initial implementation dinamically changed the
    target to GDB during debug sessions, which, for the usual arm-none-eabi-gdb,
    is not implemented. The result was that during debug sessions the semihosting
    calls were discarded.
    
    This patch adds a configuration variable and an option to set it on the
    command line:
    
        -semihosting-config [enable=on|off,]target=native|gdb|auto
    
    This option enables semihosting and defines where the semihosting calls will
    be addressed, to QEMU ('native') or to GDB ('gdb'). The default is auto, which
    means 'gdb' during debug sessions and 'native' otherwise.
    
    Signed-off-by: default avatarLiviu Ionescu <ilg@livius.net>
    Message-id: 1416341957-9796-1-git-send-email-ilg@livius.net
    [PMM: moved declaration and definition of semihosting_target to
     gdbstub.h and gdbstub.c to fix build failure on linux-user]
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Loading