From 4aa7a7f553f9bc09fa503bf82d41038763319479 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 8 Oct 2004 17:30:48 +0000 Subject: 2004-10-08 Jeff Johnston * target.h (to_stopped_data_address): Change prototype to take a CORE_ADDR pointer and return an int. * target.c (update_current_target): Change to_stopped_data_address to match new prototype. (debug_to_stopped_data_address): Change appropriately. * breakpoint.c (bpstat_stop_status): Change call to target_stopped_data_address to use new prototype. * frv-tdep.c (frv_have_stopped_data_address): New function. (frv_stopped_data_address): Change to new prototype and functionality. * ia64-linux-nat.c (ia64_stopped_data_address): Change to new prototype and functionality. (ia64_stopped_by_watchpoint): New function. * i386-nat.c (i386_stopped_data_address): Change to new prototype and functionality. (i386_stopped_by_watchpoint): New function. * remote.c (remote_stopped_data_address): Change to new prototype and functionality. * remote-m32r-sdi.c (m32r_stopped_data_address): Ditto. * config/frv/tm-frv.h (frv_stopped_data_address): Change prototype. (STOPPED_BY_WATCHPOINT): Change to use frv_have_stopped_data_address. * config/i386/nm-i386.h (STOPPED_BY_WATCHPOINT): Change to use new i386_stopped_by_watchpoint function. (i386_stopped_by_watchpoint): New prototype. (i386_stoppped_data_address): Change to new prototype. * config/ia64/nm-linux.h (STOPPED_BY_WATCHPOINT): Change to use new ia64_stopped_by_watchpoint function. (ia64_stopped_by_watchpoint): New prototype. (ia64_stopped_data_address): Ditto. --- gdb/frv-tdep.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'gdb/frv-tdep.c') diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 7bc09f0208..30e1928a95 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1293,8 +1293,8 @@ frv_check_watch_resources (int type, int cnt, int ot) } -CORE_ADDR -frv_stopped_data_address (void) +int +frv_stopped_data_address (CORE_ADDR *addr_p) { CORE_ADDR brr, dbar0, dbar1, dbar2, dbar3; @@ -1305,15 +1305,24 @@ frv_stopped_data_address (void) dbar3 = read_register (dbar3_regnum); if (brr & (1<<11)) - return dbar0; + *addr_p = dbar0; else if (brr & (1<<10)) - return dbar1; + *addr_p = dbar1; else if (brr & (1<<9)) - return dbar2; + *addr_p = dbar2; else if (brr & (1<<8)) - return dbar3; + *addr_p = dbar3; else return 0; + + return 1; +} + +int +frv_have_stopped_data_address (void) +{ + CORE_ADDR addr = 0; + return frv_stopped_data_address (&addr); } static CORE_ADDR -- cgit v1.2.1