gdb: remove current_top_target function
The current_top_target function is a hidden dependency on the current inferior. Since I'd like to slowly move towards reducing our dependency on the global current state, remove this function and make callers use current_inferior ()->top_target () There is no expected change in behavior, but this one step towards making those callers use the inferior from their context, rather than refer to the global current inferior. gdb/ChangeLog: * target.h (current_top_target): Remove, make callers use the current inferior instead. * target.c (current_top_target): Remove. Change-Id: Iccd457036f84466cdaa3865aa3f9339a24ea001d
This commit is contained in:
parent
d777bf0df2
commit
328d42d87e
48 changed files with 454 additions and 329 deletions
|
@ -214,10 +214,12 @@ adi_available (void)
|
|||
return proc->stat.is_avail;
|
||||
|
||||
proc->stat.checked_avail = true;
|
||||
if (target_auxv_search (current_top_target (), AT_ADI_BLKSZ, &value) <= 0)
|
||||
if (target_auxv_search (current_inferior ()->top_target (),
|
||||
AT_ADI_BLKSZ, &value) <= 0)
|
||||
return false;
|
||||
proc->stat.blksize = value;
|
||||
target_auxv_search (current_top_target (), AT_ADI_NBITS, &value);
|
||||
target_auxv_search (current_inferior ()->top_target (),
|
||||
AT_ADI_NBITS, &value);
|
||||
proc->stat.nbits = value;
|
||||
proc->stat.max_version = (1 << proc->stat.nbits) - 2;
|
||||
proc->stat.is_avail = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue