~alivema4ever/ubuntu/trusty/weechat/lp-1299347-fix

« back to all changes in this revision

Viewing changes to src/core/wee-backtrace.c

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bouthenot
  • Date: 2013-01-23 18:44:36 UTC
  • mfrom: (1.1.23)
  • Revision ID: package-import@ubuntu.com-20130123184436-pillcj7jmtyyj00j
Tags: 0.4.0-1
* New upstream release.
* Bump Standards-Version to 3.9.4
* Remove UPGRADE_0.3 from doc (no more included in upstream sources).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2003-2012 Sebastien Helleu <flashcode@flashtux.org>
 
2
 * wee-backtrace.c - backtrace after a segfault
 
3
 *
 
4
 * Copyright (C) 2003-2013 Sebastien Helleu <flashcode@flashtux.org>
3
5
 *
4
6
 * This file is part of WeeChat, the extensible chat client.
5
7
 *
17
19
 * along with WeeChat.  If not, see <http://www.gnu.org/licenses/>.
18
20
 */
19
21
 
20
 
/*
21
 
 * wee-backtrace.c: display backtrace after a segfault
22
 
 */
23
 
 
24
22
#ifdef HAVE_CONFIG_H
25
23
#include "config.h"
26
24
#endif
44
42
#include "wee-backtrace.h"
45
43
#include "wee-log.h"
46
44
#include "wee-string.h"
 
45
#include "wee-version.h"
47
46
#include "../plugins/plugin.h"
48
47
 
49
48
 
50
49
/*
51
 
 * weechat_backtrace_printf: display a backtrace line (on stderr and in
52
 
 *                           WeeChat log)
 
50
 * Displays a backtrace line on standard error output and in WeeChat log.
53
51
 */
54
52
 
55
53
void
65
63
}
66
64
 
67
65
/*
68
 
 * weechat_backtrace_addr2line: display function name and line with a
69
 
 *                              backtrace address
 
66
 * Displays function name and line with a backtrace address.
70
67
 */
71
68
 
72
69
void
147
144
}
148
145
 
149
146
/*
150
 
 * weechat_backtrace: display backtrace (called when a SIGSEGV is received)
 
147
 * Displays backtrace (function called when a SIGSEGV is received).
151
148
 */
152
149
 
153
150
void
160
157
#endif
161
158
 
162
159
    weechat_backtrace_printf ("======= WeeChat backtrace =======");
163
 
    weechat_backtrace_printf ("(written by %s, compiled on %s %s)",
164
 
                              PACKAGE_STRING, __DATE__, __TIME__);
 
160
    weechat_backtrace_printf ("(written by WeeChat %s, compiled on %s %s)",
 
161
                              version_get_version_with_git (),
 
162
                              version_get_compilation_date (),
 
163
                              version_get_compilation_time ());
165
164
 
166
165
#ifdef HAVE_BACKTRACE
167
166
    trace_size = backtrace (trace, BACKTRACE_MAX);