From: Markus Schiltknecht <markus@bluegap.ch>
To: gdb-patches@sourceware.org
Subject: minimalistic MI catch support
Date: Sat, 28 Jan 2006 13:04:00 -0000 [thread overview]
Message-ID: <1138453464.15400.9.camel@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 565 bytes --]
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
[-- Attachment #2: mi-catch.diff --]
[-- Type: text/x-patch, Size: 1893 bytes --]
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;
next reply other threads:[~2006-01-28 13:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-28 13:04 Markus Schiltknecht [this message]
2006-02-06 23:29 ` Daniel Jacobowitz
2006-02-07 1:15 ` Bob Rossi
2006-02-07 3:00 ` Daniel Jacobowitz
2006-02-07 12:01 ` Markus Schiltknecht
2006-02-09 6:28 Nick Roberts
2006-02-10 6:34 ` Nick Roberts
2006-02-10 11:25 ` Eli Zaretskii
2006-02-10 14:11 ` Daniel Jacobowitz
2006-02-10 15:41 ` Eli Zaretskii
2006-02-10 16:48 ` Daniel Jacobowitz
2006-02-10 18:40 ` Eli Zaretskii
2006-02-10 18:52 ` Daniel Jacobowitz
2006-02-10 20:17 ` Nick Roberts
2006-02-10 20:20 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1138453464.15400.9.camel@localhost.localdomain \
--to=markus@bluegap.ch \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox