From: Scott Sibley <sisibley@gmail.com>
To: linux-assembly@vger.kernel.org
Subject: Troubles with JIT compiler
Date: Thu, 21 Jan 2010 22:12:41 -0600 [thread overview]
Message-ID: <cb4d391b1001212012l654d2a93qe8d05187f8f5ecf0@mail.gmail.com> (raw)
I'm debugging a script engine. The engine compiles expressions into
asm instructions, assigns that data to a function pointer, and
executes the function, passing one argument.
I'm new to assembly, and pretty much stuck on the first issue I ran into.
Here are the function's instructions for a basic assignment operation:
0x8067990: push %ebp
0x8067991: mov %esp,%ebp
0x8067993: sub $0x8,%esp
0x8067999: fnstcw (%esp)
0x806799c: mov (%esp),%eax
0x806799f: or $0xc00,%eax
0x80679a4: mov %eax,0x4(%esp)
0x80679a8: fldcw 0x4(%esp)
0x80679ac: flds 0x806793c
0x80679b2: fsts 0x805f014
0x80679b8: fstps 0x8067954
0x80679be: fldcw (%esp)
0x80679c1: add $0x8,%esp
0x80679c7: emms
0x80679c9: leave
0x80679ca: ret
Well, it appears to be crashing at the first instruction. Here are the
values of ebp and esp.
(gdb) x/x $ebp
0xbffff168: 0xbffff188
(gdb) x/x $esp
0xbffff14c: 0x0804e481
Any clue why this would cause problems? Let me know if I need to
provide more info.
--
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2010-01-22 4:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-22 4:12 Scott Sibley [this message]
2010-01-22 5:26 ` Troubles with JIT compiler Robert Plantz
2010-01-22 6:04 ` Scott Sibley
2010-01-22 7:01 ` Robert Plantz
2010-01-22 7:16 ` Scott Sibley
2010-01-22 10:45 ` Scott Sibley
2010-01-22 16:50 ` Robert Plantz
2010-01-22 17:19 ` Brian Raiter
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=cb4d391b1001212012l654d2a93qe8d05187f8f5ecf0@mail.gmail.com \
--to=sisibley@gmail.com \
--cc=linux-assembly@vger.kernel.org \
/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).