- gdb::unique_xmalloc_ptr<char> library_document
- = target_read_stralloc (¤t_target, TARGET_OBJECT_LIBRARIES, NULL);
- if (library_document == NULL)
+ gdb::optional<gdb::char_vector> library_document
+ = target_read_stralloc (current_top_target (), TARGET_OBJECT_LIBRARIES,
+ NULL);
+ if (!library_document)