File tree Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 692077b6431460b96beb0ccf4f38299618d51db2
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5
- refs/heads/try: f693f267c71a79c0c9bb723dd39ad14634ea4502
5
+ refs/heads/try: 9513a4b046055d991ec27c30c0d3f6cf0f1dc40b
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -82,8 +82,6 @@ def execute_command(command_interpreter, command):
82
82
if res .HasResult ():
83
83
print (normalize_whitespace (res .GetOutput ()), end = '\n ' )
84
84
85
- time .sleep (0.2 )
86
-
87
85
# If the command introduced any breakpoints, make sure to register them with the breakpoint
88
86
# callback
89
87
while len (new_breakpoints ) > 0 :
@@ -114,18 +112,18 @@ def start_breakpoint_listener(target):
114
112
def listen ():
115
113
print_debug ("Started listening..." )
116
114
event = lldb .SBEvent ()
117
- wait_count = 0
115
+ listening_start_time_secs = time .clock ()
116
+ MAX_LISTENING_TIME_SECS = 10
118
117
try :
119
- while wait_count < 5 :
118
+ while time . clock () < ( listening_start_time_secs + MAX_LISTENING_TIME_SECS ) :
120
119
if listener .WaitForEvent (1 , event ):
121
120
if lldb .SBBreakpoint .EventIsBreakpointEvent (event ) and \
122
121
lldb .SBBreakpoint .GetBreakpointEventTypeFromEvent (event ) == \
123
122
lldb .eBreakpointEventTypeAdded :
124
123
global new_breakpoints
125
124
breakpoint = lldb .SBBreakpoint .GetBreakpointFromEvent (event )
126
125
print_debug ("breakpoint added (not really...), id = " + str (breakpoint .id ))
127
- # new_breakpoints.append(breakpoint.id)
128
- wait_count += 1
126
+ new_breakpoints .append (breakpoint .id )
129
127
except :
130
128
print_debug ("breakpoint listener shutting down" )
131
129
Original file line number Diff line number Diff line change @@ -1055,10 +1055,21 @@ fn link_rlib<'a>(sess: &'a Session,
1055
1055
let bc_deflated = obj_filename. with_extension ( "bytecode.deflate" ) ;
1056
1056
match fs:: File :: open ( & bc) . read_to_end ( ) . and_then ( |data| {
1057
1057
fs:: File :: create ( & bc_deflated)
1058
- . write ( match flate:: deflate_bytes ( data. as_slice ( ) ) {
1059
- Some ( compressed) => compressed,
1060
- None => sess. fatal ( "failed to compress bytecode" )
1061
- } . as_slice ( ) )
1058
+ . write ( {
1059
+ let compressed = match flate:: deflate_bytes ( data. as_slice ( ) ) {
1060
+ Some ( compressed) => compressed,
1061
+ None => sess. fatal ( "failed to compress bytecode" )
1062
+ } ;
1063
+
1064
+ let mut data_copy: Vec < u8 > = Vec :: with_capacity ( compressed. as_slice ( ) . len ( ) + 1 ) ;
1065
+ data_copy. push_all ( compressed. as_slice ( ) ) ;
1066
+
1067
+ if compressed. as_slice ( ) . len ( ) % 2 != 0 {
1068
+ data_copy. push ( 0u8 ) ;
1069
+ }
1070
+
1071
+ data_copy
1072
+ } . as_slice ( ) )
1062
1073
} ) {
1063
1074
Ok ( ( ) ) => { }
1064
1075
Err ( e) => {
You can’t perform that action at this time.
0 commit comments