Skip to content

Commit

Permalink
[lldb][gmodules] Fix TestDataFormatterCpp with gmodules on macOS
Browse files Browse the repository at this point in the history
'Point' is actually a system type defined on macOS.
  • Loading branch information
Teemperor committed Nov 1, 2021
1 parent 702fd3d commit ac7c880
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,32 +120,32 @@ def cleanup():
' = ptr = ',
' "1234567890123456789012345678901234567890123456789012345678901234ABC"'])

self.runCmd("type summary add -c Point")
self.runCmd("type summary add -c TestPoint")

self.expect("frame variable iAmSomewhere",
substrs=['x = 4',
'y = 6'])

self.expect("type summary list",
substrs=['Point',
substrs=['TestPoint',
'one-line'])

self.runCmd("type summary add --summary-string \"y=${var.y%x}\" Point")
self.runCmd("type summary add --summary-string \"y=${var.y%x}\" TestPoint")

self.expect("frame variable iAmSomewhere",
substrs=['y=0x'])

self.runCmd(
"type summary add --summary-string \"y=${var.y},x=${var.x}\" Point")
"type summary add --summary-string \"y=${var.y},x=${var.x}\" TestPoint")

self.expect("frame variable iAmSomewhere",
substrs=['y=6',
'x=4'])

self.runCmd("type summary add --summary-string \"hello\" Point -e")
self.runCmd("type summary add --summary-string \"hello\" TestPoint -e")

self.expect("type summary list",
substrs=['Point',
substrs=['TestPoint',
'show children'])

self.expect("frame variable iAmSomewhere",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ typedef Type3 Type4; // should show as char
typedef int ChildType; // should show as int
typedef int AnotherChildType; // should show as int

struct Point {
struct TestPoint {
int x;
int y;
Point(int X = 3, int Y = 2) : x(X), y(Y) {}
TestPoint(int X = 3, int Y = 2) : x(X), y(Y) {}
};

typedef float ShowMyGuts;
Expand Down Expand Up @@ -85,7 +85,7 @@ int main (int argc, const char * argv[])

Speed* SPPtrILookHex = new Speed(16);

Point iAmSomewhere(4,6);
TestPoint iAmSomewhere(4,6);

i_am_cool *cool_pointer = (i_am_cool*)malloc(sizeof(i_am_cool)*3);
cool_pointer[0] = i_am_cool(3,-3.141592,'E');
Expand Down

0 comments on commit ac7c880

Please sign in to comment.