This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 4/6] Prepare linux_find_memory_regions_full & co. for move


On Fri, 22 Mar 2013 14:04:11 +0100, Aleksandar Ristovski wrote:
> --- a/gdb/target.c
> +++ b/gdb/target.c
[...]
> @@ -3540,15 +3578,17 @@ target_fileio_read_alloc (const char *filename, gdb_byte **buf_p)
>     are returned as allocated but empty strings.  A warning is issued
>     if the result contains any embedded NUL bytes.  */
>  
> -char *
> -target_fileio_read_stralloc (const char *filename)
> +typedef LONGEST (read_stralloc_func_ftype) (const char *filename,
> +					    gdb_byte **buf_p, int padding);
> +
> +static char *
> +read_stralloc (const char *filename, read_stralloc_func_ftype *func)
>  {
>    gdb_byte *buffer;
>    char *bufstr;
>    LONGEST i, transferred;
>  
> -  transferred = target_fileio_read_alloc_1 (filename, &buffer, 1);

> -  bufstr = (char *) buffer;

This line is accidentally deleted, it should not be.


> +  transferred = func (filename, &buffer, 1);
>  
>    if (transferred < 0)
>      return NULL;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]