Class

GumExceptor

Description [src]

final class Gum.Exceptor : GObject.Object
{
  /* No available fields */
}

Catches and handles hardware and software exceptions, such as access violations, illegal instructions and arithmetic errors.

It serves two complementary needs:

Recovering from a fault

g_autoptr(GumExceptor) exceptor = gum_exceptor_obtain ();
GumExceptorScope scope;

if (gum_exceptor_try (exceptor, &scope))
{
  // Risky operation that might fault.
  read_possibly_unmapped (ptr);
}

if (gum_exceptor_catch (exceptor, &scope))
{
  g_autofree gchar * desc =
      gum_exception_details_to_string (&scope.exception);
  g_print ("Caught: %s\n", desc);
}

Ancestors

Functions

gum_exceptor_obtain

Obtains the exceptor singleton.

gum_exceptor_set_mode

Configures how the exceptor handles exceptions:.

Instance methods

gum_exceptor_add

Adds an exception handler.

gum_exceptor_catch

Ends an exception-handling scope opened with gum_exceptor_try() and reports whether an exception was caught. When it returns TRUE, the exception is described by scopes exception field.

gum_exceptor_has_scope

Checks whether the given thread is currently inside a gum_exceptor_try() scope.

gum_exceptor_remove

Removes a previously added exception handler.

gum_exceptor_reset

Re-installs the exceptor’s backend, reasserting its exception handling in case something has taken over the relevant signal handlers since it was last set up. Does nothing in GUM_EXCEPTOR_MODE_OFF.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct GumExceptorClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.