comparison agent/src/share/classes/sun/jvm/hotspot/debugger/win32/coff/TestParser.java @ 2072:d6cd0d55d0b5

6987812: 2/3 SAJDI: "gHotSpotVMTypes was not initialized properly in the remote process" Summary: Change ExportDirectoryTableImpl to return the 'Export RVA' field without modification. Read 'Base Of Data' field in optional header when PE32 format COFF file is read. Refine search for dbgeng.dll and dbghelp.dll. Other cleanups. Reviewed-by: swamyv, poonam
author dcubed
date Thu, 23 Dec 2010 07:58:35 -0800
parents c18cbe5936b8
children
comparison
equal deleted inserted replaced
2071:07c62ff47437 2072:d6cd0d55d0b5
1 /* 1 /*
2 * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
40 System.out.println("PE Image NOT detected, assuming object file."); 40 System.out.println("PE Image NOT detected, assuming object file.");
41 } 41 }
42 COFFHeader header = file.getHeader(); 42 COFFHeader header = file.getHeader();
43 int numSections = header.getNumberOfSections(); 43 int numSections = header.getNumberOfSections();
44 System.out.println(numSections + " sections detected."); 44 System.out.println(numSections + " sections detected.");
45 for (int i = 0; i < numSections; i++) { 45 for (int i = 1; i <= numSections; i++) {
46 SectionHeader secHeader = header.getSectionHeader(1 + i); 46 SectionHeader secHeader = header.getSectionHeader(i);
47 System.out.println(secHeader.getName()); 47 System.out.println(secHeader.getName());
48 } 48 }
49 49
50 // FIXME: the DLL exports are not contained in the COFF symbol 50 // FIXME: the DLL exports are not contained in the COFF symbol
51 // table. Instead, they are in the Export Table, one of the 51 // table. Instead, they are in the Export Table, one of the