GT-3086 check-in of changes
|
@ -519,12 +519,6 @@ src/main/help/help/topics/OverviewPlugin/images/EntropyLegend.png||GHIDRA||||END
|
|||
src/main/help/help/topics/OverviewPlugin/images/EntropyOptions.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/OverviewPlugin/images/Equation.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/OverviewPlugin/images/OverviewPanel.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/PDB/PDB.htm||GHIDRA||||END|
|
||||
src/main/help/help/topics/PDB/download_pdb_file.html||GHIDRA||||END|
|
||||
src/main/help/help/topics/PDB/images/KnownSymbolServerURLsDialog.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/PDB/images/PdbOrXmlDialog.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/PDB/images/SuccessDialog.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/PDB/images/SymbolServerURLDialog.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/PrintingPlugin/Printing.htm||GHIDRA||||END|
|
||||
src/main/help/help/topics/PrintingPlugin/images/PrintOptions.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/Program/Ghidra_Programs.htm||GHIDRA||||END|
|
||||
|
|
|
@ -333,11 +333,6 @@
|
|||
<tocdef id="Query Results Window" sortgroup="h" text="Query Results Window" target="help/topics/Search/Query_Results_Dialog.htm" />
|
||||
</tocdef>
|
||||
|
||||
<tocdef id="PDB" sortgroup="q" text="PDB" target="help/topics/PDB/PDB.htm" >
|
||||
<tocdef id="README_PDB" sortgroup="a" text="PDB Parser (README_PDB)" target="docs/README_PDB.html" />
|
||||
<tocdef id="Download PDB" sortgroup="b" text="Download PDB File" target="help/topics/PDB/download_pdb_file.html" />
|
||||
</tocdef>
|
||||
|
||||
</tocdef> <!-- End Program Annotation -->
|
||||
|
||||
<tocdef id="Scripting" text="Scripting" target="help/topics/GhidraScriptMgrPlugin/GhidraScriptMgrPlugin.htm" >
|
||||
|
|
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB |
|
@ -2,6 +2,14 @@
|
|||
Module.manifest||GHIDRA||||END|
|
||||
build.gradle||GHIDRA||||END|
|
||||
src/global/docs/README_PDB.html||GHIDRA||||END|
|
||||
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
|
||||
src/main/help/help/topics/Pdb/PDB.htm||GHIDRA||||END|
|
||||
src/main/help/help/topics/Pdb/download_pdb_file.html||GHIDRA||||END|
|
||||
src/main/help/help/topics/Pdb/images/KnownSymbolServerURLsDialog.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/Pdb/images/PdbOrXmlDialog.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/Pdb/images/PeSpecifiedPathDialog.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/Pdb/images/SuccessDialog.png||GHIDRA||||END|
|
||||
src/main/help/help/topics/Pdb/images/SymbolServerURLDialog.png||GHIDRA||||END|
|
||||
src/pdb/.editorconfig||GHIDRA||||END|
|
||||
src/pdb/README.txt||GHIDRA||||END|
|
||||
src/pdb/pdb.sln||GHIDRA||||END|
|
||||
|
|
63
Ghidra/Features/PDB/src/main/help/help/TOC_Source.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version='1.0' encoding='ISO-8859-1' ?>
|
||||
<!--
|
||||
|
||||
This is an XML file intended to be parsed by the Ghidra help system. It is loosely based
|
||||
upon the JavaHelp table of contents document format. The Ghidra help system uses a
|
||||
TOC_Source.xml file to allow a module with help to define how its contents appear in the
|
||||
Ghidra help viewer's table of contents. The main document (in the Base module)
|
||||
defines a basic structure for the
|
||||
Ghidra table of contents system. Other TOC_Source.xml files may use this structure to insert
|
||||
their files directly into this structure (and optionally define a substructure).
|
||||
|
||||
|
||||
In this document, a tag can be either a <tocdef> or a <tocref>. The former is a definition
|
||||
of an XML item that may have a link and may contain other <tocdef> and <tocref> children.
|
||||
<tocdef> items may be referred to in other documents by using a <tocref> tag with the
|
||||
appropriate id attribute value. Using these two tags allows any module to define a place
|
||||
in the table of contents system (<tocdef>), which also provides a place for
|
||||
other TOC_Source.xml files to insert content (<tocref>).
|
||||
|
||||
During the help build time, all TOC_Source.xml files will be parsed and validated to ensure
|
||||
that all <tocref> tags point to valid <tocdef> tags. From these files will be generated
|
||||
<module name>_TOC.xml files, which are table of contents files written in the format
|
||||
desired by the JavaHelp system. Additionally, the generated files will be merged together
|
||||
as they are loaded by the JavaHelp system. In the end, when displaying help in the Ghidra
|
||||
help GUI, there will be one table of contents that has been created from the definitions in
|
||||
all of the modules' TOC_Source.xml files.
|
||||
|
||||
|
||||
Tags and Attributes
|
||||
|
||||
<tocdef>
|
||||
-id - the name of the definition (this must be unique across all TOC_Source.xml files)
|
||||
-text - the display text of the node, as seen in the help GUI
|
||||
-target** - the file to display when the node is clicked in the GUI
|
||||
-sortgroup - this is a string that defines where a given node should appear under a given
|
||||
parent. The string values will be sorted by the JavaHelp system using
|
||||
a javax.text.RulesBasedCollator. If this attribute is not specified, then
|
||||
the text of attribute will be used.
|
||||
|
||||
<tocref>
|
||||
-id - The id of the <tocdef> that this reference points to
|
||||
|
||||
**The URL for the target is relative and should start with 'help/topics'. This text is
|
||||
used by the Ghidra help system to provide a universal starting point for all links so that
|
||||
they can be resolved at runtime, across modules.
|
||||
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<tocroot>
|
||||
<tocref id="Ghidra Functionality">
|
||||
<tocdef id="Program Annotation"
|
||||
text="Program Annotation"
|
||||
target="help/topics/ProgramManagerPlugin/Program_Annotation.htm">
|
||||
<tocdef id="PDB" sortgroup="q" text="PDB" target="help/topics/PDB/PDB.htm" >
|
||||
<tocdef id="README_PDB" sortgroup="a" text="PDB Parser (README_PDB)" target="docs/README_PDB.html" />
|
||||
<tocdef id="Download PDB" sortgroup="b" text="Download PDB File" target="help/topics/PDB/download_pdb_file.html" />
|
||||
</tocdef>
|
||||
|
||||
</tocdef>
|
||||
</tocref>
|
||||
</tocroot>
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
<BR>
|
||||
|
||||
<LI>A dialog appears asking whether you want to download a .PDB or .PDB.XML file. Select
|
||||
<LI>A dialog appears asking whether you want to download a PDB or XML (PDB.XML) file. Select
|
||||
the type of file you want to download and click OK.</LI>
|
||||
|
||||
<P align="center"><IMG border="0" src="images/PdbOrXmlDialog.png"></P>
|
||||
|
@ -61,6 +61,16 @@
|
|||
more information on creating and using .PDB.XML files, see the
|
||||
<A href="../../../help/topics/ImporterPlugin/load_pdb.html">Load PDB File</A> section.</P>
|
||||
|
||||
<BR>
|
||||
|
||||
<LI>Before attempting to download the file, an attempt will first be made to locate it
|
||||
using file and path names associated with the program. A dialog appears asking whether you
|
||||
want to include the PE-Header-Specified Path, which could include a UCN path of a
|
||||
location that might not be trusted. Select OK if you want to perform this potentially
|
||||
unsafe retrieval.</LI>
|
||||
|
||||
<P align="center"><IMG border="0" src="images/PeSpecifiedPathDialog.png"></P>
|
||||
|
||||
<BR>
|
||||
|
||||
<LI>A dialog appears asking where to save the downloaded file. Pick a location to store your
|
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 10 KiB |
|
@ -35,13 +35,27 @@ public class PdbScreenShots extends GhidraScreenShotGenerator {
|
|||
|
||||
performAction("Download_PDB_File", "PdbSymbolServerPlugin", false);
|
||||
|
||||
Window pdbDialog = waitForWindow("pdb or pdb.xml", 2000);
|
||||
Window pdbDialog = waitForWindow("pdb or pdb.xml");
|
||||
pdbDialog.setSize(new Dimension(750, 200));
|
||||
captureWindow(pdbDialog);
|
||||
|
||||
pressButtonByText(pdbDialog, "Cancel");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPeSpecifiedPathDialog() throws Exception {
|
||||
|
||||
performAction("Download_PDB_File", "PdbSymbolServerPlugin", false);
|
||||
|
||||
Window pdbDialog = waitForWindow("pdb or pdb.xml");
|
||||
pressButtonByText(pdbDialog, "PDB");
|
||||
|
||||
Window peSpecifiedPathDialog = waitForWindow("PE-specified PDB Path");
|
||||
captureWindow(peSpecifiedPathDialog);
|
||||
|
||||
pressButtonByText(peSpecifiedPathDialog, "Cancel");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSymbolServerURLDialog() throws Exception {
|
||||
|
||||
|
@ -51,13 +65,16 @@ public class PdbScreenShots extends GhidraScreenShotGenerator {
|
|||
|
||||
performAction("Download_PDB_File", "PdbSymbolServerPlugin", false);
|
||||
|
||||
Window pdbDialog = waitForWindow("pdb or pdb.xml", 2000);
|
||||
pressButtonByText(pdbDialog, "OK");
|
||||
Window pdbDialog = waitForWindow("pdb or pdb.xml");
|
||||
pressButtonByText(pdbDialog, "PDB");
|
||||
|
||||
Window saveLocationDialog = waitForWindow("Select Location to Save Retrieved File", 2000);
|
||||
Window peSpecifiedPathDialog = waitForWindow("PE-specified PDB Path");
|
||||
pressButtonByText(peSpecifiedPathDialog, "Yes");
|
||||
|
||||
Window saveLocationDialog = waitForWindow("Select Location to Save Retrieved File");
|
||||
pressButtonByText(saveLocationDialog, "OK");
|
||||
|
||||
Window urlDialog = waitForWindow("Symbol Server URL", 2000);
|
||||
Window urlDialog = waitForWindow("Symbol Server URL");
|
||||
urlDialog.setSize(new Dimension(850, 135));
|
||||
|
||||
captureWindow(urlDialog);
|
||||
|
@ -68,13 +85,12 @@ public class PdbScreenShots extends GhidraScreenShotGenerator {
|
|||
@Test
|
||||
public void testKnownSymbolServerURLsDialog() throws Exception {
|
||||
|
||||
List<URLChoice> urlChoices = new ArrayList<URLChoice>();
|
||||
List<URLChoice> urlChoices = new ArrayList<>();
|
||||
urlChoices.add(new URLChoice("Internet", "https://msdl.microsoft.com/download/symbols"));
|
||||
urlChoices.add(new URLChoice("My Network", "https://my_symbol_server.my.org"));
|
||||
|
||||
final ObjectChooserDialog<URLChoice> urlDialog =
|
||||
new ObjectChooserDialog<URLChoice>("Choose a URL", URLChoice.class, urlChoices,
|
||||
"getNetwork", "getUrl");
|
||||
final ObjectChooserDialog<URLChoice> urlDialog = new ObjectChooserDialog<>("Choose a URL",
|
||||
URLChoice.class, urlChoices, "getNetwork", "getUrl");
|
||||
|
||||
runSwing(() -> {
|
||||
// Do nothing
|
||||
|
@ -91,10 +107,10 @@ public class PdbScreenShots extends GhidraScreenShotGenerator {
|
|||
// Can't really get success message without actually downloading a file.
|
||||
// So, fake out the message by showing the same sort of dialog the user would see.
|
||||
Msg.showInfo(getClass(), null, "File Retrieved",
|
||||
"Downloaded and saved file 'example.pdb' to \n"
|
||||
+ "C:\\Symbols\\example.pdb\\1123A456B7889012C3DDFA4556789B011");
|
||||
"Downloaded and saved file 'example.pdb' to \n" +
|
||||
"C:\\Symbols\\example.pdb\\1123A456B7889012C3DDFA4556789B011");
|
||||
|
||||
Window successDialog = waitForWindow("File Retrieved", 2000);
|
||||
Window successDialog = waitForWindow("File Retrieved");
|
||||
captureWindow(successDialog);
|
||||
|
||||
pressButtonByText(successDialog, "OK");
|