$ gdb --args python -c 'from gi.repository import GLib; v=GLib.Variant.new_variant(GLib.Variant.new_int32(-42)); print v.get_type_string()'
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/python...Reading symbols from /usr/lib/debug/usr/bin/python2.7...done.
done.
(gdb) run
Starting program: /usr/bin/python -c from\ gi.repository\ import\ GLib\;\ v=GLib.Variant.new_variant\(GLib.Variant.new_int32\(-42\)\)\;\ print\ v.get_type_string\(\)
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff58d72f4 in g_variant_type_info_check (info=0x0, container_class=0 '\000')
    at gvarianttypeinfo.c:164
164	  g_assert (info->alignment == 0 || info->alignment == 1 ||
(gdb) bt full
#0  0x00007ffff58d72f4 in g_variant_type_info_check (info=0x0, container_class=0 '\000')
    at gvarianttypeinfo.c:164
        __PRETTY_FUNCTION__ = "g_variant_type_info_check"
#1  0x00007ffff58d74a4 in g_variant_type_info_get_type_string (info=0x0) at gvarianttypeinfo.c:200
No locals.
#2  0x00007ffff58c9f12 in g_variant_get_type_string (value=0xc2ecc0) at gvariant.c:1730
        type_info = 0x0
        __PRETTY_FUNCTION__ = "g_variant_get_type_string"
#3  0x00007ffff4bc8aa0 in ffi_call_unix64 () from /usr/lib/libffi.so.5
No symbol table info available.
#4  0x00007ffff4bc8483 in ffi_call () from /usr/lib/libffi.so.5
No symbol table info available.
#5  0x00007ffff5dc1b28 in _g_callable_info_invoke (info=<value optimised out>, function=0x7ffff58c9ec2, 
    in_args=0xb93aa0, n_in_args=1, out_args=0x0, n_out_args=0, return_value=0x7fffffffdc30, is_method=1, 
    throws=0, error=0x7fffffffdc50) at girepository/gicallableinfo.c:496
        cif = {abi = FFI_UNIX64, nargs = 1, arg_types = 0x7fffffffd990, rtype = 0x7ffff4bc8e90, bytes = 0, 
          flags = 14}
        rtype = 0x7ffff4bc8e90
        atypes = 0x7fffffffd990
        tinfo = <value optimised out>
        ainfo = <value optimised out>
        n_args = 0
        n_invoke_args = 1
        in_pos = 1
        out_pos = <value optimised out>
        i = <value optimised out>
        args = 0x7fffffffd970
        local_error = 0x0
        error_address = 0x7fffffffda60
        __PRETTY_FUNCTION__ = "_g_callable_info_invoke"
#6  0x00007ffff5dc2cae in g_function_info_invoke (info=0xc33f20, in_args=0xb93aa0, n_in_args=1, out_args=
    0x0, n_out_args=0, return_value=0x7fffffffdc30, error=0x7fffffffdc50)
    at girepository/gifunctioninfo.c:273
        symbol = <value optimised out>
        func = 0x7ffff58c9ec2
        is_method = 1
---Type <return> to continue, or q <return> to quit---
        throws = <value optimised out>
#7  0x00007ffff5ff3b73 in _invoke_function (self=0xc381d0, py_args=(<Variant at remote 0xbf1c00>,), 
    kwargs=<value optimised out>) at pygi-invoke.c:587
        _save = 0x0
        error = 0x0
        retval = <value optimised out>
#8  _wrap_g_callable_info_invoke (self=0xc381d0, py_args=(<Variant at remote 0xbf1c00>,), 
    kwargs=<value optimised out>) at pygi-invoke.c:971
        state = {is_method = 1, is_constructor = 0, n_args = 0, n_in_args = 1, n_out_args = 0, 
          n_backup_args = 0, n_py_args = 1, n_aux_in_args = 0, n_aux_out_args = 0, n_return_values = 1, 
          callback_index = 255 '\377', user_data_index = 255 '\377', destroy_notify_index = 255 '\377', 
          closure = 0x0, error_arg_pos = -1, arg_infos = 0x0, arg_type_infos = 0x0, return_type_info = 
    0xc7fc50, return_type_tag = GI_TYPE_TAG_UTF8, args = 0x0, args_is_auxiliary = 0x0, in_args = 0xb93aa0, 
          out_args = 0x0, out_values = 0x0, backup_args = 0x0, return_arg = {v_boolean = 0, 
            v_int8 = 0 '\000', v_uint8 = 0 '\000', v_int16 = 0, v_uint16 = 0, v_int32 = 0, v_uint32 = 0, 
            v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_short = 0, v_ushort = 0, v_int = 0, 
            v_uint = 0, v_long = 0, v_ulong = 0, v_ssize = 0, v_size = 0, v_string = 0x0, v_pointer = 0x0}, 
          return_value = 0x0, implementor_gtype = 0}
