aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorKeith Smiley <keithbsmiley@gmail.com>2022-02-04 18:07:12 -0800
committerKeith Smiley <keithbsmiley@gmail.com>2022-10-14 15:42:18 -0700
commitbc99fd95e090a406a16fe431047d8b7d59af7dc0 (patch)
treee8e8d6f5c66f648c06101a7d52261fccae4bce72 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parentc2d209476c494b3b3194e80bcd3062444eb41993 (diff)
downloadllvm-bc99fd95e090a406a16fe431047d8b7d59af7dc0.zip
llvm-bc99fd95e090a406a16fe431047d8b7d59af7dc0.tar.gz
llvm-bc99fd95e090a406a16fe431047d8b7d59af7dc0.tar.bz2
[llvm-objdump/mac] Add new function starts print mode
This updates the `--function-starts` argument to now accept 3 different modes, `addrs` for just printing the addresses of the function starts (previous behavior), `names` for just printing the names of the function starts, and `both` to print them both side by side. In general if you're debugging function starts issues it's useful to see the symbol name alongside the address. This also mirrors Apple's `dyldinfo -function_starts` command which prints both. Differential Revision: https://reviews.llvm.org/D119050
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index aa3c053..efa64ed 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -2928,7 +2928,7 @@ static object::BuildID parseBuildIDArg(const opt::Arg *A) {
return object::BuildID(BuildID.begin(), BuildID.end());
}
-static void invalidArgValue(const opt::Arg *A) {
+void objdump::invalidArgValue(const opt::Arg *A) {
reportCmdLineError("'" + StringRef(A->getValue()) +
"' is not a valid value for '" + A->getSpelling() + "'");
}
@@ -3217,10 +3217,10 @@ int main(int argc, char **argv) {
!DynamicSymbolTable && !UnwindInfo && !FaultMapSection && !Offloading &&
!(MachOOpt &&
(Bind || DataInCode || ChainedFixups || DyldInfo || DylibId ||
- DylibsUsed || ExportsTrie || FirstPrivateHeader || FunctionStarts ||
- IndirectSymbols || InfoPlist || LazyBind || LinkOptHints ||
- ObjcMetaData || Rebase || Rpaths || UniversalHeaders || WeakBind ||
- !FilterSections.empty()))) {
+ DylibsUsed || ExportsTrie || FirstPrivateHeader ||
+ FunctionStartsType != FunctionStartsMode::None || IndirectSymbols ||
+ InfoPlist || LazyBind || LinkOptHints || ObjcMetaData || Rebase ||
+ Rpaths || UniversalHeaders || WeakBind || !FilterSections.empty()))) {
T->printHelp(ToolName);
return 2;
}