MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / stack_pc_getlist

Function stack_pc_getlist

util/walkback.c:818–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

816******************************************************************************/
817
818int /* rcode */
819 stack_pc_getlist(
820 ucontext_t *context, /* or NULL for current context */
821 void **pcArray, /* output array of program counters */
822 unsigned pcArraySize, /* number of elements in pcArray */
823 unsigned *pcOutCount /* number of program counters returned */
824 )
825{
826
827 struct pclist_add_arg_t arg;
828 int rcode = ENOIMPL, stackmin;
829
830 arg.pcArray = pcArray;
831 arg.pcMaxCount = pcArraySize;
832 arg.pcOutCount = 0;
833
834 if (gbl_walkback_enabled) {
835 rcode = stack_pc_walkback(context, pcArraySize, pclist_add, &arg);
836 }
837
838 *pcOutCount = arg.pcOutCount;
839
840 stackmin = pcArraySize < arg.pcOutCount ? pcArraySize : arg.pcOutCount;
841 trace_pc_getlist(pcArray, stackmin, stderr);
842 return rcode;
843} /* end of stack_pc_getlist() */
844
845#define MAXFRAMES 100
846

Callers 13

bdb_get_writelock_intFunction · 0.85
bdb_get_readlockFunction · 0.85
new_thread_lock_infoFunction · 0.85
get_stack_framesFunction · 0.85
__txn_track_stack_infoFunction · 0.85
stack_meFunction · 0.85
__db_cursor_intFunction · 0.85
__db_cursor_ser_ppFunction · 0.85
__db_get_ppFunction · 0.85
comdb2_cheapstackFunction · 0.85
thread_add_resourceFunction · 0.85

Calls 2

stack_pc_walkbackFunction · 0.85
trace_pc_getlistFunction · 0.85

Tested by

no test coverage detected