Skip to content

Not implemented stop reason (assuming exception): watchpoint-trigger #277

Closed

Description

@GitMensch

Using GDB 10.1, stepping and printing values works in general.

When I add a watch like the following *(char(*)[8])(0x7fd9166daa8a) I can directly see its current value and also see the value when GDB halts. But it seems to be more of a monitor as it does not stop when the variable changes. This may also be the reason

When I use the debugging console to manually add it watch *(char(*)[8])(0x7fd9166daa8a) then the program does stop as expected and also shows the old and new variant (as expected); but there is a notification and error message, which is bad.

Please catch the event and gracefully stop + update the value in the watch pane (or add it to the watch if it isn't included already).

Activity

  1. GitMensch commented on Jul 19, 2021

    @GitMensch
    CollaboratorAuthor

    Obviously there are more watchpoint related triggers:

      "watchpoint-trigger",
      "read-watchpoint-trigger",
      "access-watchpoint-trigger",
      "watchpoint-scope",

    That should be added to the current list in the backend:

    const reason = parsed.record("reason");
    if (trace)
    this.log("stderr", "stop: " + reason);
    if (reason == "breakpoint-hit")
    this.emit("breakpoint", parsed);
    else if (reason == "end-stepping-range")
    this.emit("step-end", parsed);
    else if (reason == "function-finished")
    this.emit("step-out-end", parsed);
    else if (reason == "signal-received")
    this.emit("signal-stop", parsed);
    else if (reason == "exited-normally")
    this.emit("exited-normally", parsed);
    else if (reason == "exited") { // exit with error code != 0
    this.log("stderr", "Program exited with code " + parsed.record("exit-code"));
    this.emit("exited-normally", parsed);
    } else {
    this.log("console", "Not implemented stop reason (assuming exception): " + reason);
    this.emit("stopped", parsed);
    }

  2. added a commit that references this issue on Feb 6, 2024
    a4100ff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions