llvm-6502/lib/MC
Kevin Enderby 6f45b1f0d6 Add to the disassembler C API output reference types for
Objective-C data structures.

This is allows tools such as darwin's otool(1) that uses the
LLVM disassembler take a pointer value being loaded by
an instruction and add a comment to what it is being referenced
to make following disassembly of Objective-C programs
more readable.

For example disassembling the Mac OS X TextEdit app one
will see comments like the following:

movq    0x20684(%rip), %rsi ## Objc selector ref: standardUserDefaults
movq    0x21985(%rip), %rdi ## Objc class ref: _OBJC_CLASS_$_NSUserDefaults
movq    0x1d156(%rip), %r14 ## Objc message: +[NSUserDefaults standardUserDefaults]
leaq    0x23615(%rip), %rdx ## Objc cfstring ref: @"SelectLinePanel"
callq   0x10001386c ## Objc message: -[[%rdi super] initWithWindowNibName:]

These diffs also include putting quotes around C strings
in literal pools and uses "symbol address" in the comment
when adding a symbol name to the comment to tell these
types of references apart:

leaq	0x4f(%rip), %rax ## literal pool for: "Hello world"
movq    0x1c3ea(%rip), %rax ## literal pool symbol address: ___stack_chk_guard

Of course the easy changes are in the LLVM disassembler and
the hard work is up to the implementer of the SymbolLookUp()
call back.

rdar://10602439


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193833 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01 00:00:07 +00:00
..
MCDisassembler [llvm-c][Disassembler] When printing latency information, fall back to the 2013-10-03 17:51:49 +00:00
MCParser ARM: allow .thumb_func to be separated from symbol definition 2013-10-25 12:49:50 +00:00
CMakeLists.txt Add a MCAsmInfoELF class and factor some code into it. 2013-10-16 01:34:32 +00:00
ELFObjectWriter.cpp Move the STT_FILE symbols out of the normal symbol table processing for 2013-10-29 01:06:17 +00:00
LLVMBuild.txt
MachObjectWriter.cpp
Makefile
MCAsmBackend.cpp
MCAsmInfo.cpp Remove unused flag. 2013-10-31 15:49:39 +00:00
MCAsmInfoCOFF.cpp
MCAsmInfoDarwin.cpp Remove unused flag. 2013-10-31 15:49:39 +00:00
MCAsmInfoELF.cpp Add a MCAsmInfoELF class and factor some code into it. 2013-10-16 01:34:32 +00:00
MCAsmStreamer.cpp MCStreamer: Reimplement the virtual EmitRawText as a protected member, EmitRawTextImpl, to avoid string literal ambiguities 2013-10-24 22:43:10 +00:00
MCAssembler.cpp
MCAtom.cpp Fix MCDataAtom never calling remap when adding data. 2013-10-16 18:26:16 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp
MCContext.cpp MC: Support multiple sections with the same name in the same comdat group 2013-10-22 23:41:52 +00:00
MCDisassembler.cpp
MCDwarf.cpp
MCELF.cpp Move the STT_FILE symbols out of the normal symbol table processing for 2013-10-29 01:06:17 +00:00
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp Move the STT_FILE symbols out of the normal symbol table processing for 2013-10-29 01:06:17 +00:00
MCExpr.cpp
MCExternalSymbolizer.cpp Add to the disassembler C API output reference types for 2013-11-01 00:00:07 +00:00
MCFunction.cpp
MCInst.cpp
MCInstPrinter.cpp [MC] When MCInstPrint::printAnnotation uses a comment stream, it has to ensure 2013-10-01 19:21:24 +00:00
MCInstrAnalysis.cpp
MCLabel.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Move .ident handling to MCStreamer. 2013-10-16 01:05:45 +00:00
MCModule.cpp
MCModuleYAML.cpp
MCNullStreamer.cpp Add a MCTargetStreamer interface. 2013-10-08 13:08:17 +00:00
MCObjectDisassembler.cpp Create an atom with just the data that failed to disassemble. 2013-10-16 19:03:14 +00:00
MCObjectFileInfo.cpp
MCObjectStreamer.cpp Emit DWARF line entries for all data in the instruction stream. 2013-10-20 02:16:18 +00:00
MCObjectSymbolizer.cpp
MCObjectWriter.cpp
MCPureStreamer.cpp Move .ident handling to MCStreamer. 2013-10-16 01:05:45 +00:00
MCRegisterInfo.cpp
MCRelocationInfo.cpp
MCSection.cpp
MCSectionCOFF.cpp Revert "Re-commit r192758 - MC: quote tricky symbol names in asm output" 2013-10-18 02:14:40 +00:00
MCSectionELF.cpp
MCSectionMachO.cpp
MCStreamer.cpp MCStreamer: Reimplement the virtual EmitRawText as a protected member, EmitRawTextImpl, to avoid string literal ambiguities 2013-10-24 22:43:10 +00:00
MCSubtargetInfo.cpp MC: Don't assume incoming StringRef's are null terminated. 2013-10-13 22:09:26 +00:00
MCSymbol.cpp Revert "Re-commit r192758 - MC: quote tricky symbol names in asm output" 2013-10-18 02:14:40 +00:00
MCSymbolizer.cpp
MCValue.cpp
MCWin64EH.cpp
SubtargetFeature.cpp MC: Don't assume incoming StringRef's are null terminated. 2013-10-13 22:09:26 +00:00
WinCOFFObjectWriter.cpp
WinCOFFStreamer.cpp Move .ident handling to MCStreamer. 2013-10-16 01:05:45 +00:00