Rony, thanks. I've added a how-to-debug section to our Wiki at
https://sourceforge.net/p/oorexx/wiki
On Thu, Oct 19, 2017 at 4:38 PM, Rony G. Flatscher <rony.flatsc...@wu.ac.at>
wrote:
> In the case that it becomes necessary for bug reports to supply stack
> traces on Linux, I learned from Moritz how to proceed to get them:
>
> build$ cmake ../ooRexx-repo -DCMAKE_BUILD_TYPE=Debug
> build$ make -j8
> build$ gdb /path/to/oorexx-build/bin/rexx
> > r main.rex
> ... wait until problem appears...
> ... Hit Ctrl+C
> > info threads
> ... outputs where each thread is
> > thread apply all backtrace
> ... outputs backtrace for all threads
> > thread apply all backtrace full
> ... also outputs local variables
>
> To enable logging before anything in gdb:
> > set logging file my_log_file.txt
> > set logging on
>
> ---
>
> Here is a howto from my notes on 64-bit Ubuntu following the above
> directions, but also showing how to get packages that may be needed for
> building the debug version of ooRexx on Linux:
>
> - make sure you have CMake (just enter "cmake") otherwise
> - sudo apt install cmake
>
> - make sure you have the ncurses for development installed,
> otherwise install it:
> - sudo apt-get install libncurses5-dev libncursesw5-dev
>
>
> - setup a repository for the oorexx source, e.g.
> - mkdir ooRexx_repo
> - cd ooRexx_repo
> - svn checkout https://svn.code.sf.net/p/oorexx/code-0/main/trunk .
> - cd ..
>
> - setup a working directory, create a debug version of the ooRexx
> interpreter
> - mkdir build
> - cd build
> - cmake ../ooRexx-repo/ -DCMAKE_BUILD_TYPE=Debug
> - make -j8
>
> - start "rexx" via "gdb" (from within the "build" directory)
> - PATH=bin:$PATH gdb bin/rexx
> - (gdb) r some_rexx_program.rex
> - wait until a crash or hang, ctl-c to interrupt
> - (gdb) set logging file my_stacktrace.txt
> - (gdb) set logging on
> - (gdb) info threads
> - (gdb) thread apply all backtrace
> - (gdb) set logging of
>
> - (gdb) set logging file my_stacktrace_with_vars.txt
> - (gdb) set logging on
> - (gdb) thread apply all backtrace full
> - (gdb) set logging of
>
> Many thanks to Moritz for having shared this!
> ---rony
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel