2 messages in org.opensolaris.mdb-discuss[mdb-discuss] Fwd: building kmdb + li...
FromSent OnAttachments
Jason KingAug 31, 2007 7:59 pm.diff
Michael ShapiroSep 3, 2007 9:44 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[mdb-discuss] Fwd: building kmdb + libdisasmActions...
From:Jason King (jas@ansipunx.net)
Date:Aug 31, 2007 7:59:04 pm
List:org.opensolaris.mdb-discuss
Attachments:

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