/
usr
/
share
/
systemtap
/
runtime
/
dyninst
/
/usr/share/systemtap/runtime/dyninst
mkdir
upload
Name
Size
Mode
Actions
addr-map.c
565
0644
edit
dl
rm
alloc.c
1188
0644
edit
dl
rm
arith.c
2291
0644
edit
dl
rm
common_session_state.h
6921
0644
edit
dl
rm
copy.c
4095
0644
edit
dl
rm
debug.h
413
0644
edit
dl
rm
ilog2.h
2943
0644
edit
dl
rm
io.c
4541
0644
edit
dl
rm
linux_defs.h
5602
0644
edit
dl
rm
linux_hash.h
1877
0644
edit
dl
rm
linux_types.h
654
0644
edit
dl
rm
loc2c-runtime.h
2494
0644
edit
dl
rm
map_list.h
1059
0644
edit
dl
rm
map_runtime.h
5160
0644
edit
dl
rm
namespaces.h
0
0644
edit
dl
rm
offptr.h
4788
0644
edit
dl
rm
offset_list.h
4428
0644
edit
dl
rm
perf.c
0
0644
edit
dl
rm
print.c
2700
0644
edit
dl
rm
probe_lock.h
1849
0644
edit
dl
rm
regs.c
2557
0644
edit
dl
rm
runtime.h
10292
0644
edit
dl
rm
runtime_context.h
6556
0644
edit
dl
rm
runtime_defines.h
280
0644
edit
dl
rm
session_attributes.c
1717
0644
edit
dl
rm
session_attributes.h
772
0644
edit
dl
rm
shm.c
6171
0644
edit
dl
rm
stapdyn.h
4617
0644
edit
dl
rm
stat_runtime.h
1832
0644
edit
dl
rm
sym.c
1621
0644
edit
dl
rm
task_finder.c
0
0644
edit
dl
rm
timer.c
2770
0644
edit
dl
rm
transport.c
31128
0644
edit
dl
rm
transport.h
3968
0644
edit
dl
rm
unwind.c
0
0644
edit
dl
rm
uprobes-regs.c
3163
0644
edit
dl
rm
uprobes.c
1798
0644
edit
dl
rm
uprobes.h
953
0644
edit
dl
rm
Edit:
/usr/share/systemtap/runtime/dyninst/regs.c
(2557B)
/* -*- linux-c -*- * Functions to access the members of pt_regs struct * Copyright (C) 2012-2019 Red Hat Inc. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General * Public License (GPL); either version 2, or (at your option) any * later version. */ #ifndef _DYNINST_REGS_C_ #define _DYNINST_REGS_C_ // NB: these differ from kernel mode because there's no access // to eflags, segment, or cr registers. #if defined (__x86_64__) #define EREG(nm, regs) ((regs)->r##nm) #define RREG(nm, regs) ((regs)->r##nm) static void _stp_print_regs(struct pt_regs * regs) { _stp_printf("RIP: %016lx\nRSP: %016lx\n", RREG(ip, regs), RREG(sp, regs)); _stp_printf("RAX: %016lx RBX: %016lx RCX: %016lx\n", RREG(ax, regs), RREG(bx, regs), RREG(cx, regs)); _stp_printf("RDX: %016lx RSI: %016lx RDI: %016lx\n", RREG(dx, regs), RREG(si, regs), RREG(di, regs)); _stp_printf("RBP: %016lx R08: %016lx R09: %016lx\n", RREG(bp, regs), regs->r8, regs->r9); _stp_printf("R10: %016lx R11: %016lx R12: %016lx\n", regs->r10, regs->r11, regs->r12); _stp_printf("R13: %016lx R14: %016lx R15: %016lx\n", regs->r13, regs->r14, regs->r15); } #elif defined (__i386__) #define EREG(nm, regs) ((regs)->e##nm) #define XREG(nm, regs) ((regs)->x##nm) /** Write the registers to a string. * @param regs The pt_regs saved by the kprobe. * @note i386 and x86_64 only so far. */ static void _stp_print_regs(struct pt_regs * regs) { _stp_printf ("EIP: %08lx\n", EREG(ip, regs)); _stp_printf ("ESP: %08lx\n", EREG(sp, regs)); _stp_printf ("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", EREG(ax, regs), EREG(bx, regs), EREG(cx, regs), EREG(dx, regs)); _stp_printf ("ESI: %08lx EDI: %08lx EBP: %08lx\n", EREG(si, regs), EREG(di, regs), EREG(bp, regs)); } #elif defined(__powerpc__) || defined(__powerpc64__) static void _stp_print_regs(struct pt_regs * regs) { int i; _stp_printf("NIP: %016lX", regs->nip); for (i = 0; i < 32; i++) { if ((i % 4) == 0) { _stp_printf("\n GPR%02d: ", i); } _stp_printf("%016lX ", regs->gpr[i]); } _stp_printf("\n"); } #elif defined (__aarch64__) static void _stp_print_regs(struct pt_regs * regs) { int i; _stp_printf("pc : [<%016llx>] pstate: %08llx\n", regs->pc, regs->pstate); _stp_printf("sp : %016llx\n", regs->sp); for (i = 29; i >= 0; i--) { _stp_printf("x%-2d: %016llx ", i, regs->regs[i]); if (i % 2 == 0) _stp_printf("\n"); } _stp_printf("\n"); } #endif #endif /* _DYNINST_REGS_C_ */
Save
cmd:
run