Urgent.News

What's breaking now, across thousands of outlets.

Tech

Ghidra internals: Where are my logs ?

Ghidra uses the Apache Log4j logging library to store a lot of execution messages. Finding these logs can be quite tricky, especially if you launch Ghidra from a shell (using ghidraRun ) because no output is displayed in the terminal. Usually, the first instinct is to look for a .ghidra directory directly in your HOME folder. In our case, that will fail. Under Linux, Ghidra follows the XDG Base…

Ghidra, a software reverse engineering framework, utilizes the Apache Log4j logging library to record various execution messages. However, locating these logs can prove challenging, particularly when Ghidra is launched from a shell (using ghidraRun) as no output is displayed in the terminal. The initial assumption might be to search for a .ghidra directory within the user's HOME folder, but this approach will not yield results.

On Linux systems, Ghidra adheres to the XDG Base Directory specification, which means user configuration and logs are now situated inside ~/.config/ghidra/ rather than a direct ~/.ghidra/ folder.

A quick command to locate the log file is "find ~ -name application.log". When Ghidra is run through Eclipse, startup traces can be inspected in the console panel. The crucial lines to look for are: "User daniel started Ghidra", the user's settings directory, and other relevant directories like the temp and cache directories. Listing the files inside the user's settings directory reveals the "application.log" file, which contains all the execution logs.

Upon exploring the parent directory of the user settings folder, several subdirectories can be observed, each corresponding to a specific Ghidra version or launch mode. To avoid relying on System.out.println for debug output, it is recommended to use Ghidra's built-in ghidra.util.Msg class to write clean and formatted lines directly to application.log.

By importing the Msg class and using it to format log messages, developers can streamline their debugging process and avoid common pitfalls associated with traditional logging methods.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

I got an email about resistance

  • Author received email criticizing writing style and admission of sadness about income loss.
  • Author aims to prevent career-ruining mistakes and influence system safely from power.

SQLite with a Fine-Toothed Comb

  • Trust-in-Soft focuses on finding defects in open-source software, targeting SQLite.
  • Author uses tis-interpreter with SQLite's extensive test suite to uncover undefined behaviors.

Apple tests Chinese memory chips

Apple is testing memory chips from China’s CXMT across its product lines, including iPhones and MacBooks, as global tech reckons with an AI-induced memory shortage.

Pytest Built-in Fixtures

As I've been onboarding to my new position, I've been reviewing some of my coworker's code. I learned that pytest 1) has some built-in fixtures, and 2) they are really useful!

More from Sunday 9 August →