On 8/13/07, Bill Sommerfeld <[EMAIL PROTECTED]> wrote: > On Sun, 2007-08-12 at 16:50 -0700, Jason King wrote: > > As I am doing testing with the replacement Sparc disassembler, I > > encountered something that's confused me: > > > > Doing a disassembly in /platform/sun4u/kernel/unix from a SXCE B63 box, a > > few instructions stuck out at me: > > > 0x1007260: 6d 61 69 6e call -0x4a7a5a48 > > <0xffffffffb6861818> > > 0x1007264: 20 72 65 74 bn,a,pn %xcc, +0x995d0 > > <0x10a0834> > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > 0x1007268: 75 72 6e 65 call -0x2a36466c > > <0xffffffffd6ca2bfc> > > 0x100726c: 64 00 00 00 call -0x70000000 > > <0xffffffff9100726c> > > Ignore the instructions, look at the bytes. All ASCII printing characters, > mostly letters. > > "main returned". > > generated by uts/sun4u/ml/mach_locore.s, line 365 > > > 0x100bc78: 49 6e 74 65 call +0x25b9d194 > > <0x26ba8e0c> > > 0x100bc7c: 72 72 75 70 call -0x36362a40 > > <0xffffffffcaca923c> > > 0x100bc80: 74 20 56 65 call -0x2f7ea66c > > <0xffffffffd1821614> > > 0x100bc84: 63 74 6f 72 call -0x722e4238 > > <0xffffffff8ed27a4c> > > 0x100bc88: 20 52 65 63 bn,a,pn %xcc, +0x9958c > > <0x10a5214> > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > 0x100bc8c: 65 69 76 65 call -0x6a5a266c > > <0xffffffff96a69620> > > 0x100bc90: 20 52 65 67 bn,a,pn %xcc, +0x9959c > > <0x10a522c> > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > "Interrupt Vector Receive Reg" > > looks like uts/sun4u/ml/mach_interrupt.s, line 339 > > > Are these sections just garbage, or is something else going on here? > > Looks like ASCII string literals to me. > > - Bill > > >
Hmm this makes things a bit more interesting -- the problem I'm having is I always return -1 for any invalid instructions, it appears the closed source does not always do that. In some cases, it's disassembling incorrectly (like above), others it merely places the value of the instruction in the output buffer, in both cases returning success. dis tends to punt (it stops disassembling until it reaches the next symbol). I can easily make mine always return success, and merely put the instruction value into the output buffer on invalid instructions. This would get around the dis behavior, which would help in verification, but it doesn't seem right. _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org