bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb-5.0; bug in target.h disables hardware watchpoints


From: Andrew Cagney
Subject: Re: gdb-5.0; bug in target.h disables hardware watchpoints
Date: Fri, 19 Jan 2001 02:41:45 +1100

John Hughes wrote:

> so we realy have:
> 
>                   if (! (long long )(   len  ) <= 4  )
>                     return 0;
> 
> Spot the missing parens!

Thanks.  I've committed the attatched (and overcompensated in the
process :-)

        Andrew
Fri Jan 19 02:31:40 2001  Andrew Cagney  <address@hidden>

        * target.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
        * breakpoint.c (TARGET_REGION_OK_FOR_HW_WATCHPOINT): Wrap macro
        definition in parenthesis.

Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.22
diff -p -r1.22 breakpoint.c
*** breakpoint.c        2000/12/15 01:01:45     1.22
--- breakpoint.c        2001/01/18 15:35:38
*************** watch_command_1 (char *arg, int accessfl
*** 5409,5415 ****
  
  #if !defined(TARGET_REGION_OK_FOR_HW_WATCHPOINT)
  #define TARGET_REGION_OK_FOR_HW_WATCHPOINT(ADDR,LEN) \
!      TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(LEN)
  #endif
  
  static int
--- 5409,5415 ----
  
  #if !defined(TARGET_REGION_OK_FOR_HW_WATCHPOINT)
  #define TARGET_REGION_OK_FOR_HW_WATCHPOINT(ADDR,LEN) \
!      (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(LEN))
  #endif
  
  static int
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.9
diff -p -r1.9 target.h
*** target.h    2000/11/21 10:26:07     1.9
--- target.h    2001/01/18 15:35:45
*************** extern void (*target_new_objfile_hook) (
*** 1184,1190 ****
  
  #if !defined(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
  #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(byte_count) \
!      (LONGEST)(byte_count) <= REGISTER_SIZE
  #endif
  
  /* However, some addresses may not be profitable to use hardware to watch,
--- 1184,1190 ----
  
  #if !defined(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
  #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(byte_count) \
!      ((LONGEST)(byte_count) <= REGISTER_SIZE)
  #endif
  
  /* However, some addresses may not be profitable to use hardware to watch,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]