class IndexNode

Defined at line 19 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Public Methods

IndexNode * AddChild (Kind kind, std::string_view name)

The SymbolRef can be omitted when indexing namespaces as the DIEs are not stored for that case.

Defined at line 31 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

IndexNode * AddChild (Kind kind, std::string_view name, const SymbolRef & ref)

Defined at line 47 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

void AddDie (const SymbolRef & ref)

Defined at line 53 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

void IndexNode (Kind kind)

Defined at line 82 of file ../../src/developer/debug/zxdb/symbols/index_node.h

const Map & MapForKind (Kind kind)

Returns the map for the given child kind. This will assert for >= kEndPhysical ("kNone" and

"kRoot") which aren't child kinds.

Defined at line 82 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

void ~IndexNode ()

Defined at line 83 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Kind kind ()

Defined at line 85 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Map & MapForKind (Kind kind)

Defined at line 88 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

const Map & namespaces ()

Defined at line 92 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Map & namespaces ()

Defined at line 93 of file ../../src/developer/debug/zxdb/symbols/index_node.h

void MergeFrom (IndexNode & from)

Defined at line 94 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

const Map & types ()

Defined at line 95 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Map & types ()

Defined at line 96 of file ../../src/developer/debug/zxdb/symbols/index_node.h

const Map & functions ()

Defined at line 98 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Map & functions ()

Defined at line 99 of file ../../src/developer/debug/zxdb/symbols/index_node.h

const Map & vars ()

Defined at line 101 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Map & vars ()

Defined at line 102 of file ../../src/developer/debug/zxdb/symbols/index_node.h

std::string AsString (int indent_level)

AsString is useful only in small unit tests since even a small module can have many megabytes

of dump.

Defined at line 105 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

void Dump (std::ostream & out, const SymbolFactory * factory_for_loc, int indent_level)

Dump DIEs for debugging. A node does not contain its own name (this is stored in the parent's

map). If printing some node other than the root, specify the name.

If non-null, |factory_for_loc| will be used to add extra location information to certain types

of entries. Currently this prints out the relative code ranges for functions, and the DIE

offset of the indexed item for everything else.

Defined at line 111 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

void Dump (const std::string & name, std::ostream & out, const SymbolFactory * factory_for_loc, int indent_level)

Defined at line 119 of file ../../src/developer/debug/zxdb/symbols/index_node.cc

const std::vector<SymbolRef> & dies ()

Defined at line 126 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Enumerations

enum class Kind : int
Name Value Comments
kNamespace 0 --
kType 1 --
kFunction 2 --
kVar 3 --
kEndPhysical 4

Marker for the end of the kinds that have children for every node.

kNone kEndPhysical --
kRoot 5

Root index node (meaning nothing semantically).

kTemplateParameter 6

Either a template_type or template_value parameter. These are never
actually indexed, and will never have children nodes.

The type of an index node. There are several "physical" kinds which are associated with

children of each node. These physical ones count up from 0 so one can iterate over them

from to up until

<

kEndPhysical to iterate the child categories.

Defined at line 26 of file ../../src/developer/debug/zxdb/symbols/index_node.h

Records