summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-12-28 08:44:02 +0000
committerEnrico Granata <egranata@apple.com>2013-12-28 08:44:02 +0000
commit30f287fde5b1e4d871726dccd0aad5913917f4f0 (patch)
treee5897c00d57db3da41508fff19955a4cf2dab98e /lldb/scripts/Python/interface
parentffd810525de92bed4d8d197fd3f73fc1897ea0c6 (diff)
downloadbcm5719-llvm-30f287fde5b1e4d871726dccd0aad5913917f4f0.tar.gz
bcm5719-llvm-30f287fde5b1e4d871726dccd0aad5913917f4f0.zip
Add a new way to bind a format to a type: by enum type
The "type format add" command gets a new flag --type (-t). If you pass -t <sometype>, upon fetching the value for an object of your type, LLDB will display it as-if it was of enumeration type <sometype> This is useful in cases of non-contiguous enums where there are empty gaps of unspecified values, and as such one cannot type their variables as the enum type, but users would still like to see them as-if they were of the enum type (e.g. DWARF field types with their user-reserved ranges) The SB API has also been improved to handle both types of formats, and a test case is added llvm-svn: 198105
Diffstat (limited to 'lldb/scripts/Python/interface')
-rw-r--r--lldb/scripts/Python/interface/SBTypeFormat.i8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBTypeFormat.i b/lldb/scripts/Python/interface/SBTypeFormat.i
index 9d2f1a675aa..4e4b69c3f1f 100644
--- a/lldb/scripts/Python/interface/SBTypeFormat.i
+++ b/lldb/scripts/Python/interface/SBTypeFormat.i
@@ -21,6 +21,8 @@ namespace lldb {
SBTypeFormat (lldb::Format format, uint32_t options = 0);
+ SBTypeFormat (const char* type, uint32_t options = 0);
+
SBTypeFormat (const lldb::SBTypeFormat &rhs);
~SBTypeFormat ();
@@ -34,6 +36,9 @@ namespace lldb {
lldb::Format
GetFormat ();
+ const char*
+ GetTypeName ();
+
uint32_t
GetOptions();
@@ -41,6 +46,9 @@ namespace lldb {
SetFormat (lldb::Format);
void
+ SetTypeName (const char*);
+
+ void
SetOptions (uint32_t);
bool
OpenPOWER on IntegriCloud