[Lldb-commits] [lldb] r115216 - in /lldb/trunk/test/breakpoint_locations: TestBreakpointLocations.py main.c
Johnny Chen
johnny.chen at apple.com
Thu Sep 30 15:11:33 PDT 2010
Author: johnny
Date: Thu Sep 30 17:11:33 2010
New Revision: 115216
URL: http://llvm.org/viewvc/llvm-project?rev=115216&view=rev
Log:
Modification required to test clang, gcc, and llvm-gcc.
Modified:
lldb/trunk/test/breakpoint_locations/TestBreakpointLocations.py
lldb/trunk/test/breakpoint_locations/main.c
Modified: lldb/trunk/test/breakpoint_locations/TestBreakpointLocations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/breakpoint_locations/TestBreakpointLocations.py?rev=115216&r1=115215&r2=115216&view=diff
==============================================================================
--- lldb/trunk/test/breakpoint_locations/TestBreakpointLocations.py (original)
+++ lldb/trunk/test/breakpoint_locations/TestBreakpointLocations.py Thu Sep 30 17:11:33 2010
@@ -34,9 +34,8 @@
# The breakpoint list should show 3 locations.
self.expect("breakpoint list", "Breakpoint locations shown correctly",
substrs = ["1: file ='main.c', line = 19, locations = 3"],
- patterns = ["1\.1: where = a.out`func_inlined .+unresolved, hit count = 0",
- "1\.2: where = a.out`main .+\[inlined\].+unresolved, hit count = 0",
- "1\.3: where = a.out`main .+\[inlined\].+unresolved, hit count = 0"])
+ patterns = ["where = a.out`func_inlined .+unresolved, hit count = 0",
+ "where = a.out`main .+\[inlined\].+unresolved, hit count = 0"])
# The 'breakpoint disable 3.*' command should fail gracefully.
self.expect("breakpoint disable 3.*",
@@ -66,21 +65,22 @@
# Run the program againt. We should stop on the two breakpoint locations.
self.runCmd("run", RUN_SUCCEEDED)
- self.expect("thread backtrace", "Stopped on an inlined location",
- substrs = ["stop reason = breakpoint 1.2"],
- patterns = ["frame #0: .+\[inlined\]"])
+ # Stopped once.
+ self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = ["stop reason = breakpoint 1."])
+ # Continue the program, there should be another stop.
self.runCmd("process continue")
- self.expect("thread backtrace", "Stopped on an inlined location",
- substrs = ["stop reason = breakpoint 1.3"],
- patterns = ["frame #0: .+\[inlined\]"])
+ # Stopped again.
+ self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = ["stop reason = breakpoint 1."])
# At this point, the 3 locations should all have "hit count = 2".
self.expect("breakpoint list", "Expect all 3 breakpoints with hit count of 2",
- patterns = ["1\.1: where = a.out`func_inlined .+ resolved, hit count = 2 +Options: disabled",
- "1\.2: where = a.out`main .+\[inlined\].+ resolved, hit count = 2",
- "1\.3: where = a.out`main .+\[inlined\].+ resolved, hit count = 2"])
+ patterns = ["1\.1: .+ resolved, hit count = 2 +Options: disabled",
+ "1\.2: .+ resolved, hit count = 2",
+ "1\.3: .+ resolved, hit count = 2"])
if __name__ == '__main__':
Modified: lldb/trunk/test/breakpoint_locations/main.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/breakpoint_locations/main.c?rev=115216&r1=115215&r2=115216&view=diff
==============================================================================
--- lldb/trunk/test/breakpoint_locations/main.c (original)
+++ lldb/trunk/test/breakpoint_locations/main.c Thu Sep 30 17:11:33 2010
@@ -1,6 +1,6 @@
#include <stdio.h>
-#define INLINE_ME __inline__ __attribute__((always_inline))
+#define INLINE inline __attribute__((always_inline))
int
func_not_inlined (void)
@@ -9,7 +9,7 @@
return 0;
}
-INLINE_ME int
+INLINE int
func_inlined (void)
{
static int func_inline_call_count = 0;
@@ -19,6 +19,8 @@
return func_inline_call_count;
}
+extern int func_inlined (void);
+
int
main (int argc, char **argv)
{
More information about the lldb-commits
mailing list