From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24656 invoked by alias); 27 Sep 2011 06:19:15 -0000 Received: (qmail 24643 invoked by uid 22791); 27 Sep 2011 06:19:14 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Sep 2011 06:19:00 +0000 Received: by fxh17 with SMTP id 17so7704026fxh.0 for ; Mon, 26 Sep 2011 23:18:59 -0700 (PDT) Received: by 10.223.76.67 with SMTP id b3mr12034614fak.61.1317104339103; Mon, 26 Sep 2011 23:18:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.123.2 with HTTP; Mon, 26 Sep 2011 23:18:19 -0700 (PDT) In-Reply-To: References: From: Hui Zhu Date: Tue, 27 Sep 2011 06:19:00 -0000 Message-ID: Subject: Re: command-list does not work in my gdb 7.2 port To: Triple Yang Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00123.txt.bz2 (gdb) b mainBreakpoint 1 at 0x40056c: file 1.c, line 3.(gdb) commands Type commands for breakpoint(s) 1, one per line.End with a line saying just "end".>shell echo 123>end(gdb) rStarting program: /home/teawater/gdb/a.out Breakpoint 1, main () at 1.c:33 {123 Please try the trunk. Best, Hui https://code.google.com/p/gdbt/ On Mon, Sep 26, 2011 at 22:58, Triple Yang wrote: > Hi, everyone. > > I am making a gdb 7.2 port recently for a prototype architecture, > which is a remote debug target in my case. The port is almost done to > achieve my purposes, say: > > 1. Connecting to remote target and loading program image work well. > 2. Control on the debugged program is OK. > 3. Inserting/deleting breakpoints OK. > 4. and so as some other basic facilities. > > But when I tried using gdb command "commands" to specify a command > list after I set a breakpoint, I found this did not work at all. Here > follows a rough example: > > (gdb) break main > (gdb) commands >>shell echo test-commands >>end > (gdb) run > > In this example, the command list is composed of only one command > "shell echo test-commands". "test-commands" is expected to be output > when the breakpoint is hit, but it does not happen. I tried replacing > "shell echo test-commands" with other similar commands, it still did > not work. but "shell echo" does work well when it is not used in a > command list defined by "commands". > > I am not able to find any clue for this situation. Still worse, I can > not provide sufficient information to gdb experts for analysis. > > I am hoping that someone who has ever met this problem before can help > me with his/her invaluable suggestions. > > Thank you and best regards. > > -- > Yang Yong-Yong >