public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Let me know EIP address
@ 2005-01-04 15:18 Lethalman
  2005-01-04 16:05 ` linux-os
  2005-01-04 16:10 ` Paolo Ornati
  0 siblings, 2 replies; 5+ messages in thread
From: Lethalman @ 2005-01-04 15:18 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-01-04 17:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-04 15:18 Let me know EIP address Lethalman
2005-01-04 16:05 ` linux-os
2005-01-04 16:21   ` Paulo Marques
2005-01-04 16:10 ` Paolo Ornati
2005-01-04 17:50   ` Bernd Eckenfels

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox