On 21.04.2011 08:14, John McCabe-Dansted wrote:
> On Thu, Apr 21, 2011 at 1:49 PM, Liviu Andronic <landronim...@gmail.com> 
> wrote:
>> On Thu, Apr 21, 2011 at 7:45 AM, John McCabe-Dansted <gma...@gmail.com> 
>> wrote:
>>> I thought gdb only works for gcc compiled binaries (not e.g. MSVC).
>>> Are we using gcc to compile the Windows binaries?
>>>
>> I'm not familiar with these details. I would guess LyX is built with
>> MSVC. How would one get to debug these binaries?
>> Liviu
> 
> Possibly part of the MSVC debugger is redistributable?
> 
> I was trying to get a backtrace handler into LyX, but it is hard
> enough trying to get something that works cleanly across multiple
> versions of Ubuntu let alone Windows and Linux. Apparently there is a
> qcrashhandler [1] proposed for inclusion in Qt. Perhaps I could get
> this feature in 2.1.x, using qcrashhandler as the backend.
> 

Recently I added a function which gets the call stack on request:
http://www.lyx.org/trac/changeset/38334/

It's not that pretty as a gdb backtrace,

rkrug@ecolmod:~/source/lyx-2.0.0rc3$ lyx-2.0.0rc3
[LyX's bt]: (0) lyx-2.0.0rc3(_Z14printCallstackv+0x22) [0x87a5272]
[LyX's bt]: (1) lyx-2.0.0rc3(_ZN3lyx7support7packageEv+0x1d) [0x87a52ed]
[LyX's bt]: (2) lyx-2.0.0rc3(_ZN3lyx7support11makeAbsPathERKSsS2_+0x208) 
[0x8791418]
[LyX's bt]: (3) lyx-2.0.0rc3() [0x87a799c]
[LyX's bt]: (4) 
lyx-2.0.0rc3(_ZN3lyx7support7PackageC1ERKSsS3_S3_NS0_30exe_build_dir_to_top_build_dirE+0x182)
 [0x87a9e82]
[LyX's bt]: (5) 
lyx-2.0.0rc3(_ZN3lyx7support12init_packageERKSsS2_S2_NS0_30exe_build_dir_to_top_build_dirE+0x31)
 [0x87ab7e1]
[LyX's bt]: (6) lyx-2.0.0rc3(_ZN3lyx3LyX4execERiPPc+0x4b) [0x834a28b]
[LyX's bt]: (7) lyx-2.0.0rc3(main+0x4c) [0x81d70ec]
[LyX's bt]: (8) /lib/libc.so.6(__libc_start_main+0xe7) [0x254ce7]
[LyX's bt]: (9) lyx-2.0.0rc3() [0x81d6fd1]

but maybe we should also build with symbols in released code and add a crash
report dialog which uploads somewhere the back trace after a simple "OK" click 
by the user.

Peter

Reply via email to