Implement DDMS heap info ("HPIF") chunks.
This lets you see how many bytes/objects are in your managed heap.
Change-Id: Ie925207e9c48989a24968633e60b99314d220865
diff --git a/src/jdwp/jdwp_bits.h b/src/jdwp/jdwp_bits.h
index 59ece03..3b951f9 100644
--- a/src/jdwp/jdwp_bits.h
+++ b/src/jdwp/jdwp_bits.h
@@ -107,6 +107,26 @@
*buf = (uint8_t)(val);
}
+static inline void Write1BE(uint8_t** dst, uint8_t value) {
+ Set1(*dst, value);
+ *dst += sizeof(value);
+}
+
+static inline void Write2BE(uint8_t** dst, uint16_t value) {
+ Set2BE(*dst, value);
+ *dst += sizeof(value);
+}
+
+static inline void Write4BE(uint8_t** dst, uint32_t value) {
+ Set4BE(*dst, value);
+ *dst += sizeof(value);
+}
+
+static inline void Write8BE(uint8_t** dst, uint64_t value) {
+ Set8BE(*dst, value);
+ *dst += sizeof(value);
+}
+
/*
* Stuff a UTF-8 string into the buffer.
*/