From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2144 invoked by alias); 28 Jan 2006 13:04:33 -0000 Received: (qmail 2135 invoked by uid 22791); 28 Jan 2006 13:04:32 -0000 X-Spam-Check-By: sourceware.org Received: from 213-146-165-140.kunde.vdserver.de (HELO bugaboo.mu) (213.146.165.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 28 Jan 2006 13:04:29 +0000 Received: from localhost (dslc-213-023-145-128.pools.arcor-ip.net [::ffff:213.23.145.128]) (AUTH: CRAM-MD5 markus@bluegap.ch) by bugaboo.mu with esmtp; Sat, 28 Jan 2006 14:04:24 +0100 id 002030FD.43DB6BD9.00005A71 Subject: minimalistic MI catch support From: Markus Schiltknecht To: gdb-patches@sourceware.org Date: Sat, 28 Jan 2006 13:04:00 -0000 Message-Id: <1138453464.15400.9.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_nambypamby-23153-1138453465-0001-2" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00460.txt.bz2 This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_nambypamby-23153-1138453465-0001-2 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-length: 565 Hello gdb hackers, working on an automated debugging layer on top of gdb I figured the catchpoint functions in the MI interface is missing. The attached patch against current CVS at least makes gdb report a catchpoint-break via MI. This is already sufficient for my application. However, I would appreciate a complete catchpoint implementation for the MI interface. I haven't figured out how to implement the '-break-catch' command. If somebody more knowledgable could do that I'd be thankfull. Please CC me in responses, as I'm not subscribed. Regards Markus --=_nambypamby-23153-1138453465-0001-2 Content-Type: text/x-patch; name="mi-catch.diff"; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=mi-catch.diff Content-length: 1893 Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.220 diff -u -r1.220 breakpoint.c --- breakpoint.c 16 Jan 2006 12:55:18 -0000 1.220 +++ breakpoint.c 28 Jan 2006 12:52:59 -0000 @@ -2167,17 +2167,41 @@ case bp_catch_fork: annotate_catchpoint (bs->breakpoint_at->number); - printf_filtered (_("\nCatchpoint %d (forked process %d), "), - bs->breakpoint_at->number, - bs->breakpoint_at->forked_inferior_pid); + if (ui_out_is_mi_like_p (uiout)) + { + ui_out_text (uiout, "\nBreakpoint "); + ui_out_field_string (uiout, "reason", "fork"); + ui_out_field_int (uiout, "bkptno", bs->breakpoint_at->number); + ui_out_field_int (uiout, "forked-process", + bs->breakpoint_at->forked_inferior_pid); + ui_out_text (uiout, ", "); + } + else + { + printf_filtered (_("\nCatchpoint %d (forked process %d), "), + bs->breakpoint_at->number, + bs->breakpoint_at->forked_inferior_pid); + } return PRINT_SRC_AND_LOC; break; case bp_catch_vfork: annotate_catchpoint (bs->breakpoint_at->number); - printf_filtered (_("\nCatchpoint %d (vforked process %d), "), - bs->breakpoint_at->number, - bs->breakpoint_at->forked_inferior_pid); + if (ui_out_is_mi_like_p (uiout)) + { + ui_out_text (uiout, "\nBreakpoint "); + ui_out_field_string (uiout, "reason", "vfork"); + ui_out_field_int (uiout, "bkptno", bs->breakpoint_at->number); + ui_out_field_int (uiout, "forked-process", + bs->breakpoint_at->forked_inferior_pid); + ui_out_text (uiout, ", "); + } + else + { + printf_filtered (_("\nCatchpoint %d (vforked process %d), "), + bs->breakpoint_at->number, + bs->breakpoint_at->forked_inferior_pid); + } return PRINT_SRC_AND_LOC; break; --=_nambypamby-23153-1138453465-0001-2--