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/7143] Watchpoint does not trigger when first set


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

Joel Brobecker <brobecker at gnat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |brobecker at gnat dot com
         Resolution|FIXED                       |---

--- Comment #12 from Joel Brobecker <brobecker at gnat dot com> ---
Hey Pedro,

Sorry it took me so long to act on it, but this patch causes a regression on
ppc-aix.

New behavior is:

    (gdb) b func.adb:12
    Breakpoint 1 at 0x10000a24: file func.adb, line 12.
    (gdb) b func.adb:13
    Breakpoint 2 at 0x10000a28: file func.adb, line 13.
    (gdb) run
    Starting program: /[...]/func

    Breakpoint 1, func () at func.adb:12
    12        Nested;   -- break #1
    (gdb) c
    Continuing.
    [Inferior 1 (process 4128872) exited with code 02]

The expected behavior is for GDB to stop at line 13 (which happens to be
line 14):

    (gdb) c
    Breakpoint 2, func () at func.adb:14
    14      end;


This is just a heads-up; now that the GDB 7.8 branch is around the corner, I
can't continue pushing this back anymore, so I will try my best to finish my
investigation. According to my notes, this may be related to
software-single-stepping, but I haven't looked closely enough yet.

The "debug infrun" traces during the continue are...

Before:

    infrun: stop_pc = 0x100009ac
    infrun: software single step trap for process 13500574
    infrun: no stepping, continue
    infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current
thread [process 13500574] at 0x100009ac
    infrun: prepare_to_wait
    infrun: target_wait (-1, status) =
    infrun:   13500574 [process 13500574],
    infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
    infrun: infwait_normal_state
    infrun: TARGET_WAITKIND_STOPPED
    infrun: stop_pc = 0x10000a28
    infrun: BPSTAT_WHAT_STOP_NOISY
    infrun: stop_stepping

After:

    infrun: clear_proceed_status_thread (process 4128872)
    infrun: proceed (addr=0xffffffff, signal=GDB_SIGNAL_DEFAULT, step=0)
    infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=1, current
thread [process 4128872] at 0x10000a24
    infrun: wait_for_inferior ()
    infrun: target_wait (-1, status) =
    infrun:   4128872 [process 4128872],
    infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
    infrun: infwait_normal_state
    infrun: TARGET_WAITKIND_STOPPED
    infrun: stop_pc = 0x100009ac
    infrun: no stepping, continue
    infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current
thread [process 4128872] at 0x100009ac
    infrun: prepare_to_wait
    infrun: target_wait (-1, status) =
    infrun:   4128872 [process 4128872],
    infrun:   status->kind = exited, status = 2
    infrun: infwait_normal_state
    infrun: TARGET_WAITKIND_EXITED
    [Inferior 1 (process 4128872) exited with code 02]
    infrun: stop_stepping

I will investigate further and try to suggest a fix.

-- 
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]