After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 514502 - add support for "printf-action-on breakpoint"
add support for "printf-action-on breakpoint"
Status: RESOLVED WONTFIX
Product: nemiver
Classification: Other
Component: general
trunk
Other Linux
: Normal enhancement
: ---
Assigned To: Nemiver maintainers
Nemiver maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2008-02-05 11:02 UTC by Dodji Seketeli
Modified: 2020-03-10 11:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dodji Seketeli 2008-02-05 11:02:07 UTC
It would be nice to be able to define "print <expr>" style expressions to be executed whenever a given breakpoint is hit. That help in preventing people to go through the long edit/add printf/compile/relaunch cycle of debugging.
Comment 1 Dodji Seketeli 2008-05-05 08:24:26 UTC
Okay, so this task is well underway.

It's code is momentarily in a git repository at http://www.gnome.org/~dodji/nemiver.git, in branch "breakpoint-actions".

I have added support for BreakpointActions. 
A BreakpointAction is an action associated to a breakpoint. The BreakpointAction is then said to be registered to the breakpoint. 
When the breakpoint is hit, its associated BreakpointAction is executed.

A particular type of BreakpointAction is a PrintpointAction. The action performed by a PrintpointAction (aka printpoint) is to print an expression provided by the user at PrintpointAction registration time. That expression can be a variable name - in which case the action would be to print the value of that variable - or any expression that can be executed like "1+3", in which case the result would be "4".

When the breakpoint associated to the PrintpointAction is hit, the expression associated to the PrintpointAction is executed and the debugger will _continue_ the execution of the target program being debugged.

The printed result is logged in a dialog called "printpoing log dialog".

A very rough support of all this can be tested already in the branch "breakpoint-actions" of the git repository I linked to earlier. When the user selects a breakpoint from the breakpoints view, it can right click, choose "define a printpoint" and a dialog will appear, asking to enter the expression that will get printed when the breakpoint is it. From the main "debug" menu, the user can display the printpint log dialog to see the logs of printpoint being hit. Each log line contains the file:line:function-name (in the target source code) at which the printpoint action as been executed.

Now I still have to add features like:

+ list all the breakpoint actions associated to a given breakpoint.
+ edit the breakpoint actions
+ breakpoints associated to actions should have markers of a different colors from breakpoints not associated with action,maybe.
Comment 2 André Klapper 2020-03-10 11:55:57 UTC
Closing all open Nemiver tasks as this project does not seem to be maintained anymore. Please see https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/235#note_732192 for further information. Thanks!