This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[5.1] Re: [patch] Remove some HPUX warnings


> Warning removal on hppa2.0-hp-hpux10.20 (based on 0803 sources).
> gdb/hppah-nat.c: At top level:
> gdb/hppah-nat.c:620: conflicting types for `hppa_remove_hw_watchpoint'
> gdb/hppah-nat.c:626: conflicting types for `hppa_can_use_hw_watchpoint'

I'm not sure where the warning is comming from but I'll guess a lack of 
a forward declaration or some such.  Since we've now got pure ISO-C the 
old problem of having to use INT for ENUMS because of HP's 
@^%#*$%@^&#%^&@ compiler should have gone.

Can you try the attached which adds the missing declarations?

	Andrew

2001-09-26  Andrew Cagney  <ac131313@redhat.com>

	* config/pa/nm-hppah.h: Include "breakpoint.h"
	(hppa_remove_hw_watchpoint): Declare.
	(hppa_can_use_hw_watchpoint): Ditto.

Index: config/pa/nm-hppah.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/nm-hppah.h,v
retrieving revision 1.4
diff -p -r1.4 nm-hppah.h
*** nm-hppah.h	2001/05/04 04:15:32	1.4
--- nm-hppah.h	2001/09/27 03:19:08
***************
*** 19,24 ****
--- 19,26 ----
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
+ #include "breakpoint.h"
+ 
  #define U_REGS_OFFSET 0
  
  #define KERNEL_U_ADDR 0
*************** extern int hppa_require_detach (int, int
*** 137,142 ****
--- 139,146 ----
  
  /* The PA can watch any number of locations (generic routines already check
     that all intermediates are in watchable memory locations). */
+ extern int hppa_can_use_hw_watchpoint (enum bptype type, int cnt,
+ 				       enum bptype ot);
  #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
          hppa_can_use_hw_watchpoint(type, cnt, ot)
  
*************** extern void hppa_disable_page_protection
*** 221,226 ****
--- 225,232 ----
  #define target_insert_watchpoint(addr, len, type) \
          hppa_insert_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type)
  
+ extern int hppa_remove_hw_watchpoint (int pid, CORE_ADDR start, LONGEST len,
+ 				      enum bptype type);
  #define target_remove_watchpoint(addr, len, type) \
          hppa_remove_hw_watchpoint (PIDGET (inferior_ptid), addr, (LONGEST)(len), type)
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]