Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 367
GDB stub support#10000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
GDB stub support #10000
Changes from all commits
c0a6906f3d77c586421f6a96173c5f5dab6File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -247,4 +247,7 @@ void ipc_msg_reply(struct sof_ipc_reply *reply); | ||
| */ | ||
| void ipc_complete_cmd(struct ipc *ipc); | ||
| /* GDB stub: should enter GDB after completing the IPC processing */ | ||
lgirdwood marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| extern bool ipc_enter_gdb; | ||
lgirdwood marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| #endif /* __SOF_DRIVERS_IPC_H__ */ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -969,10 +969,14 @@ static int ipc_glb_trace_message(uint32_t header) | ||
| static int ipc_glb_gdb_debug(uint32_t header) | ||
| { | ||
| /* no furher information needs to be extracted form header */ | ||
| /* no further information needs to be extracted from header */ | ||
lgirdwood marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| (void) header; | ||
| #if CONFIG_GDB_DEBUG | ||
| #if CONFIG_GDBSTUB | ||
| ipc_enter_gdb = true; | ||
| return 0; | ||
| // TODO: remove old GDB stub? | ||
| #elif CONFIG_GDB_DEBUG | ||
| gdb_init_debug_exception(); | ||
| gdb_init(); | ||
| /* TODO: this asm should be in arch/include/debug/debug.h | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -817,6 +817,16 @@ __cold static int ipc4_process_ipcgtw_cmd(struct ipc4_message_request *ipc4) | ||
| #endif | ||
| } | ||
| static int ipc_glb_gdb_debug(struct ipc4_message_request *ipc4) | ||
| { | ||
| #if CONFIG_GDBSTUB | ||
| ipc_enter_gdb = true; | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should log this entry as it comes from host IPC | ||
| return IPC4_SUCCESS; | ||
| #else | ||
| return IPC4_UNAVAILABLE; | ||
| #endif | ||
| } | ||
| static int ipc4_process_glb_message(struct ipc4_message_request *ipc4) | ||
| { | ||
| uint32_t type; | ||
| @@ -881,6 +891,10 @@ static int ipc4_process_glb_message(struct ipc4_message_request *ipc4) | ||
| ret = ipc4_process_ipcgtw_cmd(ipc4); | ||
| break; | ||
| case SOF_IPC4_GLB_ENTER_GDB: | ||
| ret = ipc_glb_gdb_debug(ipc4); | ||
| break; | ||
| default: | ||
| ipc_cmd_err(&ipc_tr, "unsupported ipc message type %d", type); | ||
| ret = IPC4_UNAVAILABLE; | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overlay is used in our SOF driver CI, so gdb stub will be enabled. Probably ok and even preferred as this will get a minimal coverage in CI for the gdb build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's the intension