From: Tom Tromey <tromey@redhat.com>
To: Stan Shebs <stanshebs@earthlink.net>
Cc: Yao Qi <yao@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] dynamic printf
Date: Wed, 16 May 2012 20:17:00 -0000 [thread overview]
Message-ID: <87ipfvop8i.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4FB12A8E.7040905@earthlink.net> (Stan Shebs's message of "Mon, 14 May 2012 08:53:50 -0700")
>>>>> "Stan" == Stan Shebs <stanshebs@earthlink.net> writes:
Sorry about the delay on this.
Stan> + /* Manufacture a printf/continue sequence. */
Stan> + if (printf_line)
Stan> + {
Stan> + struct command_line *printf_cmd_line, *cont_cmd_line = NULL;
Stan> +
Stan> + cont_cmd_line = xmalloc (sizeof (struct command_line));
Stan> + cont_cmd_line->control_type = simple_control;
Stan> + cont_cmd_line->body_count = 0;
Stan> + cont_cmd_line->body_list = NULL;
Stan> + cont_cmd_line->next = NULL;
Stan> + cont_cmd_line->line = xstrdup ("continue");
Stan> +
Stan> + printf_cmd_line = xmalloc (sizeof (struct command_line));
Stan> + printf_cmd_line->control_type = simple_control;
Stan> + printf_cmd_line->body_count = 0;
Stan> + printf_cmd_line->body_list = NULL;
Stan> + printf_cmd_line->next = cont_cmd_line;
Stan> + printf_cmd_line->line = printf_line;
Stan> +
Stan> + breakpoint_set_commands (b, printf_cmd_line);
I thought this approach would break "next"ing over a dprintf location.
Stan> +void dprintf_command (char *arg, int from_tty);
Stan> +
Stan> +/* The dynamic printf command is mostly like a regular breakpoint, but
Stan> + with a prewired command list consisting of a single output command,
Stan> + built from extra arguments supplied on the dprintf command
Stan> + line. */
Stan> +
Stan> +void
Stan> +dprintf_command (char *arg, int from_tty)
I think this could be static.
Tom
next prev parent reply other threads:[~2012-05-16 20:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 6:27 Stan Shebs
2012-05-08 7:50 ` Yao Qi
2012-05-14 15:54 ` Stan Shebs
2012-05-15 4:10 ` [commit] Fix spu-tdep.c build regression [Re: [PATCH v2] dynamic printf] Jan Kratochvil
2012-05-15 10:24 ` Jim Meyering
2012-05-15 13:10 ` [commit] testsuite: gdb.base/dprintf.exp PR 12649 race " Jan Kratochvil
2012-05-15 13:34 ` Joel Brobecker
2012-05-15 13:37 ` [commit#2] " Jan Kratochvil
2012-05-16 20:17 ` Tom Tromey [this message]
2012-05-16 20:46 ` [PATCH v2] dynamic printf Stan Shebs
2012-05-16 20:52 ` Pedro Alves
2012-05-16 22:25 ` Stan Shebs
2012-05-17 1:56 ` Tom Tromey
2012-05-18 15:38 ` Pedro Alves
2012-05-16 20:53 ` Pedro Alves
2012-05-16 21:06 ` Tom Tromey
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=87ipfvop8i.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=stanshebs@earthlink.net \
--cc=yao@codesourcery.com \
/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