bug-gdb
[Top][All Lists]
Advanced

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

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


From: John Hughes
Subject: gdb-5.0; bug in target.h disables hardware watchpoints
Date: Fri, 27 Oct 2000 13:15:20 +0200

GNU gdb 5.0
...
This GDB was configured as "i586-sco-sysv5uw7.1.1".

In breakpoint.c we see:


                  if (!TARGET_REGION_OK_FOR_HW_WATCHPOINT (vaddr, len))
                    return 0;

But TARGET_REGION_OK_FOR_HW_WATCHPOINT is defined by:

#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

And in target.h we have:

#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

so we realy have:

                  if (! (long long )(   len  ) <= 4  )
                    return 0;

Spot the missing parens!

-- 
John Hughes <address@hidden>, 
        CalvaEDI SA.                            Tel: +33-1-4313-3131
        66 rue du Moulin de la Pointe,          Fax: +33-1-4313-3139
        75013 PARIS.

Attachment: target-patch.txt
Description: Text document


reply via email to

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