Changeset a736d81


Ignore:
Timestamp:
05/28/15 12:14:39 (9 years ago)
Author:
Hal Finkel <hfinkel@…>
Branches:
master
Children:
14e2ab9
Parents:
69850c8
git-author:
Hal Finkel <hfinkel@…> (05/28/15 12:14:39)
git-committer:
Hal Finkel <hfinkel@…> (05/28/15 12:14:39)
Message:

use backtrace instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • memlog.c

    r69850c8 ra736d81  
    88#include <string.h> 
    99 
     10#include <execinfo.h> 
    1011#include <sys/syscall.h> 
    1112#include <sys/time.h> 
     
    7475  } 
    7576 
     77  void *pcs[1024]; 
     78  int num_pcs = backtrace(pcs, 1024); 
     79  for (int pci = 0; pci < num_pcs; ++pci) { 
     80    unw_word_t pc = (unw_word_t) pcs[pci]; 
     81#if 0 
    7682  while ((r = unw_step(&cursor)) > 0) { 
    7783    unw_word_t pc; 
     
    8187      return; 
    8288    } 
     89#endif 
    8390 
    8491    if (!pc) 
Note: See TracChangeset for help on using the changeset viewer.