valgrind: r3934 - trunk/coregrind

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

valgrind: r3934 - trunk/coregrind

svn-2
Author: tom
Date: 2005-06-18 12:58:18 +0100 (Sat, 18 Jun 2005)
New Revision: 3934

Log:
Make do_syscall_WRK take UWord arguments and return UWord results to
avoid inappropriate truncations on 64 bit systems. Also make it static
as it is not used anywhere else.

Modified:
   trunk/coregrind/m_syscall.c


Modified: trunk/coregrind/m_syscall.c
===================================================================
--- trunk/coregrind/m_syscall.c 2005-06-18 11:37:01 UTC (rev 3933)
+++ trunk/coregrind/m_syscall.c 2005-06-18 11:58:18 UTC (rev 3934)
@@ -83,10 +83,10 @@
    A function for doing syscalls.
    ------------------------------------------------------------------ */
 
-extern UInt do_syscall_WRK (
-          UInt syscall_no,
-          UInt a1, UInt a2, UInt a3,
-          UInt a4, UInt a5, UInt a6
+static UWord do_syscall_WRK (
+          UWord syscall_no,
+          UWord a1, UWord a2, UWord a3,
+          UWord a4, UWord a5, UWord a6
        );
 #if defined(VGP_x86_linux)
 /* Incoming args (syscall number + up to 6 args) come on the stack.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Reply | Threaded
Open this post in threaded view
|

Re: valgrind: r3934 - trunk/coregrind

njn (Bugzilla)-2
On Sat, 18 Jun 2005 [hidden email] wrote:

> Log:
> Make do_syscall_WRK take UWord arguments and return UWord results to
> avoid inappropriate truncations on 64 bit systems. Also make it static
> as it is not used anywhere else.

Thanks for fixing the argument type.

I made it extern because I get this warning when it's static:

   m_syscall.c:90: warning: 'do_syscall_WRK' used but never defined

Perhaps it should be extern and renamed VG_(do_syscall_WRK) to avoid
namespace pollution?

Nick


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Reply | Threaded
Open this post in threaded view
|

Re: valgrind: r3934 - trunk/coregrind

Tom Hughes-2
In message <[hidden email]>
          Nicholas Nethercote <[hidden email]> wrote:

> On Sat, 18 Jun 2005 [hidden email] wrote:
>
> > Log:
> > Make do_syscall_WRK take UWord arguments and return UWord results to
> > avoid inappropriate truncations on 64 bit systems. Also make it static
> > as it is not used anywhere else.
>
> Thanks for fixing the argument type.
>
> I made it extern because I get this warning when it's static:
>
>    m_syscall.c:90: warning: 'do_syscall_WRK' used but never defined
>
> Perhaps it should be extern and renamed VG_(do_syscall_WRK) to avoid
> namespace pollution?

I think the warning is because it is defined in the inline asm block
and the compiler doesn't realise that it is there.

Tom

--
Tom Hughes ([hidden email])
http://www.compton.nu/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
Reply | Threaded
Open this post in threaded view
|

Re: valgrind: r3934 - trunk/coregrind

njn (Bugzilla)-2
On Sat, 18 Jun 2005, Tom Hughes wrote:

>> I made it extern because I get this warning when it's static:
>>
>>    m_syscall.c:90: warning: 'do_syscall_WRK' used but never defined
>>
>> Perhaps it should be extern and renamed VG_(do_syscall_WRK) to avoid
>> namespace pollution?
>
> I think the warning is because it is defined in the inline asm block
> and the compiler doesn't realise that it is there.

Yes.  Making it extern means the compiler is happy to see its declaration
without a definition.

Nick


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers