From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20291 invoked by alias); 3 Jun 2009 20:45:32 -0000 Received: (qmail 20264 invoked by uid 22791); 3 Jun 2009 20:45:29 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Jun 2009 20:45:22 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 498D813566 for ; Wed, 3 Jun 2009 13:45:20 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost2.vmware.com (Postfix) with ESMTP id 2FCCD8E787 for ; Wed, 3 Jun 2009 13:45:20 -0700 (PDT) Message-ID: <4A26E026.2000705@vmware.com> Date: Wed, 03 Jun 2009 20:45:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [patch] Error reporting during insert_breakpoints Content-Type: multipart/mixed; boundary="------------020501040801010405000203" X-IsSubscribed: yes 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: 2009-06/txt/msg00050.txt.bz2 This is a multi-part message in MIME format. --------------020501040801010405000203 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 354 Two small changes 1) If insert_breakpoints fails during stepping, "keep_going()" contains a TRY_CATCH block, but does not print the exception error. If the same thing happens during continue, "catch_errors" reports it. 2) insert_bp_locations() generates error text that assumes memory breakpoints. Confusing if remote_insert_breakpoints is using Z0. --------------020501040801010405000203 Content-Type: text/plain; name="breaks.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="breaks.txt" Content-length: 1477 2009-06-03 Michael Snyder * infrun.c (keep_going): If insert_breakpoints fails, print the reason. * breakpoint.c (insert_bp_location): Don't assume memory breakpoints when printing error message. Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.384 diff -u -p -r1.384 infrun.c --- infrun.c 3 Jun 2009 18:50:36 -0000 1.384 +++ infrun.c 3 Jun 2009 20:33:40 -0000 @@ -4247,6 +4247,7 @@ keep_going (struct execution_control_sta } if (e.reason < 0) { + exception_print (gdb_stderr, e); stop_stepping (ecs); return; } Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.401 diff -u -p -r1.401 breakpoint.c --- breakpoint.c 3 Jun 2009 18:16:43 -0000 1.401 +++ breakpoint.c 3 Jun 2009 20:33:40 -0000 @@ -1223,10 +1223,10 @@ Note: automatically using hardware break else { fprintf_unfiltered (tmp_error_stream, - "Cannot insert breakpoint %d.\n", + "Cannot insert breakpoint %d", bpt->owner->number); fprintf_filtered (tmp_error_stream, - "Error accessing memory address "); + " at memory address "); fputs_filtered (paddress (bpt->address), tmp_error_stream); fprintf_filtered (tmp_error_stream, ": %s.\n", safe_strerror (val)); --------------020501040801010405000203--