Class Variable
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.devtools.clouddebugger.v2.Variable
-
- All Implemented Interfaces:
VariableOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class Variable extends com.google.protobuf.GeneratedMessageV3 implements VariableOrBuilder
Represents a variable or an argument possibly of a compound object type. Note how the following variables are represented: 1) A simple variable: int x = 5 { name: "x", value: "5", type: "int" } // Captured variable 2) A compound object: struct T { int m1; int m2; }; T x = { 3, 7 }; { // Captured variable name: "x", type: "T", members { name: "m1", value: "3", type: "int" }, members { name: "m2", value: "7", type: "int" } } 3) A pointer where the pointee was captured: T x = { 3, 7 }; T* p = &x; { // Captured variable name: "p", type: "T*", value: "0x00500500", members { name: "m1", value: "3", type: "int" }, members { name: "m2", value: "7", type: "int" } } 4) A pointer where the pointee was not captured: T* p = new T; { // Captured variable name: "p", type: "T*", value: "0x00400400" status { is_error: true, description { format: "unavailable" } } } The status should describe the reason for the missing value, such as `<optimized out>`, `<inaccessible>`, `<pointers limit reached>`. Note that a null pointer should not have members. 5) An unnamed value: int* p = new int(7); { // Captured variable name: "p", value: "0x00500500", type: "int*", members { value: "7", type: "int" } } 6) An unnamed pointer where the pointee was not captured: int* p = new int(7); int** pp = &p; { // Captured variable name: "pp", value: "0x00500500", type: "int**", members { value: "0x00400400", type: "int*" status { is_error: true, description: { format: "unavailable" } } } } } To optimize computation, memory and network traffic, variables that repeat in the output multiple times can be stored once in a shared variable table and be referenced using the `var_table_index` field. The variables stored in the shared table are nameless and are essentially a partition of the complete variable. To reconstruct the complete variable, merge the referencing variable with the referenced variable. When using the shared variable table, the following variables: T x = { 3, 7 }; T* p = &x; T& r = x; { name: "x", var_table_index: 3, type: "T" } // Captured variables { name: "p", value "0x00500500", type="T*", var_table_index: 3 } { name: "r", type="T&", var_table_index: 3 } { // Shared variable table entry #3: members { name: "m1", value: "3", type: "int" }, members { name: "m2", value: "7", type: "int" } } Note that the pointer address is stored with the referencing variable and not with the referenced variable. This allows the referenced variable to be shared between pointers and references. The type field is optional. The debugger agent may or may not support it.
Protobuf typegoogle.devtools.clouddebugger.v2.Variable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Variable.Builder
Represents a variable or an argument possibly of a compound object type.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
MEMBERS_FIELD_NUMBER
static int
NAME_FIELD_NUMBER
static int
STATUS_FIELD_NUMBER
static int
TYPE_FIELD_NUMBER
static int
VALUE_FIELD_NUMBER
static int
VAR_TABLE_INDEX_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static Variable
getDefaultInstance()
Variable
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
Variable
getMembers(int index)
Members contained or pointed to by the variable.int
getMembersCount()
Members contained or pointed to by the variable.List<Variable>
getMembersList()
Members contained or pointed to by the variable.VariableOrBuilder
getMembersOrBuilder(int index)
Members contained or pointed to by the variable.List<? extends VariableOrBuilder>
getMembersOrBuilderList()
Members contained or pointed to by the variable.String
getName()
Name of the variable, if any.com.google.protobuf.ByteString
getNameBytes()
Name of the variable, if any.com.google.protobuf.Parser<Variable>
getParserForType()
int
getSerializedSize()
StatusMessage
getStatus()
Status associated with the variable.StatusMessageOrBuilder
getStatusOrBuilder()
Status associated with the variable.String
getType()
Variable type (e.g.com.google.protobuf.ByteString
getTypeBytes()
Variable type (e.g.String
getValue()
Simple value of the variable.com.google.protobuf.ByteString
getValueBytes()
Simple value of the variable.com.google.protobuf.Int32Value
getVarTableIndex()
Reference to a variable in the shared variable table.com.google.protobuf.Int32ValueOrBuilder
getVarTableIndexOrBuilder()
Reference to a variable in the shared variable table.int
hashCode()
boolean
hasStatus()
Status associated with the variable.boolean
hasVarTableIndex()
Reference to a variable in the shared variable table.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Variable.Builder
newBuilder()
static Variable.Builder
newBuilder(Variable prototype)
Variable.Builder
newBuilderForType()
protected Variable.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Variable
parseDelimitedFrom(InputStream input)
static Variable
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Variable
parseFrom(byte[] data)
static Variable
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Variable
parseFrom(com.google.protobuf.ByteString data)
static Variable
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Variable
parseFrom(com.google.protobuf.CodedInputStream input)
static Variable
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Variable
parseFrom(InputStream input)
static Variable
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Variable
parseFrom(ByteBuffer data)
static Variable
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Variable>
parser()
Variable.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VALUE_FIELD_NUMBER
public static final int VALUE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MEMBERS_FIELD_NUMBER
public static final int MEMBERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VAR_TABLE_INDEX_FIELD_NUMBER
public static final int VAR_TABLE_INDEX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getName
public String getName()
Name of the variable, if any.
string name = 1;
- Specified by:
getName
in interfaceVariableOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Name of the variable, if any.
string name = 1;
- Specified by:
getNameBytes
in interfaceVariableOrBuilder
- Returns:
- The bytes for name.
-
getValue
public String getValue()
Simple value of the variable.
string value = 2;
- Specified by:
getValue
in interfaceVariableOrBuilder
- Returns:
- The value.
-
getValueBytes
public com.google.protobuf.ByteString getValueBytes()
Simple value of the variable.
string value = 2;
- Specified by:
getValueBytes
in interfaceVariableOrBuilder
- Returns:
- The bytes for value.
-
getType
public String getType()
Variable type (e.g. `MyClass`). If the variable is split with `var_table_index`, `type` goes next to `value`. The interpretation of a type is agent specific. It is recommended to include the dynamic type rather than a static type of an object.
string type = 6;
- Specified by:
getType
in interfaceVariableOrBuilder
- Returns:
- The type.
-
getTypeBytes
public com.google.protobuf.ByteString getTypeBytes()
Variable type (e.g. `MyClass`). If the variable is split with `var_table_index`, `type` goes next to `value`. The interpretation of a type is agent specific. It is recommended to include the dynamic type rather than a static type of an object.
string type = 6;
- Specified by:
getTypeBytes
in interfaceVariableOrBuilder
- Returns:
- The bytes for type.
-
getMembersList
public List<Variable> getMembersList()
Members contained or pointed to by the variable.
repeated .google.devtools.clouddebugger.v2.Variable members = 3;
- Specified by:
getMembersList
in interfaceVariableOrBuilder
-
getMembersOrBuilderList
public List<? extends VariableOrBuilder> getMembersOrBuilderList()
Members contained or pointed to by the variable.
repeated .google.devtools.clouddebugger.v2.Variable members = 3;
- Specified by:
getMembersOrBuilderList
in interfaceVariableOrBuilder
-
getMembersCount
public int getMembersCount()
Members contained or pointed to by the variable.
repeated .google.devtools.clouddebugger.v2.Variable members = 3;
- Specified by:
getMembersCount
in interfaceVariableOrBuilder
-
getMembers
public Variable getMembers(int index)
Members contained or pointed to by the variable.
repeated .google.devtools.clouddebugger.v2.Variable members = 3;
- Specified by:
getMembers
in interfaceVariableOrBuilder
-
getMembersOrBuilder
public VariableOrBuilder getMembersOrBuilder(int index)
Members contained or pointed to by the variable.
repeated .google.devtools.clouddebugger.v2.Variable members = 3;
- Specified by:
getMembersOrBuilder
in interfaceVariableOrBuilder
-
hasVarTableIndex
public boolean hasVarTableIndex()
Reference to a variable in the shared variable table. More than one variable can reference the same variable in the table. The `var_table_index` field is an index into `variable_table` in Breakpoint.
.google.protobuf.Int32Value var_table_index = 4;
- Specified by:
hasVarTableIndex
in interfaceVariableOrBuilder
- Returns:
- Whether the varTableIndex field is set.
-
getVarTableIndex
public com.google.protobuf.Int32Value getVarTableIndex()
Reference to a variable in the shared variable table. More than one variable can reference the same variable in the table. The `var_table_index` field is an index into `variable_table` in Breakpoint.
.google.protobuf.Int32Value var_table_index = 4;
- Specified by:
getVarTableIndex
in interfaceVariableOrBuilder
- Returns:
- The varTableIndex.
-
getVarTableIndexOrBuilder
public com.google.protobuf.Int32ValueOrBuilder getVarTableIndexOrBuilder()
Reference to a variable in the shared variable table. More than one variable can reference the same variable in the table. The `var_table_index` field is an index into `variable_table` in Breakpoint.
.google.protobuf.Int32Value var_table_index = 4;
- Specified by:
getVarTableIndexOrBuilder
in interfaceVariableOrBuilder
-
hasStatus
public boolean hasStatus()
Status associated with the variable. This field will usually stay unset. A status of a single variable only applies to that variable or expression. The rest of breakpoint data still remains valid. Variables might be reported in error state even when breakpoint is not in final state. The message may refer to variable name with `refers_to` set to `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. In either case variable value and members will be unset. Example of error message applied to name: `Invalid expression syntax`. Example of information message applied to value: `Not captured`. Examples of error message applied to value: * `Malformed string`, * `Field f not found in class C` * `Null pointer dereference`
.google.devtools.clouddebugger.v2.StatusMessage status = 5;
- Specified by:
hasStatus
in interfaceVariableOrBuilder
- Returns:
- Whether the status field is set.
-
getStatus
public StatusMessage getStatus()
Status associated with the variable. This field will usually stay unset. A status of a single variable only applies to that variable or expression. The rest of breakpoint data still remains valid. Variables might be reported in error state even when breakpoint is not in final state. The message may refer to variable name with `refers_to` set to `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. In either case variable value and members will be unset. Example of error message applied to name: `Invalid expression syntax`. Example of information message applied to value: `Not captured`. Examples of error message applied to value: * `Malformed string`, * `Field f not found in class C` * `Null pointer dereference`
.google.devtools.clouddebugger.v2.StatusMessage status = 5;
- Specified by:
getStatus
in interfaceVariableOrBuilder
- Returns:
- The status.
-
getStatusOrBuilder
public StatusMessageOrBuilder getStatusOrBuilder()
Status associated with the variable. This field will usually stay unset. A status of a single variable only applies to that variable or expression. The rest of breakpoint data still remains valid. Variables might be reported in error state even when breakpoint is not in final state. The message may refer to variable name with `refers_to` set to `VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`. In either case variable value and members will be unset. Example of error message applied to name: `Invalid expression syntax`. Example of information message applied to value: `Not captured`. Examples of error message applied to value: * `Malformed string`, * `Field f not found in class C` * `Null pointer dereference`
.google.devtools.clouddebugger.v2.StatusMessage status = 5;
- Specified by:
getStatusOrBuilder
in interfaceVariableOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Variable parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Variable parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Variable parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Variable parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Variable parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Variable parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Variable parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Variable parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Variable parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Variable parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Variable parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Variable parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Variable.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Variable.Builder newBuilder()
-
newBuilder
public static Variable.Builder newBuilder(Variable prototype)
-
toBuilder
public Variable.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Variable.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Variable getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Variable> parser()
-
getParserForType
public com.google.protobuf.Parser<Variable> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Variable getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-