This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/7.8] user breakpoint not inserted if software-single-step at same location
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 3 Jun 2014 09:23:11 -0700
- Subject: Re: [RFA/7.8] user breakpoint not inserted if software-single-step at same location
- Authentication-results: sourceware.org; auth=none
- References: <5387BFF0 dot 6010208 at redhat dot com> <20140530122253 dot GC4289 at adacore dot com> <53887ED5 dot 5050603 at redhat dot com> <20140530132659 dot GD4289 at adacore dot com> <20140530193549 dot GF4289 at adacore dot com> <538D05CC dot 8050608 at redhat dot com> <538D85A9 dot 5010004 at redhat dot com> <538DC98E dot 9050004 at redhat dot com> <20140603133539 dot GM4289 at adacore dot com> <538DEC86 dot 3050007 at redhat dot com>
> Yep, it's a valid assumption. Only one of those can be the one that
> is actually inserted in the target. All others breakpoints are considered
> duplicates, with bl->duplicate == 1 and bl->inserted == 0, and never reach
> the target. The duplicate location logic in the tail of update_global_location_list
> takes care of it:
>
> /* This and the above ensure the invariant that the first location
> is not duplicated, and is the inserted one.
> All following are marked as duplicated, and are not inserted. */
> if (loc->inserted)
> swap_insertion (loc, *loc_first_p);
> loc->duplicate = 1;
>
> The one that is inserted will hold a merge of all the agent
> expressions (in target_info.conditions and target_info.tcommands) of
> the target-side conditions and commands of all breakpoints at that
> address. Those are computed just before that single breakpoint
> is inserted (build_target_condition_list, build_target_command_list).
Indeed! Thanks for explaining it.
I don't have any other comment on the patch. I ran it through our
testsuite on ppc-aix, JIC, and as expected, found that it fixed
the regression without introducing new ones. I think you can push
that version!
Thanks for your help, Pedro.
--
Joel