Skip to content

Commit 8e6fdd1

Browse files
committed
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 c59c5ca commit 8e6fdd1

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
@@ -816,6 +816,16 @@ __cold static int ipc4_process_ipcgtw_cmd(struct ipc4_message_request *ipc4)
816816
#endif
817817
}
818818

819+
static int ipc_glb_gdb_debug(struct ipc4_message_request *ipc4)
820+
{
821+
#if CONFIG_GDBSTUB
822+
ipc_enter_gdb = true;
823+
return IPC4_SUCCESS;
824+
#else
825+
return IPC4_UNAVAILABLE;
826+
#endif
827+
}
828+
819829
static int ipc4_process_glb_message(struct ipc4_message_request *ipc4)
820830
{
821831
uint32_t type;
@@ -880,6 +890,10 @@ static int ipc4_process_glb_message(struct ipc4_message_request *ipc4)
880890
ret = ipc4_process_ipcgtw_cmd(ipc4);
881891
break;
882892

893+
case SOF_IPC4_GLB_ENTER_GDB:
894+
ret = ipc_glb_gdb_debug(ipc4);
895+
break;
896+
883897
default:
884898
ipc_cmd_err(&ipc_tr, "unsupported ipc message type %d", type);
885899
ret = IPC4_UNAVAILABLE;

0 commit comments

Comments
 (0)