Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Mar 2002 21:45:21 +0000
From:      Hiten Pandya <hiten@uk.FreeBSD.org>
To:        jhb@FreeBSD.org
Cc:        hackers@FreeBSD.org
Subject:   Re: Debugging BTX Faults
Message-ID:  <20020320214521.A23027@hpdi.ath.cx>

next in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020320214521.A23027>