Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GitMensch opened this issue Jul 19, 2021 · 1 comment
Closed

Comments

@GitMensch
Copy link
Collaborator

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).

@GitMensch
Copy link
Collaborator Author

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);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant