}
public static void printMethods(Iterator methods, Output out)
{
while(methods.hasNext()) {
JavaMethod jMethod = (JavaMethod)methods.next();
try{
out.print("Bytecode range(s): ");
Iterator imageSections = jMethod.getBytecodeSections().iterator();
boolean firstSectionPassed = false;
while (imageSections.hasNext()){
ImageSection is = (ImageSection)imageSections.next();
long baseAddress = is.getBaseAddress().getAddress();
long endAddress = baseAddress + is.getSize();
if (firstSectionPassed) {
out.print(", ");
}
out.print(Long.toHexString(baseAddress) + " -- " +
Long.toHexString(endAddress));
firstSectionPassed = true;
}
out.print(": ");
String signature;
try {
out.print(Utils.getModifierString(jMethod.getModifiers()));
} catch (CorruptDataException e) {
out.print(Exceptions.getCorruptDataExceptionString());
}
try {
signature = jMethod.getSignature();
} catch (CorruptDataException e) {
out.print(Exceptions.getCorruptDataExceptionString());
signature = null;
}
if (null != signature)
{
String name = Utils.getReturnValueName(signature);
if (null == name) {
out.print("<unknown>");
} else {
out.print(name);
}
}
out.print(" ");
out.print(jMethod.getName());
if (null != signature)
{
String name = Utils.getMethodSignatureName(signature);
if (null == name) {