@@ -249,53 +249,10 @@ void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack)
249
249
#define SIGRETURN_FRAME_OFFSET 23
250
250
#endif
251
251
252
- #if defined(__alpha__ ) && defined(__GNUC__ )
253
- /*
254
- The only way to backtrace without a symbol table on alpha
255
- is to find stq fp,N(sp), and the first byte
256
- of the instruction opcode will give us the value of N. From this
257
- we can find where the old value of fp is stored
258
- */
259
-
260
- #define MAX_INSTR_IN_FUNC 10000
261
-
262
- inline uchar * * find_prev_fp (uint32 * pc , uchar * * fp )
263
- {
264
- int i ;
265
- for (i = 0 ; i < MAX_INSTR_IN_FUNC ; ++ i ,-- pc )
266
- {
267
- uchar * p = (uchar * )pc ;
268
- if (p [2 ] == 222 && p [3 ] == 35 )
269
- {
270
- return (uchar * * )((uchar * )fp - * (short int * )p );
271
- }
272
- }
273
- return 0 ;
274
- }
275
-
276
- inline uint32 * find_prev_pc (uint32 * pc , uchar * * fp )
277
- {
278
- int i ;
279
- for (i = 0 ; i < MAX_INSTR_IN_FUNC ; ++ i ,-- pc )
280
- {
281
- char * p = (char * )pc ;
282
- if (p [1 ] == 0 && p [2 ] == 94 && p [3 ] == -73 )
283
- {
284
- uint32 * prev_pc = (uint32 * )* ((fp + p [0 ]/sizeof (fp )));
285
- return prev_pc ;
286
- }
287
- }
288
- return 0 ;
289
- }
290
- #endif /* defined(__alpha__) && defined(__GNUC__) */
291
-
292
252
void my_print_stacktrace (uchar * stack_bottom , ulong thread_stack )
293
253
{
294
254
uchar * * fp ;
295
255
uint frame_count = 0 , sigreturn_frame_count ;
296
- #if defined(__alpha__ ) && defined(__GNUC__ )
297
- uint32 * pc ;
298
- #endif
299
256
LINT_INIT (fp );
300
257
301
258
@@ -308,11 +265,6 @@ void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack)
308
265
__asm __volatile__ ("movq %%rbp,%0"
309
266
:"=r" (fp )
310
267
:"r" (fp ));
311
- #endif
312
- #if defined(__alpha__ ) && defined(__GNUC__ )
313
- __asm __volatile__ ("mov $30,%0"
314
- :"=r" (fp )
315
- :"r" (fp ));
316
268
#endif
317
269
if (!fp )
318
270
{
@@ -342,17 +294,6 @@ void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack)
342
294
343
295
my_safe_printf_stderr ("%s" ,
344
296
"Stack range sanity check OK, backtrace follows:\n" );
345
- #if defined(__alpha__ ) && defined(__GNUC__ )
346
- my_safe_printf_stderr ("%s" ,
347
- "Warning: Alpha stacks are difficult -"
348
- "will be taking some wild guesses, stack trace may be incorrect or "
349
- "terminate abruptly\n" );
350
-
351
- /* On Alpha, we need to get pc */
352
- __asm __volatile__ ("bsr %0, do_next; do_next: "
353
- :"=r" (pc )
354
- :"r" (pc ));
355
- #endif /* __alpha__ */
356
297
357
298
/* We are 1 frame above signal frame with NPTL and 2 frames above with LT */
358
299
sigreturn_frame_count = thd_lib_detected == THD_LIB_LT ? 2 : 1 ;
@@ -366,32 +307,6 @@ void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack)
366
307
* (fp + SIGRETURN_FRAME_OFFSET ) : * (fp + 1 ));
367
308
#endif /* defined(__386__) || defined(__x86_64__) */
368
309
369
- #if defined(__alpha__ ) && defined(__GNUC__ )
370
- uchar * * new_fp = find_prev_fp (pc , fp );
371
- if (frame_count == sigreturn_frame_count - 1 )
372
- {
373
- new_fp += 90 ;
374
- }
375
-
376
- if (fp && pc )
377
- {
378
- pc = find_prev_pc (pc , fp );
379
- if (pc )
380
- my_safe_printf_stderr ("%p\n" , pc );
381
- else
382
- {
383
- my_safe_printf_stderr ("%s" ,
384
- "Not smart enough to deal with the rest of this stack\n" );
385
- goto end ;
386
- }
387
- }
388
- else
389
- {
390
- my_safe_printf_stderr ("%s" ,
391
- "Not smart enough to deal with the rest of this stack\n" );
392
- goto end ;
393
- }
394
- #endif /* defined(__alpha__) && defined(__GNUC__) */
395
310
if (new_fp <= fp )
396
311
{
397
312
my_safe_printf_stderr ("New value of fp=%p failed sanity check, "
0 commit comments