From 989b7efd8ac6201d37c201d5ddf7bec6966eb106 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Fri, 22 Jul 2011 00:47:58 +0000 Subject: Add BasicFormatter and ChildVisitingFormatter utility classes to the lldbutil.py module which provide some convenient ways to print an SBValue object. Use that in TestValueAPI.py to print the 'days_of_week' char* array variable. For an example: cvf = lldbutil.ChildVisitingFormatter(indent=2) print cvf.format(days_of_week) produces: (const char *[7]) days_of_week = 0x00000001026a5060 (location) (const char *) [0] = "Sunday" (const char *) [1] = "Monday" (const char *) [2] = "Tuesday" (const char *) [3] = "Wednesday" (const char *) [4] = "Thursday" (const char *) [5] = "Friday" (const char *) [6] = "Saturday" llvm-svn: 135736 --- lldb/test/python_api/value/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/test/python_api/value/main.c') diff --git a/lldb/test/python_api/value/main.c b/lldb/test/python_api/value/main.c index 54d858033e3..108edfa8c8e 100644 --- a/lldb/test/python_api/value/main.c +++ b/lldb/test/python_api/value/main.c @@ -10,6 +10,8 @@ // This simple program is to test the lldb Python API SBValue.GetChildAtIndex(). +int g_my_int = 100; + const char *days_of_week[7] = { "Sunday", "Monday", "Tuesday", -- cgit v1.2.3