Notify the debugger of class preparation.
Change-Id: Ic9863d0cc1176c474df2239a286a01393845d589
diff --git a/src/jdwp/jdwp_expand_buf.cc b/src/jdwp/jdwp_expand_buf.cc
index 30ebf00..96c2cfe 100644
--- a/src/jdwp/jdwp_expand_buf.cc
+++ b/src/jdwp/jdwp_expand_buf.cc
@@ -166,14 +166,19 @@
* they can be null-terminated (either they don't have null bytes or they
* have stored null bytes in a multi-byte encoding).
*/
-void expandBufAddUtf8String(ExpandBuf* pBuf, const char* str) {
- int strLen = strlen(str);
-
+void expandBufAddUtf8String(ExpandBuf* pBuf, const char* s) {
+ int strLen = strlen(s);
ensureSpace(pBuf, sizeof(uint32_t) + strLen);
- SetUtf8String(pBuf->storage + pBuf->curLen, str, strLen);
+ SetUtf8String(pBuf->storage + pBuf->curLen, s, strLen);
pBuf->curLen += sizeof(uint32_t) + strLen;
}
+void expandBufAddUtf8String(ExpandBuf* pBuf, const std::string& s) {
+ ensureSpace(pBuf, sizeof(uint32_t) + s.size());
+ SetUtf8String(pBuf->storage + pBuf->curLen, s.data(), s.size());
+ pBuf->curLen += sizeof(uint32_t) + s.size();
+}
+
} // namespace JDWP
} // namespace art