Skip to content

Commit

Permalink
Merge pull request #259 from chaoticgd/extra_formatting
Browse files Browse the repository at this point in the history
Reformat some additional files
  • Loading branch information
chaoticgd authored Oct 23, 2024
2 parents 114fd55 + a36f148 commit d199184
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ghidra_scripts/CCCDecompileAllFunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ public class CCCDecompileAllFunctions extends GhidraScript {
public void run() throws Exception {
FlatDecompilerAPI decompiler = new FlatDecompilerAPI(this);
String outputPath = askString("Choose Output File Path", "");
try(FileWriter writer = new FileWriter(outputPath)) {
for(Function function : currentProgram.getFunctionManager().getFunctions(true)) {
try (FileWriter writer = new FileWriter(outputPath)) {
for (Function function : currentProgram.getFunctionManager().getFunctions(true)) {
writer.write("@function ");
writer.write(Long.toHexString(function.getEntryPoint().getOffset()));
writer.write("\n");
try {
writer.write(decompiler.decompile(function));
writer.write("\n");
} catch(Exception e) {
} catch (Exception e) {
println("[" + function.getName() + "] " + e.getMessage());
}
}
Expand Down
3 changes: 2 additions & 1 deletion test/demangler_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#include "demangle.h"

#define DEMANGLER_OPNAME_TEST(name, mangled, expected_demangled) \
TEST(GNUDemangler, name) { \
TEST(GNUDemangler, name) \
{ \
char* demangled = cplus_demangle_opname(mangled, 0); \
const char* expected = expected_demangled; \
if (demangled) { \
Expand Down

0 comments on commit d199184

Please sign in to comment.