This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: Add ftruncate support to newlib/gdb-sim to unbreak -fprofile-arcs
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: newlib at sources dot redhat dot com, gdb-patches at sources dot redhat dot com, gcc at gcc dot gnu dot org
- Date: Wed, 09 Jul 2003 21:01:53 +0100
- Subject: Re: RFA: Add ftruncate support to newlib/gdb-sim to unbreak -fprofile-arcs
- Organization: Codesourcery LLC
- References: <200307091927.h69JRfs29157@linsvr3.uk.superh.com>
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