Skip to content

Commit fb916e3

Browse files
lyakhkv2019i
authored andcommitted
ipc4: add support for GDB
Add suppoprt for the new IPC4 GDB enter message. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 4c424c7 commit fb916e3

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/ipc/ipc4/handler.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,16 @@ __cold static int ipc4_process_ipcgtw_cmd(struct ipc4_message_request *ipc4)
768768
#endif
769769
}
770770

771+
static int ipc_glb_gdb_debug(struct ipc4_message_request *ipc4)
772+
{
773+
#if CONFIG_GDBSTUB
774+
ipc_enter_gdb = true;
775+
return IPC4_SUCCESS;
776+
#else
777+
return IPC4_UNAVAILABLE;
778+
#endif
779+
}
780+
771781
static int ipc4_process_glb_message(struct ipc4_message_request *ipc4)
772782
{
773783
uint32_t type;
@@ -832,6 +842,10 @@ static int ipc4_process_glb_message(struct ipc4_message_request *ipc4)
832842
ret = ipc4_process_ipcgtw_cmd(ipc4);
833843
break;
834844

845+
case SOF_IPC4_GLB_ENTER_GDB:
846+
ret = ipc_glb_gdb_debug(ipc4);
847+
break;
848+
835849
default:
836850
ipc_cmd_err(&ipc_tr, "unsupported ipc message type %d", type);
837851
ret = IPC4_UNAVAILABLE;

0 commit comments

Comments
 (0)