Fix: lttng: placing probe on symbol starting with `_`
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 17 Jan 2020 17:45:51 +0000 (12:45 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 17 Jan 2020 18:58:43 +0000 (13:58 -0500)
commit88c914274032d1dd1e51bbb4b5cf67e8217fe533
tree611e134e752c77b96bb47f4e80e880a5436a676c
parent44cdb3a261262ebabea3fb0cae9360ac05e66f2c
Fix: lttng: placing probe on symbol starting with `_`

Issue
=====
The lttng CLI tool does not parse `--probe` symbol name properly if the
name has an underscore at the beginning.
For example, the following command fails
  lttng enable-event -k --probe _do_fork my_do_fork_event

This happens because the `parse_probe_opts()` function looks if the
first character of the symbol field is an alphabetic character to
determine if a symbol was provided. The problem is that some kernel
symbols such as `_do_fork` start with an underscore.

Solution
========
check if the first character is an alphabetic character OR an
underscore.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I3ee6c26641ceee508ee78e895d372c6b09fe90fb
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/enable_events.c
This page took 0.025866 seconds and 5 git commands to generate.