mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-1055 Improvements to prototype RecoverClassesFromRTTIScript for stripped gcc binaries including improved finding and creating of virtual tables, some constructor/destructor determination, and improved class data creation.
This commit is contained in:
parent
19fa121b30
commit
6d5f30f448
9 changed files with 1160 additions and 574 deletions
|
@ -1,19 +1,3 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package classrecovery;
|
||||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
|
@ -30,6 +14,8 @@ package classrecovery;
|
|||
* limitations under the License.
|
||||
*/
|
||||
//DO NOT RUN. THIS IS NOT A SCRIPT! THIS IS A CLASS THAT IS USED BY SCRIPTS.
|
||||
package classrecovery;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import ghidra.program.model.data.*;
|
||||
|
@ -347,6 +333,10 @@ public class EditStructureUtils {
|
|||
public int getNumberOfUndefinedsBeforeOffset(Structure structure, int offset,
|
||||
TaskMonitor monitor) throws CancelledException {
|
||||
|
||||
if (structure.getNumComponents() == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int numUndefineds = 0;
|
||||
int index = offset - 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue