mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 18:18:07 +00:00
Fixed vtable duplication for binary annotator (#7809)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
// Binary file: monsterdata_test.mon
|
||||
|
||||
header:
|
||||
+0x0000 | 78 00 00 00 | UOffset32 | 0x00000078 (120) Loc: +0x0078 | offset to root table `MyGame.Example.Monster`
|
||||
+0x0000 | 78 00 00 00 | UOffset32 | 0x00000078 (120) Loc: 0x0078 | offset to root table `MyGame.Example.Monster`
|
||||
+0x0004 | 4D 4F 4E 53 | char[4] | MONS | File Identifier
|
||||
|
||||
padding:
|
||||
@@ -67,7 +67,7 @@ vtable (MyGame.Example.Monster):
|
||||
+0x0076 | 6C 00 | VOffset16 | 0x006C (108) | offset to field `native_inline` (id: 51)
|
||||
|
||||
root_table (MyGame.Example.Monster):
|
||||
+0x0078 | 6C 00 00 00 | SOffset32 | 0x0000006C (108) Loc: +0x000C | offset to vtable
|
||||
+0x0078 | 6C 00 00 00 | SOffset32 | 0x0000006C (108) Loc: 0x000C | offset to vtable
|
||||
+0x007C | 01 | UType8 | 0x01 (1) | table field `test_type` (UType)
|
||||
+0x007D | 01 | uint8_t | 0x01 (1) | table field `testbool` (Bool)
|
||||
+0x007E | 50 00 | int16_t | 0x0050 (80) | table field `hp` (Short)
|
||||
@@ -83,22 +83,22 @@ root_table (MyGame.Example.Monster):
|
||||
+0x009D | 00 | uint8_t[1] | . | padding
|
||||
+0x009E | 00 00 | uint8_t[2] | .. | padding
|
||||
+0x00A0 | 00 00 00 00 | uint8_t[4] | .... | padding
|
||||
+0x00A4 | A4 01 00 00 | UOffset32 | 0x000001A4 (420) Loc: +0x0248 | offset to field `name` (string)
|
||||
+0x00A8 | 94 01 00 00 | UOffset32 | 0x00000194 (404) Loc: +0x023C | offset to field `inventory` (vector)
|
||||
+0x00AC | 2C 01 00 00 | UOffset32 | 0x0000012C (300) Loc: +0x01D8 | offset to field `test` (union of type `Monster`)
|
||||
+0x00B0 | 10 01 00 00 | UOffset32 | 0x00000110 (272) Loc: +0x01C0 | offset to field `test4` (vector)
|
||||
+0x00B4 | DC 00 00 00 | UOffset32 | 0x000000DC (220) Loc: +0x0190 | offset to field `testarrayofstring` (vector)
|
||||
+0x00B8 | C4 00 00 00 | UOffset32 | 0x000000C4 (196) Loc: +0x017C | offset to field `enemy` (table)
|
||||
+0x00A4 | A4 01 00 00 | UOffset32 | 0x000001A4 (420) Loc: 0x0248 | offset to field `name` (string)
|
||||
+0x00A8 | 94 01 00 00 | UOffset32 | 0x00000194 (404) Loc: 0x023C | offset to field `inventory` (vector)
|
||||
+0x00AC | 2C 01 00 00 | UOffset32 | 0x0000012C (300) Loc: 0x01D8 | offset to field `test` (union of type `Monster`)
|
||||
+0x00B0 | 10 01 00 00 | UOffset32 | 0x00000110 (272) Loc: 0x01C0 | offset to field `test4` (vector)
|
||||
+0x00B4 | DC 00 00 00 | UOffset32 | 0x000000DC (220) Loc: 0x0190 | offset to field `testarrayofstring` (vector)
|
||||
+0x00B8 | C4 00 00 00 | UOffset32 | 0x000000C4 (196) Loc: 0x017C | offset to field `enemy` (table)
|
||||
+0x00BC | 41 C9 79 DD | uint32_t | 0xDD79C941 (3715746113) | table field `testhashs32_fnv1` (Int)
|
||||
+0x00C0 | 41 C9 79 DD | uint32_t | 0xDD79C941 (3715746113) | table field `testhashu32_fnv1` (UInt)
|
||||
+0x00C4 | 71 A4 81 8E | uint32_t | 0x8E81A471 (2390860913) | table field `testhashs32_fnv1a` (Int)
|
||||
+0x00C8 | 71 A4 81 8E | uint32_t | 0x8E81A471 (2390860913) | table field `testhashu32_fnv1a` (UInt)
|
||||
+0x00CC | A8 00 00 00 | UOffset32 | 0x000000A8 (168) Loc: +0x0174 | offset to field `testarrayofbools` (vector)
|
||||
+0x00D0 | 88 00 00 00 | UOffset32 | 0x00000088 (136) Loc: +0x0158 | offset to field `testarrayofsortedstruct` (vector)
|
||||
+0x00D4 | E0 00 00 00 | UOffset32 | 0x000000E0 (224) Loc: +0x01B4 | offset to field `test5` (vector)
|
||||
+0x00D8 | 34 01 00 00 | UOffset32 | 0x00000134 (308) Loc: +0x020C | offset to field `vector_of_longs` (vector)
|
||||
+0x00DC | 10 01 00 00 | UOffset32 | 0x00000110 (272) Loc: +0x01EC | offset to field `vector_of_doubles` (vector)
|
||||
+0x00E0 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: +0x010C | offset to field `scalar_key_sorted_tables` (vector)
|
||||
+0x00CC | A8 00 00 00 | UOffset32 | 0x000000A8 (168) Loc: 0x0174 | offset to field `testarrayofbools` (vector)
|
||||
+0x00D0 | 88 00 00 00 | UOffset32 | 0x00000088 (136) Loc: 0x0158 | offset to field `testarrayofsortedstruct` (vector)
|
||||
+0x00D4 | E0 00 00 00 | UOffset32 | 0x000000E0 (224) Loc: 0x01B4 | offset to field `test5` (vector)
|
||||
+0x00D8 | 34 01 00 00 | UOffset32 | 0x00000134 (308) Loc: 0x020C | offset to field `vector_of_longs` (vector)
|
||||
+0x00DC | 10 01 00 00 | UOffset32 | 0x00000110 (272) Loc: 0x01EC | offset to field `vector_of_doubles` (vector)
|
||||
+0x00E0 | 2C 00 00 00 | UOffset32 | 0x0000002C (44) Loc: 0x010C | offset to field `scalar_key_sorted_tables` (vector)
|
||||
+0x00E4 | 01 00 | int16_t | 0x0001 (1) | struct field `native_inline.a` of 'MyGame.Example.Test' (Short)
|
||||
+0x00E6 | 02 | uint8_t | 0x02 (2) | struct field `native_inline.b` of 'MyGame.Example.Test' (Byte)
|
||||
+0x00E7 | 00 | uint8_t[1] | . | padding
|
||||
@@ -110,8 +110,8 @@ root_table (MyGame.Example.Monster):
|
||||
|
||||
vector (MyGame.Example.Monster.scalar_key_sorted_tables):
|
||||
+0x010C | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items)
|
||||
+0x0110 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: +0x0120 | offset to table[0]
|
||||
+0x0114 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: +0x013C | offset to table[1]
|
||||
+0x0110 | 10 00 00 00 | UOffset32 | 0x00000010 (16) Loc: 0x0120 | offset to table[0]
|
||||
+0x0114 | 28 00 00 00 | UOffset32 | 0x00000028 (40) Loc: 0x013C | offset to table[1]
|
||||
|
||||
padding:
|
||||
+0x0118 | 00 00 | uint8_t[2] | .. | padding
|
||||
@@ -122,8 +122,8 @@ vtable (MyGame.Example.Stat):
|
||||
+0x011E | 04 00 | VOffset16 | 0x0004 (4) | offset to field `id` (id: 0)
|
||||
|
||||
table (MyGame.Example.Stat):
|
||||
+0x0120 | 06 00 00 00 | SOffset32 | 0x00000006 (6) Loc: +0x011A | offset to vtable
|
||||
+0x0124 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0128 | offset to field `id` (string)
|
||||
+0x0120 | 06 00 00 00 | SOffset32 | 0x00000006 (6) Loc: 0x011A | offset to vtable
|
||||
+0x0124 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: 0x0128 | offset to field `id` (string)
|
||||
|
||||
string (MyGame.Example.Stat.id):
|
||||
+0x0128 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string
|
||||
@@ -138,10 +138,10 @@ vtable (MyGame.Example.Stat):
|
||||
+0x013A | 06 00 | VOffset16 | 0x0006 (6) | offset to field `count` (id: 2)
|
||||
|
||||
table (MyGame.Example.Stat):
|
||||
+0x013C | 0A 00 00 00 | SOffset32 | 0x0000000A (10) Loc: +0x0132 | offset to vtable
|
||||
+0x013C | 0A 00 00 00 | SOffset32 | 0x0000000A (10) Loc: 0x0132 | offset to vtable
|
||||
+0x0140 | 00 00 | uint8_t[2] | .. | padding
|
||||
+0x0142 | 01 00 | uint16_t | 0x0001 (1) | table field `count` (UShort)
|
||||
+0x0144 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: +0x0150 | offset to field `id` (string)
|
||||
+0x0144 | 0C 00 00 00 | UOffset32 | 0x0000000C (12) Loc: 0x0150 | offset to field `id` (string)
|
||||
+0x0148 | 0A 00 00 00 00 00 00 00 | int64_t | 0x000000000000000A (10) | table field `val` (Long)
|
||||
|
||||
string (MyGame.Example.Stat.id):
|
||||
@@ -165,8 +165,8 @@ vector (MyGame.Example.Monster.testarrayofbools):
|
||||
+0x017A | 01 | uint8_t | 0x01 (1) | value[2]
|
||||
|
||||
table (MyGame.Example.Monster):
|
||||
+0x017C | B0 FF FF FF | SOffset32 | 0xFFFFFFB0 (-80) Loc: +0x01CC | offset to vtable
|
||||
+0x0180 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x0184 | offset to field `name` (string)
|
||||
+0x017C | B0 FF FF FF | SOffset32 | 0xFFFFFFB0 (-80) Loc: 0x01CC | offset to vtable
|
||||
+0x0180 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: 0x0184 | offset to field `name` (string)
|
||||
|
||||
string (MyGame.Example.Monster.name):
|
||||
+0x0184 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string
|
||||
@@ -178,8 +178,8 @@ padding:
|
||||
|
||||
vector (MyGame.Example.Monster.testarrayofstring):
|
||||
+0x0190 | 02 00 00 00 | uint32_t | 0x00000002 (2) | length of vector (# items)
|
||||
+0x0194 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: +0x01A8 | offset to string[0]
|
||||
+0x0198 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x019C | offset to string[1]
|
||||
+0x0194 | 14 00 00 00 | UOffset32 | 0x00000014 (20) Loc: 0x01A8 | offset to string[0]
|
||||
+0x0198 | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: 0x019C | offset to string[1]
|
||||
|
||||
string (MyGame.Example.Monster.testarrayofstring):
|
||||
+0x019C | 05 00 00 00 | uint32_t | 0x00000005 (5) | length of string
|
||||
@@ -224,8 +224,8 @@ vtable (MyGame.Example.Monster):
|
||||
+0x01D6 | 04 00 | VOffset16 | 0x0004 (4) | offset to field `name` (id: 3)
|
||||
|
||||
table (MyGame.Example.Monster):
|
||||
+0x01D8 | 0C 00 00 00 | SOffset32 | 0x0000000C (12) Loc: +0x01CC | offset to vtable
|
||||
+0x01DC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: +0x01E0 | offset to field `name` (string)
|
||||
+0x01D8 | 0C 00 00 00 | SOffset32 | 0x0000000C (12) Loc: 0x01CC | offset to vtable
|
||||
+0x01DC | 04 00 00 00 | UOffset32 | 0x00000004 (4) Loc: 0x01E0 | offset to field `name` (string)
|
||||
|
||||
string (MyGame.Example.Monster.name):
|
||||
+0x01E0 | 04 00 00 00 | uint32_t | 0x00000004 (4) | length of string
|
||||
|
||||
Reference in New Issue
Block a user