home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gdb.bug
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!traffic.den.mmc.com!kevin
- From: kevin@traffic.den.mmc.com (Kevin Rodgers)
- Subject: Re: Execution trace feature for gdb
- Message-ID: <1992Jul29.185752.23476@den.mmc.com>
- Sender: gnulists@ai.mit.edu
- Organization: Martin Marietta Western Internal Systems, Technical Operations
- References: <9207201607.AA02430@bugs.airs.com>
- Distribution: gnu
- Date: Wed, 29 Jul 1992 18:57:52 GMT
- Approved: bug-gdb@prep.ai.mit.edu
- Lines: 43
-
- In article <1992Jul28.114950.3647@ips.cs.tu-bs.de> neitzel@ips.CS.tu-bs.DE (Martin Neitzel) writes:
- >I just asked the same question about the "trace facility in the dbx
- >sense" three months ago and digged into the gdb source.
- >
- >I found out that this functionality would require more than, say, a
- >twenty line patch. The framework for integrating "trace points" as
- >another variant of break and watchpoints points is there. The new
- >"trace" commands set would nicely fit into it (arguments/syntax just
- >like "break" commands with lots of code reuse possible). I'd estimate
- >that modifications would mainly concern about three modules.
-
- I'd like to add that the gdb command language itself could provide the
- framework for integrating tracepoints, since:
-
- (1) breakpoints can be specified by function name,
- (2) arbitrary gdb commands can be associated with any breakpoint with
- the 'commands' command, and
- (3) there is a mechanism for defining new commands ('define').
-
- If 'define' could take an argument, e.g. a function name, then 'trace'
- could be implemented something like:
-
- define trace (function)
- break $function
- commands
- silent
- echo >
- info frame
- finish
- echo <
- info frame
- end
- end
-
- If 'define' is enhanced to accept arguments, it might be worthwhile to
- allow optional arguments, so that for instance 'trace' could take an
- optional 'if COND' clause that could be passed to 'break'.
- --
- Kevin Rodgers kevin@traffic.den.mmc.com
- Martin Marietta MS A16401 (303) 790-3971
- 116 Inverness Dr. East
- Englewood CO 80112 USA GO BUFFS!
-
-