This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 2/2] Only leave dprintf inserted if it is marked as persistent (PR breakpoints/17012)
- From: Pedro Alves <palves at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>, Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Tue, 15 Jul 2014 22:03:51 +0100
- Subject: Re: [PATCH v2 2/2] Only leave dprintf inserted if it is marked as persistent (PR breakpoints/17012)
- Authentication-results: sourceware.org; auth=none
- References: <1404760664-17289-1-git-send-email-simon dot marchi at ericsson dot com> <1404760664-17289-2-git-send-email-simon dot marchi at ericsson dot com> <53C5642E dot 4010103 at redhat dot com>
On 07/15/2014 06:26 PM, Pedro Alves wrote:
> But ... most importantly. How do we end up with 'persist' set
> on a call-style dprintf, given:
>
> static void
> build_target_command_list (struct bp_location *bl)
> {
> ...
> /* For now, limit to agent-style dprintf breakpoints. */
> if (dprintf_style != dprintf_style_agent)
> return;
>
> I'm confused, as you say the test fails now, but nowhere in the
> test are you setting the style to agent. I think I'm missing
> something. :-)
>
Yeah, I was missing dinner... :-)
Of course, the point is that indeed, for dprintf style != agent,
'persist' is not set, and those are the locations we want to remove.
Silly me.
BTW, I think it'd be good to make the test exercise all
dprintf styles, as all types are affected, and also
"set disconnected-dprintf off/on", to make "agent" style
affected. With disconnected on, the agent style dprintf
will be persistent when testing against gdbserver
(extended-remote), but we should likewise be able to
detach and reattach back.
Something along the lines of:
foreach always_inserted { "off" "on" } {
foreach style { "gdb" "call" "agent" } {
foreach disconnected { "on" "off" } {
test $always_inserted $style $disconnected
}
}
}
--
Pedro Alves