forked from Imagelibrary/binutils-gdb
gdbserver: Add PID parameter to linux_get_auxv and linux_get_hwcap
This patch doesn't change gdbserver behaviour, but after later changes are made it avoids a null pointer dereference when HWCAP needs to be obtained for a specific process while current_thread is nullptr. Fixing linux_read_auxv, linux_get_hwcap and linux_get_hwcap2 to take a PID parameter seems more correct than setting current_thread in one particular code path. Changes are propagated to allow passing the new parameter through the call chain. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
@@ -346,8 +346,8 @@ process_stratum_target::supports_read_auxv ()
|
||||
}
|
||||
|
||||
int
|
||||
process_stratum_target::read_auxv (CORE_ADDR offset, unsigned char *myaddr,
|
||||
unsigned int len)
|
||||
process_stratum_target::read_auxv (int pid, CORE_ADDR offset,
|
||||
unsigned char *myaddr, unsigned int len)
|
||||
{
|
||||
gdb_assert_not_reached ("target op read_auxv not supported");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user