Opened 9 years ago

Last modified 23 months ago

#2945 new feature request

add command :mergetrace

Reported by: phercek Owned by:
Priority: lowest Milestone:
Component: GHCi Version: 6.10.1
Keywords: debugger Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Currently trace history is stored in "Resume" context. I'm not aware of any good reason for this but it results in problems during debugging. The point is that one cannot extend currently active trace history using ":trace <varId>" while stopped at breakpoint. The nested trace history is extended instead. But the nested history is freed when the ":trace <varId>" command finishes so there is no access to the trace data. This makes it hard to investigate why the output of the trace command looks the way it was printed: it is not possible to investigate values of variables which contributed to the <varId> value.

A discussion about the reasons for global trace history is here:

http://www.haskell.org/pipermail/glasgow-haskell-users/2009-January/016436.html

Change History (16)

comment:1 Changed 9 years ago by phercek

By global, I meant the same place where top level bindings are (so the trace history would get removed when modules are reloaded).

May be the resume context should keep the mumber of hisotry records contributed from the current resume context, so that they can be purged when ":abandon" is issued. I do not have strong opinion about this since I almost never use ":abandon".

comment:2 Changed 9 years ago by phercek

Summary: trace history should not be context/resume specific but globaltrace history should be global or add command :mergetrace

Nobody responded on the mailing list but I realized that there may be a use case for trace history being context/resume specific. An user may suspect some fuction is buggy and may want to inspect its behavior with different input values while stopped at a breakpoint. This would polute the global history since some of the function inputs would be different from the ones used in the debugged instance. An alternative to the global history is to store off the trace history of the last nested resume context after it finished and provide a command :mergetrace which would merge the last finished trace to the current trace. This does not change anything in the current user interface (it just adds one more command) so it should be acceptable for everybody.

I do not mind which way it is finaly resolved. I just want access to the trace which just finished. From my point of view, whatever is easier to do is fine.

comment:3 Changed 9 years ago by igloo

difficulty: Unknown
Milestone: 6.12 branch

comment:4 Changed 9 years ago by phercek

Summary: trace history should be global or add command :mergetraceadd command :mergetrace

:mergetrace is better than a global trace history. Being able to investigate something separately in a nested context is useful.

comment:5 Changed 8 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:6 Changed 7 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:7 Changed 7 years ago by igloo

Milestone: 7.0.17.0.2

comment:8 Changed 7 years ago by igloo

Milestone: 7.0.27.2.1

comment:9 Changed 6 years ago by igloo

Milestone: 7.2.17.4.1

comment:10 Changed 6 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:11 Changed 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:12 Changed 3 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:13 Changed 3 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:14 Changed 3 years ago by thoughtpolice

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:15 Changed 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:16 Changed 23 months ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.