This is the mail archive of the gdb-prs@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]

[Bug breakpoints/19548] breakpoint re-set inserts breakpoints when it shouldn't


https://sourceware.org/bugzilla/show_bug.cgi?id=19548

--- Comment #5 from Pedro Alves <palves at redhat dot com> ---
(Forgot to save this comment before...)

> For some reason, I can't seem to reproduce with 7.10, but I don't understand why.

The difference is that on 7.10, after resetting breakpoint 1, gdb ends up with
inferior_ptid pointing to null_ptid, because when re-setting the breakpoint,
decoding the linespec, gdb finds a sal for the pspace of the inferior that
isn't running, and switches to that pspace, which results in inferior_ptid set
to null_ptid.  So afterwards, the breakpoints_should_be_inserted_now call in
update_global_location_list returns false, and insert_breakpoint_locations is
not called.

In master, we don't look at pspaces other than the current so end up never
switching inferior_ptid to null_ptid.  And then update_global_location_list
calls insert_breakpoint_locations.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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