diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-14 08:53:35 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-01-18 10:01:19 -0700 |
commit | 85e428a69f5b34770ec4f76168d3c8dbb3a454bf (patch) | |
tree | 6f2d45133c42c15edf45088558956ef5d65b7028 /gdb/location.h | |
parent | 2b0c285ea552d2ce116efb85af749d69ebbddb59 (diff) | |
download | fsf-binutils-gdb-85e428a69f5b34770ec4f76168d3c8dbb3a454bf.zip fsf-binutils-gdb-85e428a69f5b34770ec4f76168d3c8dbb3a454bf.tar.gz fsf-binutils-gdb-85e428a69f5b34770ec4f76168d3c8dbb3a454bf.tar.bz2 |
Use std::string in event_location
This changes event_location to use std::string, removing some manual
memory management, and an unnecessary string copy.
Diffstat (limited to 'gdb/location.h')
-rw-r--r-- | gdb/location.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/location.h b/gdb/location.h index b391ce3..4cabf26 100644 --- a/gdb/location.h +++ b/gdb/location.h @@ -112,7 +112,7 @@ extern enum event_location_type /* Return a linespec string representation of the given explicit location. The location must already be canonicalized/valid. */ -extern gdb::unique_xmalloc_ptr<char> +extern std::string explicit_location_to_linespec (const struct explicit_location *explicit_loc); /* Return a string representation of the LOCATION. @@ -275,11 +275,10 @@ extern event_location_up extern int event_location_empty_p (const struct event_location *location); -/* Set the location's string representation. If STRING is NULL, clear - the string representation. */ +/* Set the location's string representation. */ extern void set_event_location_string (struct event_location *location, - gdb::unique_xmalloc_ptr<char> string); + std::string &&string); #endif /* LOCATION_H */ |