From 5c101c9efbb0f7ef0aae37a43f746e1466c669ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 12 Jul 2013 07:48:22 +0100 Subject: [PATCH] Aggregate all info on debugging into a single place. --- BUGS.markdown | 7 ++++++- README.markdown | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/BUGS.markdown b/BUGS.markdown index 56049c1..d8258a7 100644 --- a/BUGS.markdown +++ b/BUGS.markdown @@ -176,7 +176,8 @@ Linux/MacOSX ------------ Please rebuild apitrace with debugging information, by passing -`-DCMAKE_BUILD_TYPE=Debug` to cmake. +`-DCMAKE_BUILD_TYPE=Debug` to cmake, or editing its value in `CMakeCache.txt` +and rebuilding. To obtain a stack back-trace, run the application with gdb from a terminal: @@ -185,6 +186,10 @@ To obtain a stack back-trace, run the application with gdb from a terminal: ... (gdb) bt +On Linux, to trace an application inside gdb the `LD_PRELOAD` environment +variable should be set from within gdb like: + + gdb --ex 'set exec-wrapper env LD_PRELOAD=/path/to/glxtrace.so' --args application arg1 ... See also more detailed and Distro specific instructions: diff --git a/README.markdown b/README.markdown index 5f97d87..f699914 100644 --- a/README.markdown +++ b/README.markdown @@ -145,10 +145,6 @@ If you are an application developer, you can avoid this either by linking with See the `ld.so` man page for more information about `LD_PRELOAD` and `LD_LIBRARY_PATH` environment flags. -To trace the application inside gdb, invoke gdb as: - - gdb --ex 'set exec-wrapper env LD_PRELOAD=/path/to/glxtrace.so' --args /path/to/application - ### Android ### To trace standalone native OpenGL ES applications, use -- 2.43.0