Ghidra: Can't change "Symbol Repository Path" option

Created on 6 Mar 2019  路  2Comments  路  Source: NationalSecurityAgency/ghidra

After being told by a helpful message that I could change the "Symbol Repository Path" to allow the program to find the correct PDB, I've tried to do just this, but it seems to be broken and the value entered into this field just doesn't seem to be saved at all.

To Reproduce
Steps to reproduce the behavior:

  1. Open the Code Browser tool.
  2. Use "Edit|Options for ..." menu item.
  3. Select "Analyzers" node in the tree on the left.
  4. Select "PDB" in the check-listbox in the middle of the window.
  5. Enter a valid existing path into the field on the right.
  6. Observe that "Apply" doesn't light up (i.e. stays disabled). Press "OK".
  7. Redo the steps starting from the second one to see that the entered value hasn't been taken into account.

Expected behavior
"Apply" should be enabled and "OK" should save the field contents.

Environment (please complete the following information):

  • Windows 7
  • OpenJDK 11
Bug

Most helpful comment

Hey @vadz , this is a bug we found internally as well, and already have a fix for. It'll be patched in a future release.

All 2 comments

Just so anybody could have faster jumpstart, since I still does not grok where to place changes.
It appears that this popup constructed by the in the Ghidra\Features\Base\src\main\java\ghidra\app\util\OptionsDialog.java
Construction of that class is from Ghidra\Features\Base\src\main\java\ghidra\app\plugin\core\progmgr\ProgramManagerPlugin.java:740.

In the https://github.com/kant2002/Ghidra/blob/master/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisPanel.java#L471-L488

there 2 loops which validate changes.

  1. First one is verifies that analyzer itself is checked or unchecked.
  2. Second one verifies that actual values for some properties are changed. And here there no notifications about change in the Analyzer options.

I manage to fix that by changing in 2 files. Ghidra\Features\Base\ in the EditorState.java where I ensure that notification happens just on changes in properties. just wrap firing notiifcations in if (isValueChanged()) {.
And in the AnalysisPanel.java in checkForDifferences() I start firing notifications if editor state was changed.

Hey @vadz , this is a bug we found internally as well, and already have a fix for. It'll be patched in a future release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gemini00 picture gemini00  路  3Comments

tambry picture tambry  路  3Comments

astrelsky picture astrelsky  路  3Comments

Merculous picture Merculous  路  3Comments

0x6d696368 picture 0x6d696368  路  3Comments