David Zeuthen 79d32c2fc1 GDBusMessage: Fix bug when deserializing a message
See https://bugzilla.gnome.org/show_bug.cgi?id=621838 for the whole
story. The problem was that we ended up reading data from arrays of
arrays when we were just supposed to be aligning the buffers.

Also add a host of debug infrastructure that was needed to find the
root cause. For now it can be turned on only via defining
DEBUG_SERIALIZER. In the future we might want to make it work via
G_DBUS_DEBUG. In a nutshell, the added debug info looks like this

Parsing blob (blob_len = 0x0084 bytes)
  0000: 6c 01 00 01  3c 00 00 00  41 00 00 00  37 00 00 00    l...<...A...7...
  0010: 08 01 67 00  08 61 61 79  61 7b 73 76  7d 00 00 00    ..g..aaya{sv}...
  0020: 01 01 6f 00  08 00 00 00  2f 66 6f 6f  2f 62 61 72    ..o...../foo/bar
  0030: 00 00 00 00  00 00 00 00  03 01 73 00  06 00 00 00    ..........s.....
  0040: 4d 65 6d 62  65 72 00 00  00 00 00 00  34 00 00 00    Member......4...
  0050: 03 00 00 00  63 77 64 00  01 73 00 00  23 00 00 00    ....cwd..s..#...
  0060: 2f 68 6f 6d  65 2f 64 61  76 69 64 7a  2f 48 61 63    /home/davidz/Hac
  0070: 6b 69 6e 67  2f 67 6c 69  62 2f 67 69  6f 2f 74 65    king/glib/gio/te
  0080: 73 74 73 00                                           sts.

Parsing headers (blob_len = 0x0084 bytes)
  Reading type a{yv} from offset 0x000c: array spans 0x0037 bytes
    Reading type {yv} from offset 0x0010
      Reading type y from offset 0x0010: 0x08 '
      Reading type v from offset 0x0011
        Reading type g from offset 0x0014: 'aaya{sv}'
    Reading type {yv} from offset 0x001e
      Reading type y from offset 0x0020: 0x01 ''
      Reading type v from offset 0x0021
        Reading type o from offset 0x0024: '/foo/bar'
    Reading type {yv} from offset 0x0031
      Reading type y from offset 0x0038: 0x03 ''
      Reading type v from offset 0x0039
        Reading type s from offset 0x003c: 'Member'
Parsing body (blob_len = 0x0084 bytes)
  Reading type (aaya{sv}) from offset 0x0047
    Reading type aay from offset 0x0048: array spans 0x0000 bytes
    Reading type a{sv} from offset 0x004c: array spans 0x0034 bytes
      Reading type {sv} from offset 0x0050
        Reading type s from offset 0x0050: 'cwd'
        Reading type v from offset 0x0058
          Reading type s from offset 0x005b: '/home/davidz/Hacking/glib/gio/tests'
OK

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-06-17 18:01:32 -04:00
..
2010-01-12 16:34:23 +01:00
2010-06-10 13:35:25 -04:00
2010-06-09 10:32:12 +02:00
2010-02-21 15:55:10 -05:00
2009-11-29 22:54:16 -05:00
2009-03-31 19:39:16 -04:00
2009-11-29 22:54:16 -05:00
2010-06-17 16:36:58 -04:00
2010-06-17 16:07:52 -04:00
2009-08-19 11:02:05 +02:00
2010-03-26 09:30:25 -04:00
2009-11-29 22:54:16 -05:00
2009-11-29 22:54:16 -05:00
2010-06-04 01:35:23 +02:00
2010-05-20 10:53:08 -04:00
2010-05-09 22:13:18 -04:00
2010-05-20 10:53:08 -04:00
2009-11-29 22:54:16 -05:00
2009-06-15 00:45:55 -04:00
2009-11-17 20:27:38 -06:00
2009-10-13 16:21:42 +02:00
2010-05-08 23:28:17 -04:00
2009-05-13 14:42:46 +02:00
2009-12-01 10:44:42 +01:00
2010-04-21 02:32:43 +02:00
2009-09-18 19:20:06 -04:00
2010-01-12 16:34:18 +01:00
2007-12-01 23:49:34 +00:00
2010-03-26 11:05:02 -04:00
2009-09-18 19:20:06 -04:00
2009-05-13 14:42:38 +02:00
2009-12-01 10:44:42 +01:00
2009-11-29 22:54:16 -05:00
2010-03-08 00:12:33 -05:00
2009-12-01 10:44:42 +01:00
2009-05-28 00:30:21 -04:00
2009-11-23 16:22:52 +01:00
2010-06-06 21:15:42 +02:00
2010-06-04 19:03:38 +02:00
2009-12-01 10:44:42 +01:00
2010-04-16 23:23:40 -04:00
2010-06-17 15:08:37 -04:00
2010-01-24 20:50:51 -05:00
2010-06-06 14:24:14 -04:00
2010-05-06 17:42:09 +02:00
2010-04-23 12:31:31 -04:00
2009-06-08 15:30:28 +02:00
2009-09-07 03:14:15 -04:00
2009-11-29 22:54:16 -05:00
2010-06-17 16:07:52 -04:00
2010-05-15 18:16:51 -04:00
2010-05-08 23:28:17 -04:00
2010-05-13 23:08:34 -04:00
2010-05-08 23:28:17 -04:00
2010-05-08 23:28:17 -04:00
2010-05-08 23:28:17 -04:00
2009-11-29 22:54:16 -05:00
2009-11-29 22:54:16 -05:00
2008-07-21 02:19:56 +00:00
2009-07-05 22:35:55 -04:00
2009-11-29 22:54:16 -05:00
2009-11-29 22:54:16 -05:00
2009-05-30 15:29:23 +02:00