#9  0x00000000004abd10 in ext_do_call (f=<value optimised out>, throwflag=<value optimised out>)
    at ../Python/ceval.c:4322
        tstate = <value optimised out>
        kwdict = 0x0
        nstar = <value optimised out>
        callargs = <value optimised out>
        stararg = (<Variant at remote 0xbf1c00>,)
        result = 0x0
#10 PyEval_EvalFrameEx (f=<value optimised out>, throwflag=<value optimised out>) at ../Python/ceval.c:2704
        func = <built-in method invoke of gi.FunctionInfo object at remote 0xc381d0>
        na = 0
        nk = 10839056
        n = <value optimised out>
        pfunc = 0xc2ffe8
        sp = 0xc2fff0
        stack_pointer = <value optimised out>
        next_instr = 0xbf52c8 "S"
        opcode = <value optimised out>
---Type <return> to continue, or q <return> to quit---
        oparg = <value optimised out>
        why = WHY_NOT
        err = 0
        x = <value optimised out>
        v = <value optimised out>
        w = <value optimised out>
        u = <value optimised out>
        t = <value optimised out>
        stream = 0x0
        fastlocals = <value optimised out>
        freevars = 0xc2ffe0
        retval = 0x0
        tstate = <value optimised out>
        co = <value optimised out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = 0xbf52bc "\210"
        names = ('invoke',)
        consts = (None,)
#11 0x00000000004ae006 in PyEval_EvalCodeEx (co=0xbd42b0, globals=<value optimised out>, 
    locals=<value optimised out>, args=<value optimised out>, argcount=1, kws=0xa9e980, kwcount=0, defs=0x0, 
    defcount=0, closure=(<cell at remote 0xc39638>,)) at ../Python/ceval.c:3252
        f = <value optimised out>
        retval = 0x0
        fastlocals = <value optimised out>
        freevars = 0xc2ffe0
        tstate = 0x8e6120
        x = <value optimised out>
        u = <value optimised out>
#12 0x00000000004ac3c9 in fast_function (f=<value optimised out>, throwflag=<value optimised out>)
    at ../Python/ceval.c:4108
        co = <value optimised out>
        nd = <value optimised out>
        globals = <value optimised out>
        argdefs = <value optimised out>
---Type <return> to continue, or q <return> to quit---
        d = <value optimised out>
#13 call_function (f=<value optimised out>, throwflag=<value optimised out>) at ../Python/ceval.c:4033
        func = <value optimised out>
        w = <value optimised out>
        na = 1
        nk = <value optimised out>
        n = <value optimised out>
        pfunc = 0xa9e978
        x = <value optimised out>
#14 PyEval_EvalFrameEx (f=<value optimised out>, throwflag=<value optimised out>) at ../Python/ceval.c:2665
        sp = 0xa9e980
        stack_pointer = <value optimised out>
        next_instr = 0x9f1c53 "GHd\003"
        opcode = <value optimised out>
        oparg = <value optimised out>
        why = WHY_NOT
        err = 0
        x = <value optimised out>
        v = <value optimised out>
        w = <value optimised out>
        u = <value optimised out>
        t = <value optimised out>
        stream = 0x0
        fastlocals = <value optimised out>
        freevars = 0xa9e978
        retval = 0x0
        tstate = <value optimised out>
        co = <value optimised out>
        instr_ub = -1
        instr_lb = 0
        instr_prev = -1
        first_instr = 0x9f1c1c "d"
        names = ('gi.repository', 'GLib', 'Variant', 'new_variant', 'new_int32', 'v', 'get_type_string')
        consts = (-1, ('GLib',), -42, None)
