From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10234 invoked by alias); 25 Jul 2006 16:54:48 -0000 Received: (qmail 10222 invoked by uid 22791); 25 Jul 2006 16:54:47 -0000 X-Spam-Check-By: sourceware.org Received: from shadow.prohost.de (HELO shadow.prohost.de) (216.71.84.228) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Jul 2006 16:54:44 +0000 Received: from boulder (p54A7E396.dip.t-dialin.net [84.167.227.150]) by shadow.prohost.de (8.11.6/8.11.6) with ESMTP id k6PGsCO07212; Tue, 25 Jul 2006 18:54:12 +0200 Received: from localhost (localhost [127.0.0.1]) by boulder (Postfix) with ESMTP id 009DF62E; Tue, 25 Jul 2006 18:54:10 +0200 (CEST) Received: from boulder ([127.0.0.1]) by localhost (boulder.lipieda [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 72716-08; Tue, 25 Jul 2006 18:54:09 +0200 (CEST) Received: from [192.168.129.218] (LI50.lipieda [192.168.129.218]) by boulder (Postfix) with ESMTP id B727262D; Tue, 25 Jul 2006 18:54:09 +0200 (CEST) Message-ID: <44C64CB1.1000805@lipowsky.de> Date: Tue, 25 Jul 2006 17:48:00 -0000 From: Efim Monyak User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb@sources.redhat.com Subject: Re: restart for remote target References: <44C63BD6.7090505@lipowsky.de> <20060725154543.GA13313@nevyn.them.org> <44C644A7.4000106@lipowsky.de> <20060725162649.GA14797@nevyn.them.org> In-Reply-To: <20060725162649.GA14797@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00184.txt.bz2 Daniel Jacobowitz schrieb: > On Tue, Jul 25, 2006 at 06:19:51PM +0200, Efim Monyak wrote: > >> I delete all breakpoints before load the applications again because my >> Hardware supports only two >> breakpoints. In other case I receive error from GDB. The load is >> multistep. In one of steps I must set >> an breakpoint to particular address and only one way I found to put it >> away is command delete all breakpoints. >> As I see no command deletes breakpoint on address. Use breakpoint to >> source line is not very good on this place. >> > > "delete *0x3000000" should work. > > Also, it sounds like you want "disable", not "delete". > > >> It is not possible for stub restart the application. They are often >> problem if a remote target is used. >> As I wrote set PC to start address works not properly if i.e. interrupts >> are enabled. >> If application runs from RAM it is lost after Hardware reset. >> >> The only handy way I see is to reload application set all used >> breakpoints and start it again. >> > > In many cases the stub can handle all of this automatically, > manually disabling interrupts et cetera. > > debug session breaks because error. hier is my user-defined command: set $myvar = 0 define run if $myvar printf "\n 000000000000000000000000000 \n" disable printf "\n 44444444444444444444444444444 \n" k set remotebaud 300 target remote /dev/ttyS3 load reset.elf symbol-file reset.elf # set breakpoint to reset vector b * 0 printf "\n 555555555555555555555555555555 \n" # start program c delete * 0 printf "\n 666666666666666666666666666666 \n" # kill program k printf "\n 222222222222222222222222222 \n" set remotebaud 300 target remote /dev/ttyS3 load init.elf symbol-file init.elf # set breakpoint to end of program b end_init # start program c # delete all breakpoints (werden nicht mehr benutzt) clear end_init #kill program k printf "\n 33333333333333333333333333333 \n" set remotebaud 300 target remote /dev/ttyS3 load sample.elf symbol-file sample.elf set $myvar = 1 enable continue else set $myvar = 1 printf "\n 111111111111111111111111111 \n" continue end and hier GDB messages: 156-exec-run (gdb) 156^running (gdb) ~"\n 000000000000000000000000000 \n" ~"\n 44444444444444444444444444444 \n" 156+download,{section="startup",section-size="32",total-size ="19040"} 156+download,{section="startup1",section-size="264",total-si ze="19040"} 156+download,{section="prog",section-size="100",total-size=" 19040"} &"Error in re-setting breakpoint 3:\n" &"No line 120 in file \"../src/main.c\".\n" ~"\n 555555555555555555555555555555 \n" &"warning: bad breakpoint number at or near '* 0'\n" &"warning: bad breakpoint number at or near '0'\n" ~"\n 666666666666666666666666666666 \n" ~"\n 222222222222222222222222222 \n" 156+download,{section="startup",section-size="32",total-size ="25297"} 156+download,{section="prog",section-size="4900",total-size= "25297"} 156+download,{section="prog",section-sent="4051",section-siz e="4900",total-sent=\ "4083",total-size="25297"} ~"\n 33333333333333333333333333333 \n" 156+download,{section="startup",section-size="516",total-siz e="1132725"} 156+download,{section="text",section-size="1916",total-size= "1132725"} 156+download,{section=".data",section-size="2",total-size="1 132725"} &"Warning:\n" &"Cannot insert breakpoint 6.\n" &"Error accessing memory address 0x0: Unknown error 42949672 95.\n" &"\n" 156^error,msg="Warning:\nCannot insert breakpoint 6.\nError accessing memory add\ ress 0x0: Unknown error 4294967295.\n" -- Mit freundlichen Gruessen Efim Monjak Lipowsky Industrie-Elektronik GmbH 64291 Darmstadt, Roemerstr. 57 Telefon: +49-(0)6151-93591-0 Telefax: +49-(0)6151-93591-28 Email: ymonyak@lipowsky.de Homepage: http://www.lipowsky.de DIN EN ISO 9001:2000 certified by DQS