From: Tom Tromey Date: Fri, 3 Sep 2021 16:29:58 +0000 (-0600) Subject: Use CORE_ADDR as return type from x86_dr_low_get_addr X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a2813c00be99356b30e568d87a4adaf651de1d8;p=binutils-gdb.git Use CORE_ADDR as return type from x86_dr_low_get_addr On a Windows build locally, watchpoints started failing. I tracked this down to x86_dr_low_get_addr returning an 'unsigned long'... in this particular build, this is a 32-bit type, but the inferior is a 64-bit program. This patch fixes the problem by changing the return type. No other change is required, because this matches the function pointer in struct x86_dr_low_type. --- diff --git a/gdb/nat/x86-dregs.c b/gdb/nat/x86-dregs.c index cf8e517eb0d..24751647005 100644 --- a/gdb/nat/x86-dregs.c +++ b/gdb/nat/x86-dregs.c @@ -52,7 +52,7 @@ x86_dr_low_set_addr (struct x86_debug_reg_state *new_state, int i) /* Return the inferior's debug register REGNUM. */ -static unsigned long +static CORE_ADDR x86_dr_low_get_addr (int i) { return x86_dr_low.get_addr (i);