Since posting from opensolaris.org seems to get rejected, I'm trying
this again...


I'm currently finishing off some loose ends before (hopefully)
integrating a non-encumbered libdisasm.so for sparc.  During this,
I've run into a minor issue with the kmdb build.  I'd like to get some
guidance on an approach.

Basically, in my code, I utilize a 'bprintf' function for outputting
text.  It simplifies the code and keeps all the bits for tracking the
length of the buffer in one place (instead of spread all over the
place).  However it utilizes vsnprintf to do this.  This is where the
issue comes in

mdb_modapi only exposes mdb_snprintf, so this is an issue with the kmdb build.

I can think of three different options:
- I can rewrite the code to only utilize snprintf, though it would
clutter the code a bit
- I can make it reference mdb_iob_vsnprintf
- Or, I can add mdb_vsnprintf to mdb_modapi and use the same technique
currently used for snprintf

Any thoughts, suggestions would be helpful.

I've attached a diff against a fairly (within last week) copy of the
ON tree that does option 3 (including the new libdisasm bits) for
reference.

One note, my test machine is temporarily unavailable, so I have not
had an opportunity to test the integration into the ON tree yet.  The
code itself has been tested against all the binaries and libs in /usr
and generates semantically identical output (there are a few
deviations from the current closed library due to bugs in the closed
version that I obviously do not want to recreate).


This message posted from opensolaris.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libdisasm.diff
Type: application/octet-stream
Size: 125267 bytes
Desc: not available
URL: 
<http://mail.opensolaris.org/pipermail/mdb-discuss/attachments/20070831/9ea2bc2d/attachment.obj>

Reply via email to