From owner-freebsd-hackers Wed Mar 20 13:48:42 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from hpdi.ath.cx (pc2-nthf5-0-cust237.not.cable.ntl.com [80.4.35.237]) by hub.freebsd.org (Postfix) with ESMTP id 06E9F37B400; Wed, 20 Mar 2002 13:48:32 -0800 (PST) Received: (from hitenp@hpdi.ath.cx) by hpdi.ath.cx (8.11.6/8.11.6) id g2KLjLF23054; Wed, 20 Mar 2002 21:45:21 GMT (envelope-from hitenp@hpdi.ath.cx) Date: Wed, 20 Mar 2002 21:45:21 +0000 From: Hiten Pandya To: jhb@FreeBSD.org Cc: hackers@FreeBSD.org Subject: Re: Debugging BTX Faults Message-ID: <20020320214521.A23027@hpdi.ath.cx> Reply-To: hiten@uk.FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD hpdi.ath.cx 5.0-CURRENT FreeBSD 5.0-CURRENT Organisation: The FreeBSD Project X-PGP-Key: http://www.pittgoth.com/~hiten/pubkey.asc Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 20-Mar-2002 Hiten Pandya wrote: > Hi all, > > How does one debug faults in the BTX Loader? I am currently trying > to work on PR i386/21559, and after reading jhb's document on the > loading process, I was curious to know.. > Well, you need to be fairly familiar with how IA32 works. The int=3D > number is the fault that was triggered. Then, use a program to convert= =20 > the hex dump at cs:eip to binary Which tool can be used for this task? Any available in the ports? > and run that through ndisasm or ndisasm -U depending on if the code=20 > segment in cs is USE32 or not) to see what instruction it died on.=20 > You then look up that instruction in teh reference manual and see how=20 > the given fault can be triggered. Some faults are rather obvious just=20 > from the fault number and don't require you to look up the instruction. = =20 > Sometimes it's not the actual instruction that's the problem, but instead= =20 > you managed to hose the stack or some such in which case you just ahve to= =20 > look at the register and stack dumps to try and figure out what went=20 > wrong. Thanks for the kind help. :) Regards, --=20 Hiten Pandya http://jfs4bsd.sf.net - JFS for FreeBSD (JFS4BSD) http://www.FreeBSD.org - The Power to Serve Public Key: http://www.pittgoth.com/~hiten/pubkey.asc --- 4FB9 C4A9 4925 CF97 9BF3 ADDA 861D 5DBD E4E3 03C3 --- --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8mQLvhh1dveTjA8MRAuZLAKCwRgXQn3IFijdpxTGTKiRad4lhgACdHMuo qBUaBTLpOHszdvIdGkM7fqE= =Yo2w -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message