Ghidra is a software reverse engineering (SRE) framework
GT-3086 check-in of changes
ghizard264f63b7582a
diff --git a/Ghidra/Features/Base/certification.manifest b/Ghidra/Features/Base/certification.manifestindex 97e4615371..822aa82c5a 100644--- a/Ghidra/Features/Base/certification.manifest+++ b/Ghidra/Features/Base/certification.manifest@@ -519,12 +519,6 @@ src/main/help/help/topics/OverviewPlugin/images/EntropyLegend.png||GHIDRA||||ENDsrc/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|diff --git a/Ghidra/Features/Base/src/main/help/help/TOC_Source.xml b/Ghidra/Features/Base/src/main/help/help/TOC_Source.xmlindex 20d314684f..cf9ff3fb1c 100644--- a/Ghidra/Features/Base/src/main/help/help/TOC_Source.xml+++ b/Ghidra/Features/Base/src/main/help/help/TOC_Source.xml@@ -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" >diff --git a/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/KnownSymbolServerURLsDialog.png b/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/KnownSymbolServerURLsDialog.pngdeleted file mode 100644index f4d407ee60..0000000000Binary files a/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/KnownSymbolServerURLsDialog.png and /dev/null differdiff --git a/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/PdbOrXmlDialog.png b/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/PdbOrXmlDialog.pngdeleted file mode 100644index d50304d90f..0000000000Binary files a/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/PdbOrXmlDialog.png and /dev/null differdiff --git a/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/SuccessDialog.png b/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/SuccessDialog.pngdeleted file mode 100644index 7f36aa15a1..0000000000Binary files a/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/SuccessDialog.png and /dev/null differdiff --git a/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/SymbolServerURLDialog.png b/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/SymbolServerURLDialog.pngdeleted file mode 100644index 462ea45211..0000000000Binary files a/Ghidra/Features/Base/src/main/help/help/topics/PDB/images/SymbolServerURLDialog.png and /dev/null differdiff --git a/Ghidra/Features/PDB/certification.manifest b/Ghidra/Features/PDB/certification.manifestindex f7d1c7dc09..d13c64576a 100644--- a/Ghidra/Features/PDB/certification.manifest+++ b/Ghidra/Features/PDB/certification.manifest@@ -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|diff --git a/Ghidra/Features/PDB/src/main/help/help/TOC_Source.xml b/Ghidra/Features/PDB/src/main/help/help/TOC_Source.xmlnew file mode 100644index 0000000000..64f9a84ac5--- /dev/null+++ b/Ghidra/Features/PDB/src/main/help/help/TOC_Source.xml@@ -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>diff --git a/Ghidra/Features/Base/src/main/help/help/topics/PDB/PDB.htm b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/PDB.htmsimilarity index 100%rename from Ghidra/Features/Base/src/main/help/help/topics/PDB/PDB.htmrename to Ghidra/Features/PDB/src/main/help/help/topics/Pdb/PDB.htmdiff --git a/Ghidra/Features/Base/src/main/help/help/topics/PDB/download_pdb_file.html b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/download_pdb_file.htmlsimilarity index 92%rename from Ghidra/Features/Base/src/main/help/help/topics/PDB/download_pdb_file.htmlrename to Ghidra/Features/PDB/src/main/help/help/topics/Pdb/download_pdb_file.htmlindex 5fad1b1271..941fd692df 100644--- a/Ghidra/Features/Base/src/main/help/help/topics/PDB/download_pdb_file.html+++ b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/download_pdb_file.html@@ -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. Selectthe 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 yourdiff --git a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/KnownSymbolServerURLsDialog.png b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/KnownSymbolServerURLsDialog.pngnew file mode 100644index 0000000000..f371cc9254Binary files /dev/null and b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/KnownSymbolServerURLsDialog.png differdiff --git a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/PdbOrXmlDialog.png b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/PdbOrXmlDialog.pngnew file mode 100644index 0000000000..6b8e1eef41Binary files /dev/null and b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/PdbOrXmlDialog.png differdiff --git a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/PeSpecifiedPathDialog.png b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/PeSpecifiedPathDialog.pngnew file mode 100644index 0000000000..f32d0f4f41Binary files /dev/null and b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/PeSpecifiedPathDialog.png differdiff --git a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/SuccessDialog.png b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/SuccessDialog.pngnew file mode 100644index 0000000000..11453ff54eBinary files /dev/null and b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/SuccessDialog.png differdiff --git a/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/SymbolServerURLDialog.png b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/SymbolServerURLDialog.pngnew file mode 100644index 0000000000..317d9ca906Binary files /dev/null and b/Ghidra/Features/PDB/src/main/help/help/topics/Pdb/images/SymbolServerURLDialog.png differdiff --git a/Ghidra/Features/PDB/src/screen/java/help/screenshot/PdbScreenShots.java b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/PdbScreenShots.javasimilarity index 69%rename from Ghidra/Features/PDB/src/screen/java/help/screenshot/PdbScreenShots.javarename to Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/PdbScreenShots.javaindex ebf0d90388..eafae9dbd2 100644--- a/Ghidra/Features/PDB/src/screen/java/help/screenshot/PdbScreenShots.java+++ b/Ghidra/Test/IntegrationTest/src/screen/java/help/screenshot/PdbScreenShots.java@@ -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");+ }+@Testpublic 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 peSpecifiedPathDialog = waitForWindow("PE-specified PDB Path");+ pressButtonByText(peSpecifiedPathDialog, "Yes");- Window saveLocationDialog = waitForWindow("Select Location to Save Retrieved File", 2000);+ 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 {@Testpublic 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");