diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-07-27 21:23:42 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-07-27 21:23:42 +0000 |
commit | 159f81f32fd09d84d1dafd11e90c6560dfe5d24f (patch) | |
tree | 527481b17f14de350d6daf3996078967798123a7 /gdb/target.h | |
parent | a7d421b8150c07eb5e9be3982f3e6ec2add9800e (diff) | |
download | gdb-159f81f32fd09d84d1dafd11e90c6560dfe5d24f.zip gdb-159f81f32fd09d84d1dafd11e90c6560dfe5d24f.tar.gz gdb-159f81f32fd09d84d1dafd11e90c6560dfe5d24f.tar.bz2 |
* target.h (target_read_stralloc): New prototype.
* target.c (target_read_alloc_1): Renamed from target_read_alloc.
Take new PADDING argument.
(target_read_alloc): Use it.
(target_read_stralloc): New function.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h index 2bb47fb..fb4361d 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -236,6 +236,16 @@ extern LONGEST target_read_alloc (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte **buf_p); +/* Read OBJECT/ANNEX using OPS. The result is NUL-terminated and + returned as a string, allocated using xmalloc. If an error occurs + or the transfer is unsupported, NULL is returned. Empty objects + are returned as allocated but empty strings. A warning is issued + if the result contains any embedded NUL bytes. */ + +extern char *target_read_stralloc (struct target_ops *ops, + enum target_object object, + const char *annex); + /* Wrappers to target read/write that perform memory transfers. They throw an error if the memory transfer fails. |