From: "zhao mindong" <foolfox008@hotmail.com>
To: gdb@sources.redhat.com
Subject: Is there something wrong when disassemble?
Date: Fri, 01 Aug 2003 09:56:00 -0000 [thread overview]
Message-ID: <BAY1-F1127yBt6lDBRQ0001643a@hotmail.com> (raw)
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
reply other threads:[~2003-08-01 9:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY1-F1127yBt6lDBRQ0001643a@hotmail.com \
--to=foolfox008@hotmail.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).