Include a back trace in problem report technical details.
This adds a dependcy on libunwind for generating the back trace. * src/CMakeLists.txt: Require libunwind-generic package and libunwind VAPI. Update docs and debian/control with new dependencies. * src/engine/api/geary-problem-report.vala (ProblemReport): Generate a stack trace in the default constructor if an error is specified. * src/client/components/main-window-info-bar.vala (MainWindowInfoBar::format_details): Include stack trafe from problem report in output if present. * ui/main-window-info-bar.ui: Add a ScrolledWindow around the TextView since the details could now be quite large. * bindings/vapi/libunwind.vapi: Add bindings for libunwind courtesy Guillaume Poirier-Morency, add Error enum.
This commit is contained in:
parent
0d1efc2fe0
commit
bcca75f5a8
7 changed files with 150 additions and 17 deletions
63
bindings/vapi/libunwind.vapi
Normal file
63
bindings/vapi/libunwind.vapi
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Based on version from Sentry-GLib: https://github.com/arteymix/sentry-glib
|
||||
* Courtesy of Guillaume Poirier-Morency <guillaumepoiriermorency@gmail.com>
|
||||
*/
|
||||
|
||||
[CCode (cprefix = "UNW_", lower_case_cprefix = "unw_", cheader_filename = "libunwind.h")]
|
||||
namespace Unwind
|
||||
{
|
||||
|
||||
[CCode (cname = "unw_context_t")]
|
||||
public struct Context
|
||||
{
|
||||
[CCode (cname = "unw_getcontext")]
|
||||
public Context ();
|
||||
}
|
||||
|
||||
[CCode (cname = "unw_proc_info_t")]
|
||||
public struct ProcInfo
|
||||
{
|
||||
void* start_ip;
|
||||
void* end_ip;
|
||||
void* lsda;
|
||||
void* handler;
|
||||
void* gp;
|
||||
long flags;
|
||||
int format;
|
||||
}
|
||||
|
||||
[CCode (cname = "unw_frame_regnum_t")]
|
||||
public enum Reg
|
||||
{
|
||||
IP,
|
||||
SP,
|
||||
EH
|
||||
}
|
||||
|
||||
[CCode (cname = "unw_cursor_t", cprefix = "unw_")]
|
||||
public struct Cursor
|
||||
{
|
||||
public Cursor.local (Context ctx);
|
||||
public int get_proc_info (out ProcInfo pip);
|
||||
public int get_proc_name (uint8[] bufp, out long offp = null);
|
||||
public int get_reg (Reg reg, out void* valp);
|
||||
public int step ();
|
||||
}
|
||||
|
||||
[CCode (cname = "unw_error_t", cprefix = "UNW_E", has_type_id = false)]
|
||||
public enum Error
|
||||
{
|
||||
SUCCESS,
|
||||
UNSPEC,
|
||||
NOMEM,
|
||||
BADREG,
|
||||
READONLYREG,
|
||||
STOPUNWIND,
|
||||
INVALIDIP,
|
||||
BADFRAME,
|
||||
INVAL,
|
||||
BADVERSION,
|
||||
NOINFO
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue