From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29345 invoked by alias); 1 Aug 2003 09:56:06 -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 29296 invoked from network); 1 Aug 2003 09:56:05 -0000 Received: from unknown (HELO hotmail.com) (65.54.245.112) by sources.redhat.com with SMTP; 1 Aug 2003 09:56:05 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 1 Aug 2003 02:56:04 -0700 Received: from 61.150.43.152 by by1fd.bay1.hotmail.msn.com with HTTP; Fri, 01 Aug 2003 09:56:04 GMT X-Originating-IP: [61.150.43.152] X-Originating-Email: [foolfox008@hotmail.com] From: "zhao mindong" To: gdb@sources.redhat.com Bcc: Subject: Is there something wrong when disassemble? Date: Fri, 01 Aug 2003 09:56:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 01 Aug 2003 09:56:04.0470 (UTC) FILETIME=[1F074960:01C35813] X-SW-Source: 2003-08/txt/msg00002.txt.bz2 void string_copy(char *str_from, char *str_to) { int i=0; // -------------------------------------------------------line 8 for(; (*(str_to+i)=*(str_from+i))!='\0'; i++) ; } main() { static char array_str1[20]="I am a teacher."; char array_str2[20]; string_copy(array_str1, array_str2); } (gdb) info line 8 Line 8 of "E:\BdxIDE\Bin\TestCase\main.c" starts at address 0x8100c038 . (gdb) info line *0x8100c044 Line 8 of "E:\BdxIDE\Bin\TestCase\main.c" starts at address 0x8100c042 and ends at 0x8100c046 . why it is so diffrent??? wrong? if i move" int i =0 " to next line then all is OK.how?? _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963