Move savestring to common/common-utils.c, make gdbserver use it.
This makes gdbserver share gdb's savestring, instead of baking its own. Tested on x86_64 Fedora 17. gdb/ 2013-02-14 Pedro Alves <palves@redhat.com> * utils.c (savestring): Don't #undef it. Move function to common/common-utils.c. * common/common-utils.c: Include gdb_string.h. (savestring): Move here from utils.c. * common/common-utils.h (savestring): Declare. gdb/gdbserver/ 2013-02-14 Pedro Alves <palves@redhat.com> * tracepoint.c (save_string): Delete. (add_tracepoint_action): Use savestring instead of save_string.
This commit is contained in:
parent
57c3b6ede5
commit
baea0daecf
6 changed files with 32 additions and 31 deletions
|
@ -47,4 +47,10 @@ char *xstrvprintf (const char *format, va_list ap)
|
|||
int xsnprintf (char *str, size_t size, const char *format, ...)
|
||||
ATTRIBUTE_PRINTF (3, 4);
|
||||
|
||||
/* Make a copy of the string at PTR with LEN characters
|
||||
(and add a null character at the end in the copy).
|
||||
Uses malloc to get the space. Returns the address of the copy. */
|
||||
|
||||
char *savestring (const char *ptr, size_t len);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue