From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 883 invoked by alias); 7 Nov 2008 12:21:54 -0000 Received: (qmail 813 invoked by uid 22791); 7 Nov 2008 12:21:53 -0000 X-Spam-Check-By: sourceware.org Received: from mx1a.swcp.com (HELO mx1a.swcp.com) (216.184.2.64) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 07 Nov 2008 12:21:09 +0000 Received: from ame7.swcp.com (ame7.swcp.com [216.184.2.70]) by mx1a.swcp.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id mA7CL5hr002925; Fri, 7 Nov 2008 05:21:05 -0700 Received: from swcp.com (nousagi.swcp.com [216.184.2.107] (may be forged)) by ame7.swcp.com (8.14.2/8.13.6) with SMTP id mA7CL3Qx022352; Fri, 7 Nov 2008 05:21:03 -0700 (MST) (envelope-from ebo@sandien.com) Date: Fri, 07 Nov 2008 12:21:00 -0000 To: Subject: Re: gdb internal functionality From: "EBo" X-Mailer: TWIG 2.7.7 Message-ID: In-Reply-To: <21449.210.143.35.19.1226044120.squirrel@www.iap-online.com> References: <33036.210.143.35.19.1225860010.squirrel@www.iap-online.com>, <33036.210.143.35.19.1225860010.squirrel@www.iap-online.com> X-Client-IP: 216.184.15.167 Cc: Reply-To: ebo@sandien.com X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-3.0 (ame7.swcp.com [216.184.2.128]); Fri, 07 Nov 2008 05:21:03 -0700 (MST) X-Virus-Status: Clean 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: 2008-11/txt/msg00065.txt.bz2 I do not know if the following is helpful, but on of my colleagues just helped set me up with debugging a custom avr board with JTAG and gdb. Here are some of the relevant commands and info: to program and set up the connection: avarice --erase --program --file irrigation.elf --mkI \ --jtag /dev/ttyUSB0 --jtag-bitrate 250KHz :4242 to start gdb: avr-gdb --batch --quiet -x test.2.exec test_prog.elf The test.2.exec file looks like: target remote localhost:4242 break 17 comm 1 set adc_data=850 #printf "adc_data=%d,", adc_data continue end break 28 comm 2 printf "adc_data=%d\n", adc_data printf " PASSED!\n" quit end break 85 comm 3 printf "adc_data=%d\n", adc_data printf " FAILED!\n" quit end continue This sets a temp break point to set one of the variables, and the other two break points are set up to trap the correct and failed tests in a simple regression test. Hope that helps, but your millage may vary... EBo -- raja.saleru@iap-online.com said: > Hi, > > I would like to know more of GDB internals especially the control flow and > functionality for the following gdb commands. For ex. the development > environment include gdb on cygwin environment, which is connected to > OpenOCD, which inturn connects to ARM target. Any information on this > would be very helpful. > > 1. target remote host:port > 2. stepi > 3. contrinue > 4. break linenum > 5. delete bpnum > 6. watch expression > 7. set/read register value > 8. read/write memory > 9. quit > 10. monitor reset > > Thanks in Advance > Raja Saleru > --