From 57ac95b8fc8d0d7de2809cdf56ea17777eba2942 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 19 Nov 2004 21:55:24 +0000 Subject: * bsd-kvm.c (bsd_kvm_pcb_cmd): Cast return value from parse_and_eval_address to u_long before converting it to a pointer type. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Change type of ps_strings from int to u_long. * i386obsd-nat.c (_initialize_i386obsd_nat): Cast _ps.val to u_long instead of CORE_ADDR. --- gdb/ChangeLog | 10 ++++++++++ gdb/bsd-kvm.c | 2 +- gdb/i386fbsd-nat.c | 2 +- gdb/i386obsd-nat.c | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 47a2481..904af44 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2004-11-19 Mark Kettenis + + * bsd-kvm.c (bsd_kvm_pcb_cmd): Cast return value from + parse_and_eval_address to u_long before converting it to a pointer + type. + * i386fbsd-nat.c (_initialize_i386fbsd_nat): Change type of + ps_strings from int to u_long. + * i386obsd-nat.c (_initialize_i386obsd_nat): Cast _ps.val to + u_long instead of CORE_ADDR. + 2004-11-18 Mark Kettenis * dbxread.c (process_one_symbol): Do not adjust address of first diff --git a/gdb/bsd-kvm.c b/gdb/bsd-kvm.c index 818a588..e561b24 100644 --- a/gdb/bsd-kvm.c +++ b/gdb/bsd-kvm.c @@ -259,7 +259,7 @@ bsd_kvm_pcb_cmd (char *arg, int fromtty) if (core_kd == NULL) error ("No kernel memory image."); - bsd_kvm_paddr = (struct pcb *) parse_and_eval_address (arg); + bsd_kvm_paddr = (struct pcb *)(u_long) parse_and_eval_address (arg); target_fetch_registers (-1); diff --git a/gdb/i386fbsd-nat.c b/gdb/i386fbsd-nat.c index bf4bd94..29a02f0 100644 --- a/gdb/i386fbsd-nat.c +++ b/gdb/i386fbsd-nat.c @@ -143,7 +143,7 @@ _initialize_i386fbsd_nat (void) #ifdef KERN_PS_STRINGS { int mib[2]; - int ps_strings; + u_long ps_strings; size_t len; mib[0] = CTL_KERN; diff --git a/gdb/i386obsd-nat.c b/gdb/i386obsd-nat.c index 68cc790..cb4bfcf 100644 --- a/gdb/i386obsd-nat.c +++ b/gdb/i386obsd-nat.c @@ -52,8 +52,8 @@ _initialize_i386obsd_nat (void) len = sizeof (_ps); if (sysctl (mib, 2, &_ps, &len, NULL, 0) == 0) { - i386obsd_sigtramp_start_addr = (CORE_ADDR)_ps.val - 128; - i386obsd_sigtramp_end_addr = (CORE_ADDR)_ps.val; + i386obsd_sigtramp_start_addr = (u_long) _ps.val - 128; + i386obsd_sigtramp_end_addr = (u_long) _ps.val; } } #endif -- cgit v1.1