#15 0x00000000004ae006 in PyEval_EvalCodeEx (co=0x9eff30, globals=<value optimised out>, 
    locals=<value optimised out>, args=<value optimised out>, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
---Type <return> to continue, or q <return> to quit---
    defcount=0, closure=0x0) at ../Python/ceval.c:3252
        f = <value optimised out>
        retval = 0x0
        fastlocals = <value optimised out>
        freevars = 0xa9e978
        tstate = 0x8e6120
        x = <value optimised out>
        u = <value optimised out>
#16 0x00000000004ae112 in PyEval_EvalCode (co=<value optimised out>, globals=<value optimised out>, 
    locals=<value optimised out>) at ../Python/ceval.c:666
No locals.
#17 0x00000000004d25e7 in run_mod (command=<value optimised out>, flags=<value optimised out>)
    at ../Python/pythonrun.c:1346
        co = 0x9eff30
        v = <value optimised out>
#18 PyRun_StringFlags (command=<value optimised out>, flags=<value optimised out>)
    at ../Python/pythonrun.c:1309
        ret = 0x0
        arena = 0x96bfe0
#19 PyRun_SimpleStringFlags (command=<value optimised out>, flags=<value optimised out>)
    at ../Python/pythonrun.c:962
        m = <value optimised out>
        d = 
    {'GLib': <DynamicModule(_overrides_module=<module at remote 0xbf5a98>, _namespace='GLib', _introspection_module=<IntrospectionModule(__name__='gi.repository.GLib', _namespace='GLib', Variant=<StructMeta(new_uint32=<classmethod at remote 0xc39088>, new_array=<classmethod at remote 0xbfe788>, __module__='gi.repository.GLib', new_int64=<classmethod at remote 0xbfecc8>, get_uint16=<function at remote 0xbf9aa0>, get_byte=<function at remote 0xbf9410>, dup_bytestring=<function at remote 0xbf92a8>, get_int16=<function at remote 0xbf9668>, new_handle=<classmethod at remote 0xbfeb78>, get_int32=<function at remote 0xbf96e0>, is_normal_form=<function at remote 0xbf9d70>, new_string=<classmethod at remote 0xbfeef8>, get_variant=<function at remote 0xbf9c08>, get_handle=<function at remote 0xbf95f0>, __dict__=<getset_descriptor at remote 0xbfc0e0>, get_strv=<function at remote 0xbf99b0>, __info__=<StructInfo at remote 0xbf7b10>, new_uint16=<classmethod at remote 0xbfefd8>, new_int32=<classmethod at remote 0xbfec58>, is_c...(truncated)
        v = 0x0
#20 0x00000000004186c5 in Py_Main (argc=3, argv=<value optimised out>) at ../Modules/main.c:543
        c = <value optimised out>
---Type <return> to continue, or q <return> to quit---
        sts = <value optimised out>
        command = 
    0x8e6010 "from gi.repository import GLib; v=GLib.Variant.new_variant(GLib.Variant.new_int32(-42)); print v.get_type_string()\n"
        filename = 0x0
        module = 0x0
        fp = 0x7ffff6d337e0
        p = <value optimised out>
        unbuffered = <value optimised out>
        skipfirstline = 0
        stdin_is_interactive = 1
        help = <value optimised out>
        version = <value optimised out>
        saw_unbuffered_flag = 0
        cf = {cf_flags = 0}
#21 0x00007ffff69d5d1e in __libc_start_main (main=0x417ff0 <main>, argc=3, ubp_av=0x7fffffffe328, 
    init=<value optimised out>, fini=<value optimised out>, rtld_fini=<value optimised out>, stack_end=
    0x7fffffffe318) at libc-start.c:226
        result = <value optimised out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -2861281438627867584, 4292352, 140737488347936, 0, 0, 
                2861281439512187968, 2861266299837273152}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 
    0x576d50, 0x7fffffffe328}, data = {prev = 0x0, cleanup = 0x0, canceltype = 5729616}}}
        not_first_call = <value optimised out>
#22 0x0000000000417f29 in _start ()
No symbol table info available.

