From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16856 invoked by alias); 25 Sep 2012 14:02:29 -0000 Received: (qmail 16754 invoked by uid 22791); 25 Sep 2012 14:02:27 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Sep 2012 14:02:01 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8PE213K028311 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Sep 2012 10:02:01 -0400 Received: from spoyarek (spoyarek.pnq.redhat.com [10.65.192.188]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8PE1xBC022334 for ; Tue, 25 Sep 2012 10:02:00 -0400 Date: Tue, 25 Sep 2012 14:02:00 -0000 From: Siddhesh Poyarekar To: gdb-patches@sourceware.org Subject: [PATCH] Expand size of LEN parameter for invalidate_bp_value_on_memory_change Message-ID: <20120925193119.2cd0dd75@spoyarek> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/EUDijZB9opLnBP1L5r_M8FW" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00552.txt.bz2 --MP_/EUDijZB9opLnBP1L5r_M8FW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 588 Hi, Attached patch expands the LEN parameter of invalidate_bp_value_on_memory_change to ssize_t to reflect the LEN that is actually sent by write_memory_with_notification. I have updated observer.texi accordingly so that the observer function signatures are correct (as well as the generated documentation). No regressions resulting from this change on x86_64. OK to commit? Regards, Siddhesh gdb/ChangeLog: * breakpoint.c (invalidate_bp_value_on_memory_change): Expand parameter LEN to ssize_t. doc/ChangeLog: observer.texi (memory_changed): Expand parameter LEN to ssize_t. --MP_/EUDijZB9opLnBP1L5r_M8FW Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=observer.patch Content-length: 1315 ? array-size.patch ? observer.patch Index: gdb/breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.705 diff -u -r1.705 breakpoint.c --- gdb/breakpoint.c 25 Sep 2012 12:48:52 -0000 1.705 +++ gdb/breakpoint.c 25 Sep 2012 14:01:00 -0000 @@ -14718,7 +14718,7 @@ GDB itself. */ static void -invalidate_bp_value_on_memory_change (CORE_ADDR addr, int len, +invalidate_bp_value_on_memory_change (CORE_ADDR addr, ssize_t len, const bfd_byte *data) { struct breakpoint *bp; Index: gdb/doc/observer.texi =================================================================== RCS file: /cvs/src/src/gdb/doc/observer.texi,v retrieving revision 1.40 diff -u -r1.40 observer.texi --- gdb/doc/observer.texi 21 Sep 2012 01:46:43 -0000 1.40 +++ gdb/doc/observer.texi 25 Sep 2012 14:01:00 -0000 @@ -230,7 +230,7 @@ This method is called immediately before freeing @var{inf}. @end deftypefun -@deftypefun void memory_changed (CORE_ADDR @var{addr}, int @var{len}, const bfd_byte *@var{data}) +@deftypefun void memory_changed (CORE_ADDR @var{addr}, ssize_t @var{len}, const bfd_byte *@var{data}) Bytes from @var{data} to @var{data} + @var{len} have been written to the current inferior at @var{addr}. @end deftypefun --MP_/EUDijZB9opLnBP1L5r_M8FW--