Re: How to add a new command?
Doug Evans <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CADPb22SC5ydMSvkG54j+C5QVJ7phWhEJ=S0ub-SwamL=yqi3mQ@mail.gmail.com> |
On Wed, Mar 25, 2015 at 7:59 PM, Fei Ding <[email protected]> wrote: > Hi all: > > I want to add a new command to GDB based on my team's requirement, > like `(gdb) auto-check [input file]` , but I found it a litter bit > difficult to find related source code. I guess GDB should initialize > all command at some place, and I plan to learn from it first. Any > body familiar with this? I just need some files' names of source code > ,maybe function names is even more useful. Another alternative is to write it in Python or Scheme: [assuming your gdb is configured with their support] https://sourceware.org/gdb/current/onlinedocs/gdb/Commands-In-Python.html#Commands-In-Python https://sourceware.org/gdb/current/onlinedocs/gdb/Commands-In-Guile.html#Commands-In-Guile