基本上,如何使用Linux可执行文件中的Dwarf信息列出所有类信息。
例如:如果一个c ++项目使用调试符号进行编译,并且我们只有Linux可执行文件和调试信息,那么我们可以打印类信息吗?
public class Interleave {
// TODO: write your code below this comment
// You must write a method that will interleave two arrays,
// producing a result array. The resulting array should begin
// with the first element of the first given array.
// For example, the correct output for the setup in main is:
//
// 0, 1, 2, 3, 4, 5, 6,
//
// The test suite in InterleaveTest.java provides more examples.
// If one array is larger than the other, the extra elements should
// be put onto the end of the result array. For example,
// if interleaving:
//
// first: new int[]{0, 1}
// second: new int[]{5, 6, 7, 8}
//
// ...the result should be:
//
// new int[]{0, 5, 1, 6, 7, 8}
//
// If interleaving:
//
// first: new int[]{5, 6, 7, 8}
// second: new int[]{0, 1}
//
// ...the result should be:
//
// new int[]{5, 0, 6, 1, 7, 8}
//
// DO NOT MODIFY main
public static void main(String[] args) {
int[] first = new int[]{0, 2, 4, 6};
int[] second = new int[]{1, 3, 5};
int[] retval = interleave(first, second);
for (int x = 0; x < retval.length; x++) {
System.out.print("" + retval[x] + ", ");
}
System.out.println();
}
static int[] interleave(int[] first, int[] second) {
throw new UnsupportedOperationException("Not supported yet.");
}
}