Click here to Skip to main content
15,923,909 members
Home / Discussions / Work Issues
   

Work Issues

 
GeneralRe: Where can I find MCAD info? Pin
V.10-Aug-04 23:02
professionalV.10-Aug-04 23:02 
GeneralC/C++ Certification Pin
M Ashok Kumar4-Aug-04 21:35
M Ashok Kumar4-Aug-04 21:35 
GeneralRe: C/C++ Certification Pin
RB@Emphasys12-Aug-04 10:15
RB@Emphasys12-Aug-04 10:15 
Generalgetcontext implementation Pin
kokabgujjar19-Jul-04 23:14
kokabgujjar19-Jul-04 23:14 
GeneralRe: getcontext implementation Pin
RB@Emphasys10-Aug-04 9:36
RB@Emphasys10-Aug-04 9:36 
GeneralRe: getcontext implementation Pin
kokabgujjar11-Aug-04 21:14
kokabgujjar11-Aug-04 21:14 
GeneralRe: getcontext implementation Pin
RB@Emphasys16-Aug-04 2:54
RB@Emphasys16-Aug-04 2:54 
QuestionHow we print registers Pin
kokabgujjar19-Jul-04 23:09
kokabgujjar19-Jul-04 23:09 
I am trying to access registers using C in linux
I am using Linux ver 2.4.7-10.

the code is as following
#include <ucontext.h><br />
#include<stdio.h><br />
<br />
#define REG mn.uc_mcontext.gregs<br />
char *reg[]={"GS", "FS", "ES", "DS","EDI", "ESI", "EBP", "ESP", "EBX", "EDX", "ECX","EAX", "TRAPNO", "ERR", "EIP", "CS", "EFL", "UES<br />
P", "SS"};<br />
<br />
int abc(void);<br />
<br />
main()<br />
{<br />
ucontext_t mn;<br />
int i;<br />
i = abc();<br />
        getcontext(&mn);<br />
<br />
printf("INT size = %d\n", sizeof(int));<br />
for(i=0;i<19;i++)<br />
        printf("%s = 0X%X\n", reg[i], REG[REG_GS]);<br />
<br />
printf("Address of main is =%X\n", main);<br />
<br />
}<br />
int abc(void)<br />
{<br />
<br />
return 1;<br />
}


the results are
GS = 0X400361E4<br />
FS = 0X0<br />
ES = 0X3<br />
DS = 0XBFFFF970<br />
EDI = 0XBFFFFAA4<br />
ESI = 0X400168E4<br />
EBP = 0XBFFFFA38<br />
ESP = 0XBFFFF8B0<br />
EBX = 0X40169154<br />
EDX = 0XBFFFFAAC<br />
ECX = 0X0<br />
EAX = 0X0<br />
TRAPNO = 0X4003E514<br />
ERR = 0X400361E4<br />
EIP = 0X80484D5<br />
CS = 0X3<br />
EFL = 0X40032268<br />
UESP = 0X1<br />
SS = 0X8048180


how i can verify is it corret result?

KOKAB WAQAS
GeneralReading Data from one Jar from another jar file Pin
Nalamati8-Jul-04 22:15
Nalamati8-Jul-04 22:15 
GeneralRe: Reading Data from one Jar from another jar file Pin
RB@Emphasys10-Aug-04 9:39
RB@Emphasys10-Aug-04 9:39 
GeneralWorking with Rexec Pin
sivart14448-Jul-04 13:03
susssivart14448-Jul-04 13:03 
GeneralRe: Working with Rexec Pin
RB@Emphasys10-Aug-04 9:41
RB@Emphasys10-Aug-04 9:41 
GeneralMCAD/MCSD Pin
tanstaafl282-Jul-04 11:56
tanstaafl282-Jul-04 11:56 
GeneralRe: MCAD/MCSD Pin
Steve Maier2-Jul-04 12:22
professionalSteve Maier2-Jul-04 12:22 
GeneralRe: MCAD/MCSD Pin
RB@Emphasys30-Jul-04 8:01
RB@Emphasys30-Jul-04 8:01 
GeneralRe: MCAD/MCSD Pin
Steve Maier30-Jul-04 16:52
professionalSteve Maier30-Jul-04 16:52 
GeneralRe: MCAD/MCSD Pin
RB@Emphasys2-Aug-04 4:57
RB@Emphasys2-Aug-04 4:57 
GeneralRe: MCAD/MCSD Pin
Steve Maier2-Aug-04 6:31
professionalSteve Maier2-Aug-04 6:31 
GeneralRe: MCAD/MCSD Pin
exhaulted2-Aug-04 22:22
exhaulted2-Aug-04 22:22 
GeneralRe: MCAD/MCSD Pin
Steve Maier3-Aug-04 4:28
professionalSteve Maier3-Aug-04 4:28 
GeneralRe: MCAD/MCSD Pin
exhaulted3-Aug-04 5:08
exhaulted3-Aug-04 5:08 
GeneralVC++ 6.0 developer neaded Pin
Irek Zielinski18-Jun-04 8:55
Irek Zielinski18-Jun-04 8:55 
GeneralRe: VC++ 6.0 developer neaded Pin
Mahendran RajaGopal23-Jul-04 0:24
Mahendran RajaGopal23-Jul-04 0:24 
GeneralRe: VC++ 6.0 developer neaded Pin
Mahendran RajaGopal23-Jul-04 0:25
Mahendran RajaGopal23-Jul-04 0:25 
GeneralOutlook question Pin
Tartampion18-Jun-04 3:06
Tartampion18-Jun-04 3:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.