> > > Are these sections just garbage, or is something else going on here? > > > > Looks like ASCII string literals to me. > > > 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.
What about command line option? To me it seems that default could be to skip to next symbol if you hit invalid instruction (to be close to original dis), and optionally have the possibility to bail out completely or just skip to next instruction (as opposed to next symbol). If you don't want to have your dis feature creep, IMO skipping to next instruction (and putting INVALID or something in the output) will allow you to post-process the output later to get the same results as with the command line options above. -- Vlad
pgp5YMqFRq7Hr.pgp
Description: PGP signature
_______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org