From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7662 invoked by alias); 27 May 2008 18:22:41 -0000 Received: (qmail 7650 invoked by uid 22791); 27 May 2008 18:22:40 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 May 2008 18:22:21 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K13oR-0002Jy-6c for gdb-patches@sources.redhat.com; Tue, 27 May 2008 18:22:19 +0000 Received: from mobius.qnx.com ([209.226.137.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 May 2008 18:22:19 +0000 Received: from aristovski by mobius.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 May 2008 18:22:19 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: [patch] catchpoints bring output in-line with breakpoints output Date: Tue, 27 May 2008 20:01:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050302000804050105000907" User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) 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: 2008-05/txt/msg00713.txt.bz2 This is a multi-part message in MIME format. --------------050302000804050105000907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 419 Hello, This patch brings catchpoint output in line with breakpoints output: CLI: 'Temporary catchpoint' when a catchpoint is temporary (vs. 'Catchpoint' when not). MI: Added fields: "reason", "disp", "bkptno" Thanks, Aleksandar Ristovski QNX Software Systems * breakpoint.c (print_exception_catchpoint): In CLI add 'Temporary' for temporary catchpoints. In MI add missing fields 'reason', 'disp', 'bkptno'. --------------050302000804050105000907 Content-Type: text/plain; name="catchpointsMI20080527.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="catchpointsMI20080527.diff" Content-length: 1587 Index: gdb/breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.321 diff -u -p -r1.321 breakpoint.c --- gdb/breakpoint.c 4 May 2008 19:38:59 -0000 1.321 +++ gdb/breakpoint.c 27 May 2008 18:00:37 -0000 @@ -6495,14 +6495,34 @@ catch_unload_command_1 (char *arg, int t static enum print_stop_action print_exception_catchpoint (struct breakpoint *b) { + int bp_temp; + char msg[160]; + const char * msgspec; + const char msgfmt[] = "\n%s %d (exception %s)\n"; + annotate_catchpoint (b->number); if (strstr (b->addr_string, "throw") != NULL) - printf_filtered (_("\nCatchpoint %d (exception thrown)\n"), - b->number); + msgspec = "thrown"; else - printf_filtered (_("\nCatchpoint %d (exception caught)\n"), - b->number); + msgspec = "caught"; + if (b->loc->address != b->loc->requested_address) + breakpoint_adjustment_warning (b->loc->requested_address, + b->loc->address, + b->number, 1); + bp_temp = b->loc->owner->disposition == disp_del; + sprintf (msg, msgfmt, + bp_temp ? "Temporary catchpoint" : "Catchpoint", + b->number, msgspec); + ui_out_text (uiout, msg); + if (ui_out_is_mi_like_p (uiout)) + { + ui_out_field_string (uiout, "reason", + async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT)); + ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition)); + } + ui_out_field_int (uiout, "bkptno", b->number); + ui_out_text (uiout, ", "); return PRINT_SRC_AND_LOC; } --------------050302000804050105000907--