RFA: Add ftruncate support to newlib/gdb-sim to unbreak -fprofile-arcs

Nathan Sidwell nathan@codesourcery.com
Wed Jul 9 20:02:00 GMT 2003


Joern Rennecke wrote:
> The recent change to libgcov to use ftruncate has broken -fprofile-arcs
> functionality for the newlib-based sh-elf toolchain.  The appended patches
> add ftruncate and truncate support to sh-elf newlib / gdb-sim .
thanks!


> + #define SYS_truncate	129
> + #define SYS_ftruncate	130

> --- libc/sys/sh/truncate.c	Wed Jul  9 17:18:48 2003
> ***************
> *** 0 ****
> --- 1,9 ----
> + #include <_ansi.h>
> + #include <sys/types.h>
> + #include "sys/syscall.h"
> + 
> + int
> + truncate (const char *path, off_t length)
> + {
> +   return __trap34 (SYS_ftruncate, path, length, 0);
                            ^ typo?

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
          The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gdb-patches mailing list