This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 2/2] Only leave dprintf inserted if it is marked as persistent (PR breakpoints/17012)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]