here is a first patch implementing the methods from backtrace-mingw
<http://code.google.com/p/backtrace-mingw/>. it is a single file, quite
easy to follow.

to try it:
- apply the patch.
- simulate a crash somewhere (for example with int* x=0; *x=2; in the hub 
constructor).
- compile.
- run: strip --only-keep-debug DCPlusPlus.exe -o DCPlusPlus.pdb
- run: strip DCPlusPlus.exe
- run the program, open a hub window and get it to crash; an ErrorLog.txt file 
will be generated at PATH_USER_LOCAL.

possible points of contention:

1) backtrace-mingw is under a BSD license, meaning we have to distribute
a license file for it along with the prog (similar to license-geoip,
license-openssl).

2) it relies on the bfd, iberty and imagehlp libs. these are available
in a default mingw install on Windows, but may not be provided by cross-
compiler packages on Linux (haven't checked); for example, the
Cygwin->MinGW cross-compiler doesn't have them.

3) distribution of debug symbols: the method above extracts them into a .pdb 
file that i thought could be optionally distributed. but looking back into 
pre-mingw builds of DC++, i see that DCPlusPlus.pdb used to be distributed in 
the regular download. it compresses very well, so should we distribute it as 
well? in that case, is it even necessary to extract debug symbols to a separate 
file?
(the current patch only looks for a DCPlusPlus.pdb file and assumes the .exe 
itself doesn't have any debug symbols. if we chose to distribute DCPlusPlus.exe 
with debug symbols (not stripped), the patch would have to be amended a bit.)

4) the ErrorLog.txt file only contains the backtrace for now. i suppose
it could contain more information.

** Patch added: "Patch"
   
https://bugs.launchpad.net/dcplusplus/+bug/189241/+attachment/2155924/+files/patch.patch

-- 
You received this bug notification because you are a member of
Dcplusplus-team, which is a bug assignee.
https://bugs.launchpad.net/bugs/189241

Title:
  Exception Info

Status in ADCH++:
  Confirmed
Status in DC++:
  Confirmed

Bug description:
  Feature Request:
  Generating an ExceptionInfo.txt like the old dc++'s used to do would be nice.

_______________________________________________
Mailing list: https://launchpad.net/~linuxdcpp-team
Post to     : linuxdcpp-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~linuxdcpp-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to