mahaloz / decomp2dbg

A plugin to introduce interactive symbols into your debugger from your decompiler
BSD 2-Clause "Simplified" License
622 stars 39 forks source link

Invalidate cache on Ghidra server restart #91

Closed unknown321 closed 9 months ago

unknown321 commented 9 months ago

Symbols provided by Ghidra are locked to active file during server configuration.

Reproducing:

  1. Open two files
  2. Start server on binary 1
  3. Start server on binary 2, same settings as bin 1
  4. Get symbols, notice, that symbols are from binary 1. Expected symbols from binary 2.

    # start bin1 server
    $ curl -s http://127.0.0.1:3662/RPC2 -d "<methodCall><methodName>d2d.elf_info</methodName><params></params></methodCall>" | grep -oP "<name>name</name><value>(.*?)</value>"`
    <name>name</name><value>binary 1</value>
    # start bin2 server
    $ curl -s http://127.0.0.1:3662/RPC2 -d "<methodCall><methodName>d2d.elf_info</methodName><params></params></methodCall>" | grep -oP "<name>name</name><value>(.*?)</value>"`
    <name>name</name><value>binary 1</value>

As for now this is fixed only by restarting ghidra.

This problem rises when you need to switch between library and binary during debugging session.