This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Is there something wrong when disassemble?
- From: "zhao mindong" <foolfox008 at hotmail dot com>
- To: gdb at sources dot redhat dot com
- Date: Fri, 01 Aug 2003 17:56:04 +0800
- Subject: Is there something wrong when disassemble?
- Bcc:
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 <string_cop
and ends at 0x8100c042 <string_copy+10>.
(gdb) info line *0x8100c044
Line 8 of "E:\BdxIDE\Bin\TestCase\main.c"
starts at address 0x8100c042 <string_copy+10>
and ends at 0x8100c046 <string_copy+14>.
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