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>
Wed, 22 Jan 2020 17:00:39 +0000 (12:00 -0500)
commit18f547860a432835e56e3f18464a0c6e8a81a811
tree60239529434c447944df2191535a7044ebc046b8
parente1d64b5c248be1da1734357816e029527d6a2cce
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.024556 seconds and 4 git commands to generate.