* Is there something wrong when disassemble?
@ 2003-08-01 9:56 zhao mindong
0 siblings, 0 replies; only message in thread
From: zhao mindong @ 2003-08-01 9:56 UTC (permalink / raw)
To: gdb
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-08-01 9:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-01 9:56 Is there something wrong when disassemble? zhao mindong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).