tests: normalize names of files and more
[babeltrace.git] / tests / data / plugins / flt.lttng-utils.debug-info / README.md
index 6d20c5cb2c787bfbb2165b1bab81b49a5bed9ebc..177ba57259094aea8d5000f05e48c0f3c309443f 100644 (file)
@@ -8,12 +8,12 @@ files used to generate them.
 
 The generated files are:
 
-* `ARCH/dwarf_full/libhello_so` (ELF and DWARF)
-* `ARCH/elf_only/libhello_so` (ELF only)
-* `ARCH/build_id/libhello_so` (ELF with separate DWARF via build ID)
-* `ARCH/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug` (DWARF for build ID)
-* `ARCH/debug_link/libhello_so` (ELF with separate DWARF via debug link)
-* `ARCH/debug_link/libhello_so.debug` (DWARF for debug link)
+* `ARCH/dwarf-full/libhello-so` (ELF and DWARF)
+* `ARCH/elf-only/libhello-so` (ELF only)
+* `ARCH/build-id/libhello-so` (ELF with separate DWARF via build ID)
+* `ARCH/build-id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug` (DWARF for build ID)
+* `ARCH/debug_link/libhello-so` (ELF with separate DWARF via debug link)
+* `ARCH/debug_link/libhello-so.debug` (DWARF for debug link)
 
 We use a suffix of "_so" instead of ".so" since some distributions
 build systems will consider ".so" files as artifacts from a previous
@@ -40,28 +40,28 @@ To regenerate them, you can use the included Makefile or follow these steps:
     $ build_id_prefix=cd
     $ build_id_suffix=d98cdd87f7fe64c13b6daad553987eafd40cbb
     $ build_id="$build_id_prefix$build_id_suffix"
-    $ mkdir dwarf_full
-    $ gcc -shared -g -llttng-ust -ldl -Wl,-soname,libhello.so -Wl,--build-id=0x$build_id -o dwarf_full/libhello_so tp.o libhello.o
+    $ mkdir dwarf-full
+    $ gcc -shared -g -llttng-ust -ldl -Wl,-soname,libhello.so -Wl,--build-id=0x$build_id -o dwarf-full/libhello-so tp.o libhello.o
 
 ## ELF only
 
-    $ mkdir elf_only
-    $ objcopy -g dwarf_full/libhello_so elf_only/libhello_so
-    $ objcopy --remove-section=.note.gnu.build-id elf_only/libhello_so
+    $ mkdir elf-only
+    $ objcopy -g dwarf-full/libhello-so elf-only/libhello-so
+    $ objcopy --remove-section=.note.gnu.build-id elf-only/libhello-so
 
 ## ELF and DWARF with Build ID
 
-    $ mkdir -p build_id/.build-id/$build_id_prefix
-    $ objcopy --only-keep-debug dwarf_full/libhello_so build_id/.build-id/$build_id_prefix/$build_id_suffix.debug
-    $ objcopy -g dwarf_full/libhello_so build_id/libhello_so
+    $ mkdir -p build-id/.build-id/$build_id_prefix
+    $ objcopy --only-keep-debug dwarf-full/libhello-so build-id/.build-id/$build_id_prefix/$build_id_suffix.debug
+    $ objcopy -g dwarf-full/libhello-so build-id/libhello-so
 
 ##  ELF and DWARF with Debug Link
 
     $ mkdir debug_link
-    $ objcopy --remove-section=.note.gnu.build-id dwarf_full/libhello_so debug_link/libhello_so
-    $ objcopy --only-keep-debug debug_link/libhello_so debug_link/libhello_so.debug
-    $ objcopy -g debug_link/libhello_so
-    $ cd debug_link && objcopy --add-gnu-debuglink=libhello_so.debug libhello_so && cd ..
+    $ objcopy --remove-section=.note.gnu.build-id dwarf-full/libhello-so debug_link/libhello-so
+    $ objcopy --only-keep-debug debug_link/libhello-so debug_link/libhello-so.debug
+    $ objcopy -g debug_link/libhello-so
+    $ cd debug_link && objcopy --add-gnu-debuglink=libhello-so.debug libhello-so && cd ..
 
 
 Test program
@@ -72,25 +72,25 @@ to do the debug-info resolution. You can generate such trace by following these
 steps:
 
 1. Compile the example binary:
-    $ ln -s x86_64-linux-gnu/dwarf_full/libhello_so libhello.so
+    $ ln -s x86-64-linux-gnu/dwarf-full/libhello-so libhello.so
     $ gcc -I. -o debug_info_app main.c -L. -lhello -llttng-ust -ldl -Wl,--rpath=.
 
 2. In order to have paths to binary and shared objects that are not relative
    to the file system they were built on, we used a simple trick of copying
    the following files to the root directory ('/') like this:
 
-    $ sudo cp x86_64-linux-gnu/dwarf_full/libhello_so /libhello_so
+    $ sudo cp x86-64-linux-gnu/dwarf-full/libhello-so /libhello-so
     $ sudo cp ./debug_info_app /
 
-3. Create symbolic link to the `/libhello_so` file with the `/libhello.so` name.
-    $ sudo ln -s /libhello_so /libhello.so
+3. Create symbolic link to the `/libhello-so` file with the `/libhello.so` name.
+    $ sudo ln -s /libhello-so /libhello.so
 
 4. Create the LTTng tracing session using the following commands:
     $ cd /
     $ sudo lttng create
     $ sudo lttng add-context -u -t vpid -t ip
     $ sudo lttng enable-event -u my_provider:my_first_tracepoint
-    $ sudo lttng enable-event -u lttng_ust_statedump:bin_info --filter='path=="/libhello_so"'
+    $ sudo lttng enable-event -u lttng_ust_statedump:bin_info --filter='path=="/libhello-so"'
     $ sudo lttng enable-event -u lttng_ust_statedump:bin_info --filter='path=="[linux-vdso.so.1]"'
     $ sudo lttng start
     $ sudo /debug_info_app
@@ -100,9 +100,9 @@ steps:
 
 When running babeltrace with the `--debug-info-target-prefix` option or
 `target-prefix` component paramater set to the directory containing the right
-`libhello_so` file. In the example used above, the `libhello_so` file is in the
-`x86_64-linux-gnu/dwarf_full/` directory.
+`libhello-so` file. In the example used above, the `libhello-so` file is in the
+`x86-64-linux-gnu/dwarf-full/` directory.
 In the printed trace, the `my_provider:my_first_tracepoint` events should
 contain information similar to this:
 
-    debug_info = { bin = "libhello_so+0x2349", func = "foo+0xd2", src = "libhello.c:35" }
+    debug_info = { bin = "libhello-so+0x2349", func = "foo+0xd2", src = "libhello.c:35" }
This page took 0.025663 seconds and 4 git commands to generate.