Date: Mon, 01 Aug 2016 00:38:10 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 211305] devel/gdb: (CORE_ADDR) 0 missing * in cast in tui/tui-stack.c Message-ID: <bug-211305-13-FJETZfDNqi@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-211305-13@https.bugs.freebsd.org/bugzilla/> References: <bug-211305-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211305 --- Comment #7 from Mark Millard <markmi@dsl-only.net> --- (In reply to Mark Millard from comment #5) The following looks to be deliberate in the code: ./nat/x86-dregs.c:209:7: warning: variable 'i' is incremented both in the l= oop header and in the loop body [-Wfor-loop-analysis] i++; ^ ./nat/x86-dregs.c:199:32: note: incremented here ALL_DEBUG_ADDRESS_REGISTERS (i) ^ >From gdb-7.11.1/gdb/nat/x86-dregs.h : /* A macro to loop over all debug address registers. */ #define ALL_DEBUG_ADDRESS_REGISTERS(i) \ for (i =3D DR_FIRSTADDR; i <=3D DR_LASTADDR; i++) >From gdb-7.11.1/gdb/nat/x86-dregs.c : ALL_DEBUG_ADDRESS_REGISTERS (i) { debug_printf ("\ \tDR%d: addr=3D0x%s, ref.count=3D%d DR%d: addr=3D0x%s, ref.count=3D%d\n", i, phex (state->dr_mirror[i], x86_get_debug_register_length ()), state->dr_ref_count[i], i + 1, phex (state->dr_mirror[i + 1], x86_get_debug_register_length ()), state->dr_ref_count[i + 1]); i++; } So an overall effect of i+=3D2 for the incrementing makes sense. It is just= not expressed very directly when ALL_DEBUG_ADDRESS_REGISTERS is used. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211305-13-FJETZfDNqi>