Changeset d870df3 for libcfa/src
- Timestamp:
- Mar 2, 2020, 9:34:08 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3d78a58, 4f0534f
- Parents:
- 1e2de89
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/interpose.cfa
r1e2de89 rd870df3 10 10 // Created On : Wed Mar 29 16:10:31 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Feb 17 10:18:53202013 // Update Count : 1 6612 // Last Modified On : Mon Mar 2 17:37:00 2020 13 // Update Count : 176 14 14 // 15 15 … … 143 143 void abort( const char fmt[], ... ) __attribute__(( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ )); 144 144 void abort( bool signalAbort, const char fmt[], ... ) __attribute__(( format(printf, 2, 3), __nothrow__, __leaf__, __noreturn__ )); 145 void __abort( bool signalAbort, const char fmt[], va_list args ) __attribute__(( __nothrow__, __leaf__, __noreturn__ )); 145 146 146 147 extern "C" { … … 152 153 va_list argp; 153 154 va_start( argp, fmt ); 154 abort( false, fmt, argp );155 __abort( false, fmt, argp ); 155 156 va_end( argp ); 156 157 } … … 218 219 } 219 220 220 void abort( bool signalAbort, const char fmt[], ... ) { 221 // Cannot forward va_list. 222 void __abort( bool signalAbort, const char fmt[], va_list args ) { 221 223 void * kernel_data = kernel_abort(); // must be done here to lock down kernel 222 224 int len; … … 228 230 229 231 assert( fmt ); 230 va_list args;231 va_start( args, fmt );232 233 232 len = vsnprintf( abort_text, abort_text_size, fmt, args ); 234 va_end( args );235 233 __cfaabi_bits_write( STDERR_FILENO, abort_text, len ); 236 234 … … 248 246 va_list args; 249 247 va_start( args, fmt ); 250 abort( false, fmt, args ); 248 __abort( false, fmt, args ); 249 // CONTROL NEVER REACHES HERE! 251 250 va_end( args ); 251 } 252 253 void abort( bool signalAbort, const char fmt[], ... ) { 254 va_list args; 255 va_start( args, fmt ); 256 __abort( signalAbort, fmt, args ); 257 // CONTROL NEVER REACHES HERE! 258 va_end( args ); 252 259 } 253 260
Note: See TracChangeset
for help on using the changeset viewer.