[PATCH] D139864: [AIX] Demangle the name prefix with '.' in AIX OS for llvm-cxxfilt
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 27 10:27:55 PST 2023
DiggerLin added a subscriber: james.
DiggerLin added inline comments.
================
Comment at: llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp:72
+ // In XCOFF, Function entry lable begin with '.'.
+ if (Triple(sys::getProcessTriple()).isOSBinFormatXCOFF() && DecoratedStr[0] == '.') {
+ ++DecoratedStr;
----------------
jhenderson wrote:
> DiggerLin wrote:
> > stephenpeckham wrote:
> > > Wouldn't it make more sense to introduce a StripDot variable similar to StripUnderscore?
> > we do not do StripDot, we just demangle the symbol begin with "dot" if there is. (and this is xcoff specific option) I checked AIX clangtana cxxfilt, it do not has an option for "demangling the symbol begin with 'dot') . So I think we also do not need an option here and not need to introduce a new variable "StripDot".
> >
> I'm ambivalent about whether there's a `--strip-dot` option (it could be on by default for AIX, and off otherwise). The advantage with having it is that it would be possible to demangle a binary designed for AIX OS on a different platform.
>
> Also "lable" -> "label".
I checked the gnu cxxfilt (in linux OS), it can demangle ._Z3foov to .foo() as you mention in your patch https://reviews.llvm.org/D63722?id=206236#inline-567977
I am not sure whether we can enable to decode the name prefixed with '.' by default without any new option for all OS platform ? @James Henderson
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139864/new/
https://reviews.llvm.org/D139864
More information about the llvm-commits
mailing list