mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-12 03:26:19 +08:00
gdb: use intrusive_list for linux-nat lwp_list
Replace the manually maintained linked list of lwp_info objects with intrusive_list. Replace the ALL_LWPS macro with all_lwps, which returns a range. Add all_lwps_safe as well, for use in iterate_over_lwps, which currently iterates in a safe manner. Change-Id: I355313502510acc0103f5eaf2fbde80897d6376c
This commit is contained in:
@ -632,12 +632,9 @@ mips_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
|
||||
static int
|
||||
write_watchpoint_regs (void)
|
||||
{
|
||||
struct lwp_info *lp;
|
||||
int tid;
|
||||
|
||||
ALL_LWPS (lp)
|
||||
for (const lwp_info *lp : all_lwps ())
|
||||
{
|
||||
tid = lp->ptid.lwp ();
|
||||
int tid = lp->ptid.lwp ();
|
||||
if (ptrace (PTRACE_SET_WATCH_REGS, tid, &watch_mirror, NULL) == -1)
|
||||
perror_with_name (_("Couldn't write debug register"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user