From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127455 invoked by alias); 26 Mar 2015 03:49:22 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 127446 invoked by uid 89); 26 Mar 2015 03:49:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout27.012.net.il Received: from mtaout27.012.net.il (HELO mtaout27.012.net.il) (80.179.55.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Mar 2015 03:49:20 +0000 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NLS00B00VMDC200@mtaout27.012.net.il> for gdb@sourceware.org; Thu, 26 Mar 2015 05:44:02 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NLS006Z0VPES830@mtaout27.012.net.il>; Thu, 26 Mar 2015 05:44:02 +0200 (IST) Date: Thu, 26 Mar 2015 03:49:00 -0000 From: Eli Zaretskii Subject: Re: How to add a new command? In-reply-to: To: Fei Ding Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83bnjgo1u1.fsf@gnu.org> References: X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00098.txt.bz2 > Date: Thu, 26 Mar 2015 10:59:24 +0800 > From: Fei Ding > > 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. GDB has many places where it initializes commands. Look at any function named _initialize_SOMETHING in the sources, that's where commands and options are defined.