From: clc5q AT cobra DOT cs DOT Virginia DOT EDU (Clark L. Coleman) Newsgroups: comp.os.msdos.djgpp Subject: Re: Inline Assembler/CWSDPR0 (Privileged instructions) Date: 18 Mar 1999 19:29:40 GMT Organization: University of Virginia Lines: 45 Message-ID: <7crk74$5jl$1@murdoch.acc.Virginia.EDU> References: <7copjd$mp6$1 AT murdoch DOT acc DOT Virginia DOT EDU> <36f02ea0 DOT sandmann AT clio DOT rice DOT edu> NNTP-Posting-Host: cobra.cs.virginia.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <36f02ea0 DOT sandmann AT clio DOT rice DOT edu>, Charles Sandmann wrote: >> I followed those instructions (turned off DPMI in my AUTOEXEC.BAT, >> rebooted, compiled/linked, did the stubedit). However, as I step >> through the code in the debugger (gdb), I see that as soon as I step >> over the WRMSR instruction, I get a SIGSEGV exception and cannot >> continue. I will show the code below. > >You aren't executing the ring 0 if you have the debugger loaded! It >loads the regular version, which must be used for the child. Run >the image standalone - and if it dies write down the registers. If the >low bits on the selectors are "3" you aren't running a ring 0 DPMI. >If they are 0 check the line number/EIP for the real error. You can't >really debug in ring 0. OK, I recompiled without -g and ran the EXE without gdb. Same story. Here is the register dump info: Exiting due to signal SIGSEGV Page fault at eip=00002585, error = 0002 eax=00000011 ebx=00000000 ecx=00000011 edx=00000000 esi=00000054 edi=0c040843 ebp=0108fc68 esp=0108fc68 cs: sel=00a4 base=10000000 limit=0109ffff ds: sel=00ac base=10000000 limit=0109ffff es: sel=00ac base=10000000 limit=0109ffff fs: sel=008c base=00030280 limit=0000ffff gs: sel=00bc base=00000000 limit=0010ffff ss: sel=00ac base=10000000 limit=0109ffff App stack: [0108fd18..0100fd18] Excepn stack: [0100fc00..0100dcc0] Call frame traceback EIPs: 0x00002585 0x00001833 0x000016a9 0x00003532 That's it. Someone asked for a "symify of the traceback" and I have no idea what that means. Any help is very much appreciated. Clark Coleman