public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lethalman <lethalman@fyrebird.net>
To: linux-kernel@vger.kernel.org
Subject: Let me know EIP address
Date: Tue, 04 Jan 2005 16:18:02 +0100	[thread overview]
Message-ID: <41DAB3AA.4010207@fyrebird.net> (raw)

I'm trying to get the EIP value from a simple program in C but i don't 
how to do it. I need it to know the current address position on the code 
segment.

main() {
   long *eip;
   asm("mov %%eip,%0" : "=g"(eip));
   printf("%p\n", eip);
}

Unfortunately EIP is not that kind of register :P
Does anyone know how to get EIP?

-- 
www.iosn.it * Amministratore Italian Open Source Network
www.fyrebird.net * Fyrebird Hosting Provider - Technical Department

             reply	other threads:[~2005-01-04 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-04 15:18 Lethalman [this message]
2005-01-04 16:05 ` Let me know EIP address linux-os
2005-01-04 16:21   ` Paulo Marques
2005-01-04 16:10 ` Paolo Ornati
2005-01-04 17:50   ` Bernd Eckenfels

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=41DAB3AA.4010207@fyrebird.net \
    --to=lethalman@fyrebird.net \
    --cc=linux-kernel@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