From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21368 invoked by alias); 18 Dec 2002 15:23:44 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21356 invoked from network); 18 Dec 2002 15:23:42 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by 209.249.29.67 with SMTP; 18 Dec 2002 15:23:42 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id gBIFNUZ10382; Wed, 18 Dec 2002 09:23:30 -0600 Date: Wed, 18 Dec 2002 07:23:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200212181523.gBIFNUZ10382@duracef.shout.net> To: gdb@sources.redhat.com, i_am_triumph@ofir.dk Subject: Re: Debugging GDB and breaking? X-SW-Source: 2002-12/txt/msg00273.txt.bz2 Some general hints for debugging gdb: I start with "gdb /my/gdb/to/debug/bin/gdb". I like to use a stable gdb for the top gdb, such as the vendor-supplied gdb or gdb 5.3. Also this helps separate, in my mind, the top gdb from the inferior gdb. Then I immediately: (gdb) set prompt [top] [top] break help_command [top] set args /program/under/test The first line distinguishes the top gdb from the inferior gdb. The second line lets me get back to the top gdb from the inferior gdb. If the inferior gdb is waiting at a prompt, I just type "help foo" and take the breakpoint at help_command. The third line is the normal way to provide arguments to the inferior gdb. After that, in your specific case, you want to break at break_command and then use "next" and "step" from there. Hope this helps, Michael C