linux/tools/lib/bpf
Timo Hunziker c21dc529ba libbpf: Parse usdt args without offset on x86 (e.g. 8@(%rsp))
Parse USDT arguments like "8@(%rsp)" on x86. These are emmited by
SystemTap. The argument syntax is similar to the existing "memory
dereference case" but the offset left out as it's zero (i.e. read
the value from the address in the register). We treat it the same
as the the "memory dereference case", but set the offset to 0.

I've tested that this fixes the "unrecognized arg #N spec: 8@(%rsp).."
error I've run into when attaching to a probe with such an argument.
Attaching and reading the correct argument values works.

Something similar might be needed for the other supported
architectures.

  [0] Closes: https://github.com/libbpf/libbpf/issues/559

Signed-off-by: Timo Hunziker <timo.hunziker@gmx.ch>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221203123746.2160-1-timo.hunziker@eclipso.ch
2022-12-06 16:16:50 -08:00
..
.gitignore libbpf: Make libbpf_version.h non-auto-generated 2021-09-13 15:36:47 -07:00
bpf_core_read.h libbpf: add bpf_core_type_matches() helper macro 2022-07-05 21:15:19 -07:00
bpf_endian.h libbpf: Make bpf_endian co-exist with vmlinux.h 2020-07-01 09:06:12 +02:00
bpf_gen_internal.h Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-10 15:56:13 -08:00
bpf_helpers.h libbpf: Clean up legacy bpf maps declaration in bpf_helpers 2022-09-16 22:56:09 +02:00
bpf_prog_linfo.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
bpf_tracing.h libbpf: Improve BPF_PROG2 macro code quality and description 2022-09-21 17:05:31 -07:00
bpf.c libbpf: Introduce bpf_link_get_fd_by_id_opts() 2022-10-10 16:49:20 -07:00
bpf.h libbpf: Avoid enum forward-declarations in public API in C++ mode 2022-11-30 22:56:47 +01:00
btf_dump.c libbpf: Ignore hashmap__find() result explicitly in btf_dump 2022-11-18 23:13:38 +01:00
btf.c libbpf: checkpatch: Fixed code alignments in btf.c 2022-11-14 11:42:53 -08:00
btf.h libbpf: Don't require full struct enum64 in UAPI headers 2022-09-27 20:45:17 +02:00
Build libbpf: move xsk.{c,h} into selftests/bpf 2022-06-28 13:13:32 -07:00
gen_loader.c libbpf: fix an snprintf() overflow check 2022-07-19 10:47:31 -07:00
hashmap.c libbpf: Hashmap interface update to allow both long and void* keys/values 2022-11-09 20:45:14 -08:00
hashmap.h libbpf: Hashmap.h update to fix build issues using LLVM14 2022-11-11 10:24:23 -08:00
libbpf_common.h libbpf: cleanup LIBBPF_DEPRECATED_SINCE supporting macros for v0.x 2022-06-28 13:13:33 -07:00
libbpf_errno.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
libbpf_internal.h libbpf: Making bpf_prog_load() ignore name if kernel doesn't support 2022-08-15 14:58:20 -07:00
libbpf_legacy.h libbpf: Clean up deprecated and legacy aliases 2022-08-17 22:42:56 +02:00
libbpf_probes.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
libbpf_version.h bpf: Add libbpf logic for user-space ring buffer 2022-09-21 16:25:03 -07:00
libbpf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
libbpf.h libbpf: restore memory layout of bpf_object_open_opts 2022-09-23 16:19:37 -07:00
libbpf.map libbpf: Introduce bpf_link_get_fd_by_id_opts() 2022-10-10 16:49:20 -07:00
libbpf.pc.template libbpf: Add zlib as a dependency in pkg-config template 2019-12-16 14:55:29 -08:00
linker.c libbpf: Add enum64 support for bpf linking 2022-06-07 10:20:43 -07:00
Makefile libbpf: Improve usability of libbpf Makefile 2022-12-02 16:30:34 -08:00
netlink.c libbpf: Streamline bpf_attr and perf_event_attr initialization 2022-08-17 22:42:10 +02:00
nlattr.c libbpf: Fix overrun in netlink attribute iteration 2022-09-30 15:16:22 -07:00
nlattr.h libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
relo_core.c bpf: Correctly propagate errors up from bpf_core_composites_match 2022-07-08 15:31:43 -07:00
relo_core.h bpf, libbpf: Add type match support 2022-07-05 21:14:25 -07:00
ringbuf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
skel_internal.h libbpf: add map_get_fd_by_id and map_delete_elem in light skeleton 2022-08-25 18:52:29 -07:00
str_error.c libbpf: Poison kernel-only integer types 2020-01-10 10:38:00 -08:00
str_error.h
strset.c libbpf: Hashmap interface update to allow both long and void* keys/values 2022-11-09 20:45:14 -08:00
strset.h libbpf: Extract internal set-of-strings datastructure APIs 2021-03-18 16:14:22 -07:00
usdt.bpf.h libbpf: Ensure functions with always_inline attribute are inline 2022-08-04 14:43:41 -07:00
usdt.c libbpf: Parse usdt args without offset on x86 (e.g. 8@(%rsp)) 2022-12-06 16:16:50 -08:00