mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-28 09:40:26 +08:00
Merge remote-tracking branch 'origin/GP-4901_ghizard_MDMang_output_options--SQUASHED'
This commit is contained in:
@@ -422,7 +422,7 @@
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>Only Demangle Known Mangled Symbols
|
||||
<TD>Demangle Only Known Mangled Symbols
|
||||
</TD>
|
||||
<TD>
|
||||
Only demangle symbols that follow known compiler mangling patterns.
|
||||
@@ -509,7 +509,7 @@
|
||||
<BR>
|
||||
<BR>
|
||||
<P><A name="Microsoft_Demangler_Options">
|
||||
<B>The Microsoft Demangler</B></H4> adds the following analysis option:
|
||||
<B>The Microsoft Demangler</B></H4> adds the following analysis options:
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
@@ -536,6 +536,33 @@
|
||||
</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<U><B>Use Encoded Anonymous Namespace</B></U> -
|
||||
This output option is used to create a more unique namespace node from the
|
||||
standard output for anonymous namespaces, thus helping to prevent collisions
|
||||
between multiple types of the same name, but each in their own unique anonymous
|
||||
namespace. When turned on, variations of the standard namespace
|
||||
<B>`anonymous namespace'</B> will be replaced with a more specific namespace of
|
||||
the form <B>_anon_ABCD1234</B> where the hexadecimal number comes from a number
|
||||
encoded in the mangled string. The trade-off is that when this option is turned on,
|
||||
the resultant namespace will not match non-mangled names that have the standard,
|
||||
non-specific anonymous namespace.
|
||||
</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<U><B>Apply Argument UDT Tags</B></U> -
|
||||
This output option controls whether user-defined type tags (e.g., class, enum,
|
||||
struct, union) are placed in front of the named type when the type is used as a
|
||||
template or function argument. When turned on, the demangled string matches the
|
||||
common demangler standard. When turned off, the standard demangled strings of
|
||||
<B>struct AAA<class BBB></B> and <B>struct AAA<struct BBB></B> would
|
||||
both be reduced to <B>struct AAA<BBB></B>.
|
||||
</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -15,15 +15,17 @@
|
||||
*/
|
||||
package ghidra.app.util.demangler;
|
||||
|
||||
import generic.json.Json;
|
||||
|
||||
/**
|
||||
* A simple class to contain the various settings for demangling
|
||||
*/
|
||||
public class DemanglerOptions {
|
||||
|
||||
private boolean applyCallingConvention = true;
|
||||
private boolean applySignature = true;
|
||||
private boolean doDisassembly = true;
|
||||
private boolean demangleOnlyKnownPatterns = true;
|
||||
protected boolean applyCallingConvention = true;
|
||||
protected boolean applySignature = true;
|
||||
protected boolean doDisassembly = true;
|
||||
protected boolean demangleOnlyKnownPatterns = true;
|
||||
|
||||
public DemanglerOptions() {
|
||||
// use default values
|
||||
@@ -118,12 +120,6 @@ public class DemanglerOptions {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
//@formatter:off
|
||||
return "{\n" +
|
||||
"\tdoDisassembly: " + doDisassembly + ",\n" +
|
||||
"\tapplySignature: " + applySignature + ",\n" +
|
||||
"\tdemangleOnlyKnownPatterns: " + demangleOnlyKnownPatterns + ",\n" +
|
||||
"}";
|
||||
//@formatter:on
|
||||
return Json.toString(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user