On 13.08.19 00:10, Benedict Holland wrote:
You probably need to compile lyx though. I assume that Lyx uses the O2
flag for production builds so while error messages and logs are a huge
help (minimum working example is the best), unless you can compile
with the O0 flag for gcc, gdb will just return a mess.
The good news is that you mostly dont need to worry about gdb. The bad
news is that you need to learn a gui for gdb (there are many and
eclipse works really well but there is a dedicated ide called
something like IntelliCode or something and I really loved that one).
Basically, gdb is for stepping through code. I would not recommend it
for most users but it teach you a lot about programming if that is
something that interests you.
Thanks,
~Ben
On Mon, Aug 12, 2019, 2:38 PM Joel Kulesza <jkule...@gmail.com
<mailto:jkule...@gmail.com>> wrote:
On Mon, Aug 12, 2019 at 9:27 AM Helge Hafting
<helge.haft...@ntnu.no <mailto:helge.haft...@ntnu.no>> wrote:
Den 12.08.2019 08:42, skrev Wolfgang Engelmann:
> It was recommended to use gdb for tracking errors in LyX. I
don't
> understand, how to get infos from it. The --help mentions
data (for
> examining), stack (for examining stacks), and tracepoints
(without
> stopping the texting). What would I use, and how, if I want
to get
> infos out of the command?
gdb is a debugger, and is useful mostly for the programmers
that fix
problems in LyX. If you are not a programmer, then you may
still be able
to use gdb to provide some useful information for the
programmer that is
trying to solve your particular problem. Usually, the
programmer trying
to figure out your problem can help you with the use of gdb in
that
specific case.
A common case is to use gdb to find the position of an unexpected
program crash in the source code. (LyX is not supposed to
crash at all
under normal use.)
In this case, instead of issuing the command "lyx myfile.lyx",
you do this:
gdb lyx
[gdb prints some lines of output in your terminal]
(gdb) run myfile.lyx
[gdb prints more lines in the terminal, and a lyx window appear.]
Do whatever you need to do to get the unwanted program crash
[gdb prints some more info, then you issue the "bt" command to
get a
backtrace]
(gdb) bt
[gdb prints the call chain up to the crashing function. This
information
is very useful for a developer trying to figure out the problem.]
After this, copy all the text gdp printed into a mail message
to the
developer helping you - or send it to this list. Also write
exactly what
you did to get the crash. (Menu choices, typing, ...)
Helge,
This is a nice summary. Is it something to add to the LyX wiki?
Thanks,
Joel
Thanks all for these infos. If I should have a crash, I will try to
follow your suggestions.
Wolfgang