Fix gdbstub failure when debugging e2k executables.
This commit is contained in:
parent
9bed0fa1ca
commit
d028b700a1
@ -2260,7 +2260,7 @@ static void handle_query_xfer_features(GArray *params, void *user_ctx)
|
||||
gdbserver_state.str_buf->len, true);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX_USER)
|
||||
#if defined(CONFIG_USER_ONLY) && (defined(CONFIG_LINUX_USER) || defined(CONFIG_BSD_USER))
|
||||
static void handle_query_xfer_auxv(GArray *params, void *user_ctx)
|
||||
{
|
||||
TaskState *ts;
|
||||
@ -2274,8 +2274,13 @@ static void handle_query_xfer_auxv(GArray *params, void *user_ctx)
|
||||
offset = get_param(params, 0)->val_ul;
|
||||
len = get_param(params, 1)->val_ul;
|
||||
ts = gdbserver_state.c_cpu->opaque;
|
||||
#if defined(CONFIG_BSD_USER)
|
||||
saved_auxv = 0;
|
||||
auxv_len = 0;
|
||||
#else
|
||||
saved_auxv = ts->info->saved_auxv;
|
||||
auxv_len = ts->info->auxv_len;
|
||||
#endif
|
||||
|
||||
if (offset >= auxv_len) {
|
||||
put_packet("E00");
|
||||
@ -2412,7 +2417,7 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = {
|
||||
.cmd_startswith = 1,
|
||||
.schema = "s:l,l0"
|
||||
},
|
||||
#if defined(CONFIG_USER_ONLY) && defined(CONFIG_LINUX_USER)
|
||||
#if defined(CONFIG_USER_ONLY) && (defined(CONFIG_LINUX_USER) || defined(CONFIG_BSD_USER))
|
||||
{
|
||||
.handler = handle_query_xfer_auxv,
|
||||
.cmd = "Xfer:auxv:read::",
|
||||
|
Loading…
Reference in New Issue
Block a user