mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-4843 - PDB MSDIA proc of namespace and bit-fields - change initial
name test
This commit is contained in:
parent
7d666ea34c
commit
f17f94929e
1 changed files with 6 additions and 8 deletions
|
@ -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.
|
||||
|
@ -16,6 +16,7 @@
|
|||
package ghidra.app.util.bin.format.pdb;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import ghidra.app.util.SymbolPathParser;
|
||||
|
@ -28,7 +29,7 @@ import ghidra.util.exception.CancelledException;
|
|||
/**
|
||||
* <code>PdbMember</code> convey PDB member information used for datatype
|
||||
* reconstruction. The <i>memberDataTypeName</i> is expected to include
|
||||
* namespace prefixes when relevant. When representing bitfields the
|
||||
* namespace prefixes when relevant. When representing bitfields the
|
||||
* <i>memberName</i> is used to convey bit-size and bit-offset information
|
||||
* (e.g., fieldname:SSSS:XXXX where SSSS corresponds to the bit-size
|
||||
* and XXXX corresponds to an bit-offset). If bit-offset information is
|
||||
|
@ -81,8 +82,8 @@ public class DefaultPdbMember extends PdbMember {
|
|||
}
|
||||
|
||||
private static String getMemberName(String name, PdbKind kind) {
|
||||
if (name == null) {
|
||||
return null;
|
||||
if (StringUtils.isBlank(name)) {
|
||||
return name;
|
||||
}
|
||||
if (kind == PdbKind.MEMBER) {
|
||||
// Strip bitfield data if present (see parseBitField method)
|
||||
|
@ -92,9 +93,6 @@ public class DefaultPdbMember extends PdbMember {
|
|||
}
|
||||
}
|
||||
// name may contain namespace prefix for non-Member class members
|
||||
if (StringUtils.isEmpty(name)) {
|
||||
return name;
|
||||
}
|
||||
List<String> names = SymbolPathParser.parse(name);
|
||||
return names.get(names.size() - 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue