mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-5310 Created global search and replace feature
This commit is contained in:
parent
cc1228bdaa
commit
6fb115358a
93 changed files with 7469 additions and 141 deletions
|
@ -439,6 +439,13 @@ public abstract class AbstractDBTraceProgramViewListing implements TraceProgramV
|
|||
return getCommentAddresses(addrSet).getAddresses(forward);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCommentAddressCount() {
|
||||
return program.viewport.unionedAddresses(
|
||||
s -> program.trace.getCommentAdapter().getAddressSetView(Lifespan.at(s)))
|
||||
.getNumAddresses();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComment(int commentType, Address address) {
|
||||
try (LockHold hold = program.trace.lockRead()) {
|
||||
|
@ -447,6 +454,16 @@ public abstract class AbstractDBTraceProgramViewListing implements TraceProgramV
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CodeUnitComments getAllComments(Address address) {
|
||||
CommentType[] types = CommentType.values();
|
||||
String[] comments = new String[types.length];
|
||||
for (CommentType type : types) {
|
||||
comments[type.ordinal()] = getComment(type, address);
|
||||
}
|
||||
return new CodeUnitComments(comments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setComment(Address address, int commentType, String comment) {
|
||||
program.trace.getCommentAdapter()
|
||||
|
|
|
@ -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.
|
||||
|
@ -249,4 +249,9 @@ public class DBTraceProgramViewFragment implements ProgramFragment {
|
|||
public void move(Address min, Address max) throws NotFoundException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDeleted() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
@ -239,4 +239,9 @@ public class DBTraceProgramViewRootModule implements ProgramModule {
|
|||
public long getTreeID() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDeleted() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue