/* OK, we're really going to collect it. First make a copy,
because the error context is on the stack and will disappear shortly.
We can duplicate the main part ourselves, but use
- SK_(dup_extra_and_update) to duplicate the `extra' part (unless it's
- NULL).
+ SK_(dup_extra_and_update) to duplicate the `extra' part.
SK_(dup_extra_and_update) can also update the `extra' part. This is
for when there are more details to fill in which take time to work out
*/
p = VG_(arena_malloc)(VG_AR_ERRORS, sizeof(Error));
*p = err;
- if (NULL != err.extra)
- p->extra = SK_(dup_extra_and_update)(p);
-
+ p->extra = SK_(dup_extra_and_update)(p);
p->next = vg_errors;
p->supp = is_suppressible_error(&err);
vg_errors = p;
/* NULL if unsuppressed; or ptr to suppression record. */
Supp* supp;
Int count;
- ExeContext* where;
ThreadId tid;
/* These record %EIP, %ESP and %EBP at the error point. They
are only used to make GDB-attaching convenient; there is no
UInt m_ebp;
/* The skin-specific part */
+ /* Initialised by core */
+ ExeContext* where;
/* Used by ALL. Must be in the range (0..) */
Int ekind;
/* Used frequently */
/*--------------------------------------------------------------------*/
/* Errors */
+ExeContext* VG_(get_error_where) ( Error* err )
+{
+ return err->ekind;
+}
+
ErrorKind VG_(get_error_kind) ( Error* err )
{
return err->ekind;