From: Simon Marchi Date: Mon, 17 Nov 2025 19:45:01 +0000 (-0500) Subject: gdb/mips: fix lwp_info ptr -> ref X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6661e10ff9aff84153a5960b8803b50c38c3de8d;p=thirdparty%2Fbinutils-gdb.git gdb/mips: fix lwp_info ptr -> ref Fix this: CXX mips-linux-nat.o /home/smarchi/src/binutils-gdb/gdb/mips-linux-nat.c: In function ‘int write_watchpoint_regs()’: /home/smarchi/src/binutils-gdb/gdb/mips-linux-nat.c:640:39: error: cannot convert ‘lwp_info’ to ‘const lwp_info*’ in initialization 640 | for (const lwp_info *lp : all_lwps ()) | ^ ... which is a fallout of e92df1d0eb6c ("gdb: make lwp_info_iterator yield references"). Change-Id: I3cfb9eb597bea6c6921219bbf28937784fd8ac55 --- diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c index 249b8d0fd4a..678c53bced1 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -636,9 +636,9 @@ mips_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) static int write_watchpoint_regs (void) { - for (const lwp_info *lp : all_lwps ()) + for (const lwp_info &lp : all_lwps ()) { - int 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")); }