Re: [PATCH 5/6] Test tracepoints are installed or not

Yao Qi
2012-12-07T13:55:50Z

On 12/07/2012 08:39 PM, Pedro Alves wrote:
> I don't understand this part. Why do we get two notifications? Different calls to the
> breakpoint_modified observers? This also relates to the "installed" field being present
> or not for pending breakpoints issue I pointed out in a previous patch. It'd be good to

When pending tracepoint is resolved, breakpoint_modified observer is
notified, and then, when tracepoint is downloaded, the
breakpoint_modified observer is notified again.

> see (and test perhaps) this field is output correctly in the case of a tracepoint with multiple
> locations.
>

Sure, but it is covered by other test cases, such as
gdb.trace/change-loc.exp.

>> > -re ".*${mi_gdb_prompt}$" {
>> > fail $test
>> >@@ -210,7 +224,7 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" {
>> > mi_send_resuming_command "exec-continue" "continuing to exit"
>> > set test "tracepoint on pendfunc2 becomes pending again"
>> > gdb_expect {
>> >- -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*addr=\"<PENDING>\",.*times=\"0\"" {
>> >+ -re ".*=breakpoint-modified,bkpt=\{number=\"1\",type=\"tracepoint\".*addr=\"<PENDING>\",.*times=\"0\".*installed=\"n\"" {
>> > pass "$test"
>> > }
> Also related. It very much feels to me that installed or not is a location property, not a
> breakpoint property. So if the breakpoint is pending, it doesn't have any location at all,
> and then it feels strange to me to include an "installed" attribute. WDYT?
>

Agreed. I'll remove it for pending tracepoint.

--
Yao (é½å°§)