LLVM C API Extensions: added llvm-c-ext/DWARF.h with (some) DWARF constants required to generate debug info.
Most importantly, DWARF encoding used when describing a variable to tell the debugger
how to interpret the data (as float, signed/unsigned int, etc). More constants will be
added as needed.
"
Copyright (C) 2015-now Jan Vrany
This code is not an open-source (yet). You may use this code
for your own experiments and projects, given that:
* all modification to the code will be sent to the
original author for inclusion in future releases
* this is not used in any commercial software
This license is provisional and may (will) change in
a future.
"
"{ Package: 'jv:llvm_s' }"
"{ NameSpace: Smalltalk }"
ExternalAddress subclass:#LLVMObject
instanceVariableNames:''
classVariableNames:''
poolDictionaries:'LLVMTypeKind'
category:'LLVM-S-Internal'
!
!LLVMObject class methodsFor:'documentation'!
copyright
"
Copyright (C) 2015-now Jan Vrany
This code is not an open-source (yet). You may use this code
for your own experiments and projects, given that:
* all modification to the code will be sent to the
original author for inclusion in future releases
* this is not used in any commercial software
This license is provisional and may (will) change in
a future.
"
! !
!LLVMObject class methodsFor:'queries'!
isAbstract
"Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine again."
^ self == LLVMObject.
! !
!LLVMObject methodsFor:'assertions'!
assertIsBasicBlockValue:value
<resource: #skipInDebuggersWalkback>
self assert:value isLLVMValue.
self assert:value isBasicBlockValue
"Created: / 08-08-2015 / 02:43:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsFunctionValue: value
<resource: #skipInDebuggersWalkback>
self assert: value isLLVMFunction message: 'value is not an LLVMFunction'.
"Created: / 10-08-2015 / 18:55:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsIntegerOrIntegerVectorValue:value
<resource: #skipInDebuggersWalkback>
self assert:(value class == LLVMValue) message:'value is not an LLVMValue'.
self assert:(value isIntegerOrIntegerVectorValue)
"Modified (format): / 08-08-2015 / 02:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsIntegerUnsigned: value
<resource: #skipInDebuggersWalkback>
self assert: value isInteger message: 'value is not an integer'.
self assert: (value between: 0 and: 16rFFFFFFFF) message: 'value out of range'.
"Created: / 13-08-2015 / 18:57:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsString:aString
<resource: #skipInDebuggersWalkback>
self assert:aString isSingleByteString description:'string is not a valid LLVM name (twine)'
"Created: / 07-08-2015 / 18:38:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified (format): / 08-08-2015 / 02:41:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsType: type
<resource: #skipInDebuggersWalkback>
self assert: type isLLVMType message: 'value is not an LLVMType'.
"Created: / 10-08-2015 / 06:26:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsTypeArray: types
<resource: #skipInDebuggersWalkback>
self assert: types isSequenceable message: 'types is not a sequenceable collection'.
types do:[:type |
self assertIsType: type.
].
"Created: / 10-08-2015 / 17:08:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValue: value
<resource: #skipInDebuggersWalkback>
self assert: value isLLVMValue message: 'value is not an LLVMValue'.
"Created: / 08-08-2015 / 03:11:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValue: value ofKind: kind
<resource: #skipInDebuggersWalkback>
self assert: value isLLVMValue message: 'value is not an LLVMValue'.
self assert: value type kind = kind message: 'value has incorrect kind'
"Created: / 10-08-2015 / 17:40:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValue: value ofType: type
<resource: #skipInDebuggersWalkback>
self assert: value isLLVMValue message: 'value is not an LLVMValue'.
self assert: value type = type message: 'value has incorrect type'
"Created: / 08-08-2015 / 02:49:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValueArray: values
<resource: #skipInDebuggersWalkback>
self assert: values isSequenceable message: 'values is not a sequenceable collection'.
values do:[:value |
self assertIsValue: value.
].
"Created: / 10-08-2015 / 18:56:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValueOfSameType:value1 as:value2
<resource: #skipInDebuggersWalkback>
self assert: value1 type = value2 type message:'types of values differ!!'
"Created: / 07-08-2015 / 18:37:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 08-08-2015 / 02:57:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !