This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Valgrind support for TMS320DM365

Other Parts Discussed in Thread: TMS320DM365

Hi

We have developed an application using ipnc_rdk version 5.0  for TMS320DM365 .
We have memory leak in the application.
We cross compiled valgrind for arm using arm- arago.
But when we run valgrind on the device, it shows illegal instruction error.

We saw couple of posts  telling that valgrind doesn't support armv5.
We got valgrind patches for armv5 at below link, but they fail to apply in the valgrind source.
https://bugs.kde.org/show_bug.cgi?id=248998
We tried applying patches for valgrind 3.9.0 3.8.1 & 3.2.1 versions

Is there a valgrind version for armv5 ?
If not how can we debug memory leak error in our application.

 
Thanks and Regards,

Arpitha

  • Hi Arpitha,

    But when we run valgrind on the device, it shows illegal instruction error.
     


     
    In my understanding,
     
    The error seems to me  you have compiled the valgrind for armv7 arch and not for armv5 which is supported for DM365.
     
    Can you please check your cross compiler version.
     
    EX:
     
    arm-arago-linux-gnueabi-gcc --version
     
  • Hi Titus,

    You are correct. The error is because the valgrind is cross compiled for armv7.

    I am not bale to cross compile valgrind for armv5.

    I did the following

    1.  PATH=CROSS_COMPILER_PATH/bin:$PATH

    2.export CROSS_COMPILE=arm-arago-linux-gnueabi-

    3.export CC=${CROSS_COMPILE}gcc

    4.export CPP=${CROSS_COMPILE}cpp

    5.export CXX=${CROSS_COMPILE}g++

    6.export LD=${CROSS_COMPILE}ld

    7. export AR=${CROSS_COMPILE}ar

    8../configure --target=arm-arago-linux-gnueabi --host=armv5-arago-linux-gnueabi --prefix=/home/still-image/OV7955_ver5_0/ipnc_rdk/target/filesys/opt/ipnc/valgrind CFLAGS=-static

    I get following error

    "checking for a supported CPU... no (armv5)
    configure: error: Unsupported host architecture. Sorry"

    And the cross compiler version is 4.3.3 (arm-arago-linux-gnueabi-gcc (GCC) 4.3.3)

    I even tried with arm-none-linux-gnueabi. But the error remains same.

    Few posts tell that valgrind doesn't support armv5. We  tried applying the patches for armv5 support but we couldn't apply those patches.

    Are the steps followed correct?

    Is there any valgrind version which supports armv5?

    Thanks and Regards,

    Arpitha

  • Hi,

    I think valgrind doesn't support for armv5 arch,

    Try montavista toolchain (arm_v5t_le-)

    I have tried and I met lot of compilation errors,

    Why are you not trying other debugging methods?

    1) Try to use Remote debugging through gdbserver

    2) Try to use arm gdb debugging,

    3) Use memwatch

    4) Check your app source code for pointer & memory usage,

    5) Check If exist any dangling pointer etc.,

    Refer the following links,

    http://www.linuxjournal.com/article/6059

    http://processors.wiki.ti.com/index.php/Linux_Debugging_Overview

    https://developer.ridgerun.com/wiki/index.php/Debug_and_Profiling_Guide#Valgrind

  • Hi Sir,

    Unable to build valgrind on ubuntu 64 bit    x86_64-linux-gnu  (Intel® Core™2 Duo CPU E7500 @ 2.93GHz × 2 ) For target=arm-arago-linux-gnueabi ...

    steps:

    export CC=arm-arago-linux-gnueabi-gcc
    export LD=arm-arago-linux-gnueabi-ld
    export AR=arm-arago-linux-gnueabi-ar

    ./autogen.sh

    ./configure --target=arm-arago-linux-gnueabi --host=x86_64-linux-gnu

    make -j4

    error message:

    make  all-recursive
    make[1]: Entering directory `/home/sachin/valgrind-3.10.1'
    Making all in include
    make[2]: Entering directory `/home/sachin/valgrind-3.10.1/include'
    make[2]: Nothing to be done for `all'.
    make[2]: Leaving directory `/home/sachin/valgrind-3.10.1/include'
    Making all in VEX
    make[2]: Entering directory `/home/sachin/valgrind-3.10.1/VEX'
    make  all-am
    make[3]: Entering directory `/home/sachin/valgrind-3.10.1/VEX'
    make[3]: Nothing to be done for `all-am'.
    make[3]: Leaving directory `/home/sachin/valgrind-3.10.1/VEX'
    make[2]: Leaving directory `/home/sachin/valgrind-3.10.1/VEX'
    Making all in coregrind
    make[2]: Entering directory `/home/sachin/valgrind-3.10.1/coregrind'
    make  all-am
    make[3]: Entering directory `/home/sachin/valgrind-3.10.1/coregrind'
    arm-arago-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -I../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/usr/local/lib/valgrind"\" -DVG_PLATFORM="\"amd64-linux\""  -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -fomit-frame-pointer -DENABLE_LINUX_TICKET_LOCK -Wno-long-long  -fno-stack-protector -MT libcoregrind_amd64_linux_a-m_addrinfo.o -MD -MP -MF .deps/libcoregrind_amd64_linux_a-m_addrinfo.Tpo -c -o libcoregrind_amd64_linux_a-m_addrinfo.o `test -f 'm_addrinfo.c' || echo './'`m_addrinfo.c
    In file included from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen.h:57:2: error: #error "Need to define per-ARCH Xen types for this platform"
    In file included from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen.h:60: error: 'void' must be the only parameter
    ../include/vki/vki-xen.h:60: warning: data definition has no type or storage class
    ../include/vki/vki-xen.h:60: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:61: warning: data definition has no type or storage class
    ../include/vki/vki-xen.h:61: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:61: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen.h:61: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:62: warning: data definition has no type or storage class
    ../include/vki/vki-xen.h:62: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:62: warning: parameter names (without types) in function declaration
    ../include/vki/vki-xen.h:62: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:64: error: expected ')' before 'unsigned'
    ../include/vki/vki-xen.h:64: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:66: error: expected ')' before 'vki_int16_t'
    ../include/vki/vki-xen.h:66: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:67: error: expected ')' before 'vki_int32_t'
    ../include/vki/vki-xen.h:67: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:68: error: expected ')' before 'vki_int64_t'
    ../include/vki/vki-xen.h:68: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:70: error: expected ')' before 'vki_uint8_t'
    ../include/vki/vki-xen.h:70: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:71: error: expected ')' before 'vki_uint16_t'
    ../include/vki/vki-xen.h:71: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:72: error: expected ')' before 'vki_uint32_t'
    ../include/vki/vki-xen.h:72: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:73: error: expected ')' before 'vki_uint64_t'
    ../include/vki/vki-xen.h:73: error: expected ')' before 'const'
    ../include/vki/vki-xen.h:76: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    In file included from ../include/vki/vki-xen.h:80,
                     from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen-domctl.h:105: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:118: warning: data definition has no type or storage class
    ../include/vki/vki-xen-domctl.h:118: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-domctl.h:118: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen-domctl.h:118: error: expected ')' before 'const'
    ../include/vki/vki-xen-domctl.h:124: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:137: warning: data definition has no type or storage class
    ../include/vki/vki-xen-domctl.h:137: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-domctl.h:137: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen-domctl.h:137: error: expected ')' before 'const'
    ../include/vki/vki-xen-domctl.h:143: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:157: warning: data definition has no type or storage class
    ../include/vki/vki-xen-domctl.h:157: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-domctl.h:157: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen-domctl.h:157: error: expected ')' before 'const'
    ../include/vki/vki-xen-domctl.h:166: warning: data definition has no type or storage class
    ../include/vki/vki-xen-domctl.h:166: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-domctl.h:166: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen-domctl.h:166: error: expected ')' before 'const'
    ../include/vki/vki-xen-domctl.h:169: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:207: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-domctl.h:214: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:219: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-domctl.h:229: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:244: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:271: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:291: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:294: warning: data definition has no type or storage class
    ../include/vki/vki-xen-domctl.h:294: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-domctl.h:294: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen-domctl.h:294: error: expected ')' before 'const'
    ../include/vki/vki-xen-domctl.h:298: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-domctl.h:301: warning: data definition has no type or storage class
    ../include/vki/vki-xen-domctl.h:301: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-domctl.h:301: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen-domctl.h:301: error: expected ')' before 'const'
    ../include/vki/vki-xen-domctl.h:306: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-domctl.h:309: warning: data definition has no type or storage class
    ../include/vki/vki-xen-domctl.h:309: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-domctl.h:309: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen-domctl.h:309: error: expected ')' before 'const'
    ../include/vki/vki-xen-domctl.h:312: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-domctl.h:318: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-domctl.h:349: error: expected specifier-qualifier-list before 'vki_xen_pfn_t'
    In file included from ../include/vki/vki-xen.h:81,
                     from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen-sysctl.h:53: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-sysctl.h:66: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-sysctl.h:75: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-sysctl.h:84: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-sysctl.h:109: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-sysctl.h:115: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-sysctl.h:122: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE_64'
    ../include/vki/vki-xen-sysctl.h:134: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    ../include/vki/vki-xen-sysctl.h:150: error: expected specifier-qualifier-list before 'vki_xen_uint64_aligned_t'
    In file included from ../include/vki/vki-xen.h:82,
                     from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen-mmuext.h:30: error: expected specifier-qualifier-list before 'vki_xen_pfn_t'
    ../include/vki/vki-xen-mmuext.h:38: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE'
    In file included from ../include/vki/vki-xen.h:83,
                     from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen-memory.h:28: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-memory.h:37: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-memory.h:46: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-memory.h:61: error: expected specifier-qualifier-list before 'vki_xen_ulong_t'
    ../include/vki/vki-xen-memory.h:67: error: expected specifier-qualifier-list before 'vki_xen_pfn_t'
    In file included from ../include/vki/vki-xen.h:84,
                     from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen-evtchn.h:17: warning: data definition has no type or storage class
    ../include/vki/vki-xen-evtchn.h:17: warning: type defaults to 'int' in declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-evtchn.h:17: error: conflicting types for '___DEFINE_VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen.h:60: error: previous declaration of '___DEFINE_VKI_XEN_GUEST_HANDLE' was here
    ../include/vki/vki-xen-evtchn.h:17: error: expected ')' before 'const'
    In file included from ../include/vki/vki-xen.h:85,
                     from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen-gnttab.h:25: error: expected specifier-qualifier-list before 'VKI_XEN_GUEST_HANDLE'
    In file included from ../include/vki/vki-xen.h:88,
                     from ../include/pub_tool_vki.h:58,
                     from pub_core_vki.h:44,
                     from pub_core_threadstate.h:44,
                     from m_addrinfo.c:43:
    ../include/vki/vki-xen-tmem.h:4: error: function definition declared 'typedef'
    ../include/vki/vki-xen-tmem.h:4: warning: return type defaults to 'int'
    ../include/vki/vki-xen-tmem.h:4: warning: no previous prototype for 'VKI_XEN_GUEST_HANDLE'
    ../include/vki/vki-xen-tmem.h: In function 'VKI_XEN_GUEST_HANDLE':
    ../include/vki/vki-xen-tmem.h:4: error: expected declaration specifiers before 'vki_xen_tmem_cli_va_t'
    ../include/vki/vki-xen-tmem.h:60: error: expected specifier-qualifier-list before 'vki_xen_tmem_cli_va_t'
    ../include/vki/vki-xen-tmem.h:27: warning: empty declaration
    ../include/vki/vki-xen-tmem.h:63: warning: empty declaration
    In file included from m_addrinfo.c:43:
    pub_core_threadstate.h:66: error: storage class specified for parameter 'ThreadStatus'
    pub_core_threadstate.h:78: error: storage class specified for parameter 'VgSchedReturnCode'
    pub_core_threadstate.h:84: error: storage class specified for parameter 'VexGuestArchState'
    pub_core_threadstate.h:104: warning: empty declaration
    pub_core_threadstate.h:105: warning: empty declaration
    pub_core_threadstate.h:119: error: expected specifier-qualifier-list before 'VexGuestArchState'
    pub_core_threadstate.h:130: error: storage class specified for parameter 'ThreadArchState'
    pub_core_threadstate.h:285: error: storage class specified for parameter 'ThreadOSstate'
    pub_core_threadstate.h:300: error: expected specifier-qualifier-list before 'ThreadStatus'
    pub_core_threadstate.h:371: error: storage class specified for parameter 'ThreadState'
    pub_core_threadstate.h:381: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'vgPlain_threads'
    pub_core_threadstate.h:385: error: storage class specified for parameter 'vgPlain_running_tid'
    pub_core_threadstate.h:396: error: expected ')' before 'status'
    pub_core_threadstate.h:399: error: expected ')' before 'retcode'
    pub_core_threadstate.h:402: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    pub_core_threadstate.h:405: error: storage class specified for parameter 'vgPlain_is_valid_tid'
    pub_core_threadstate.h:408: error: storage class specified for parameter 'vgPlain_is_running_thread'
    pub_core_threadstate.h:411: error: storage class specified for parameter 'vgPlain_is_exiting'
    pub_core_threadstate.h:414: error: storage class specified for parameter 'vgPlain_count_living_threads'
    pub_core_threadstate.h:417: error: storage class specified for parameter 'vgPlain_count_runnable_threads'
    pub_core_threadstate.h:421: error: storage class specified for parameter 'vgPlain_lwpid_to_vgtid'
    In file included from pub_core_stacktrace.h:39,
                     from m_addrinfo.c:44:
    ../include/pub_tool_stacktrace.h:37: error: storage class specified for parameter 'StackTrace'
    ../include/pub_tool_stacktrace.h:62: error: expected declaration specifiers or '...' before 'StackTrace'
    ../include/pub_tool_stacktrace.h:63: error: expected declaration specifiers or '...' before 'StackTrace'
    ../include/pub_tool_stacktrace.h:64: error: expected declaration specifiers or '...' before 'StackTrace'
    ../include/pub_tool_stacktrace.h:65: error: storage class specified for parameter 'vgPlain_get_StackTrace'
    ../include/pub_tool_stacktrace.h:75: error: expected declaration specifiers or '...' before 'StackTrace'
    ../include/pub_tool_stacktrace.h:76: error: storage class specified for parameter 'vgPlain_apply_StackTrace'
    ../include/pub_tool_stacktrace.h:79: error: expected ')' before 'ips'
    ../include/pub_tool_stacktrace.h:83: error: storage class specified for parameter 'vgPlain_get_and_pp_StackTrace'
    In file included from m_addrinfo.c:45:
    pub_core_stacks.h:50: error: storage class specified for parameter 'vgPlain_register_stack'
    pub_core_stacks.h:51: error: storage class specified for parameter 'vgPlain_deregister_stack'
    pub_core_stacks.h:52: error: storage class specified for parameter 'vgPlain_change_stack'
    pub_core_stacks.h:53: error: storage class specified for parameter 'vgPlain_stack_limits'
    pub_core_stacks.h:57: error: storage class specified for parameter 'vgPlain_unknown_SP_update_w_ECU'
    pub_core_stacks.h:59: error: storage class specified for parameter 'vgPlain_unknown_SP_update'
    In file included from pub_core_aspacemgr.h:42,
                     from m_addrinfo.c:46:
    ../include/pub_tool_aspacemgr.h:50: error: storage class specified for parameter 'SegKind'
    ../include/pub_tool_aspacemgr.h:59: error: storage class specified for parameter 'ShrinkMode'
    ../include/pub_tool_aspacemgr.h:96: error: expected specifier-qualifier-list before 'SegKind'
    ../include/pub_tool_aspacemgr.h:118: error: storage class specified for parameter 'NSegment'
    ../include/pub_tool_aspacemgr.h:134: error: storage class specified for parameter 'vgPlain_am_get_segment_starts'
    ../include/pub_tool_aspacemgr.h:138: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
    ../include/pub_tool_aspacemgr.h:141: error: expected ')' before 'const'
    ../include/pub_tool_aspacemgr.h:145: error: storage class specified for parameter 'vgPlain_am_is_valid_for_client'
    ../include/pub_tool_aspacemgr.h:149: error: storage class specified for parameter 'vgPlain_am_shadow_alloc'
    ../include/pub_tool_aspacemgr.h:153: error: storage class specified for parameter 'vgPlain_am_munmap_valgrind'
    In file included from m_addrinfo.c:46:
    pub_core_aspacemgr.h:62: error: storage class specified for parameter 'vgPlain_am_startup'
    pub_core_aspacemgr.h:76: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
    pub_core_aspacemgr.h:93: error: storage class specified for parameter 'vgPlain_am_is_valid_for_valgrind'
    pub_core_aspacemgr.h:100: error: storage class specified for parameter 'vgPlain_am_is_valid_for_client_or_free_or_resvn'
    pub_core_aspacemgr.h:105: error: storage class specified for parameter 'vgPlain_am_get_anonsize_total'
    pub_core_aspacemgr.h:108: error: storage class specified for parameter 'vgPlain_am_show_nsegments'
    pub_core_aspacemgr.h:128: error: storage class specified for parameter 'vgPlain_am_do_sync_check'
    pub_core_aspacemgr.h:142: error: storage class specified for parameter 'MapRequest'
    pub_core_aspacemgr.h:152: error: expected ')' before '*' token
    pub_core_aspacemgr.h:159: error: storage class specified for parameter 'vgPlain_am_get_advisory_client_simple'
    pub_core_aspacemgr.h:170: error: storage class specified for parameter 'vgPlain_am_covered_by_single_free_segment'
    pub_core_aspacemgr.h:177: error: storage class specified for parameter 'vgPlain_am_notify_client_mmap'
    pub_core_aspacemgr.h:183: error: storage class specified for parameter 'vgPlain_am_notify_client_shmat'
    pub_core_aspacemgr.h:194: error: storage class specified for parameter 'vgPlain_am_notify_mprotect'
    pub_core_aspacemgr.h:202: error: storage class specified for parameter 'vgPlain_am_notify_munmap'
    pub_core_aspacemgr.h:210: error: storage class specified for parameter 'vgPlain_am_do_mmap_NO_NOTIFY'
    pub_core_aspacemgr.h:224: error: storage class specified for parameter 'vgPlain_am_mmap_file_fixed_client'
    pub_core_aspacemgr.h:226: error: storage class specified for parameter 'vgPlain_am_mmap_named_file_fixed_client'
    pub_core_aspacemgr.h:231: error: storage class specified for parameter 'vgPlain_am_mmap_anon_fixed_client'
    pub_core_aspacemgr.h:236: error: storage class specified for parameter 'vgPlain_am_mmap_anon_float_client'
    pub_core_aspacemgr.h:241: error: storage class specified for parameter 'vgPlain_am_mmap_anon_float_valgrind'
    pub_core_aspacemgr.h:247: error: storage class specified for parameter 'vgPlain_am_mmap_file_float_valgrind'
    pub_core_aspacemgr.h:253: error: storage class specified for parameter 'vgPlain_am_shared_mmap_file_float_valgrind'
    pub_core_aspacemgr.h:261: error: storage class specified for parameter 'vgPlain_am_munmap_client'
    pub_core_aspacemgr.h:267: error: storage class specified for parameter 'vgPlain_am_change_ownership_v_to_c'
    pub_core_aspacemgr.h:275: warning: type defaults to 'int' in declaration of 'NSegment'
    pub_core_aspacemgr.h:275: error: expected ';', ',' or ')' before '*' token
    pub_core_aspacemgr.h:280: warning: type defaults to 'int' in declaration of 'NSegment'
    pub_core_aspacemgr.h:280: error: expected ';', ',' or ')' before '*' token
    pub_core_aspacemgr.h:293: error: expected declaration specifiers or '...' before 'ShrinkMode'
    pub_core_aspacemgr.h:293: error: storage class specified for parameter 'vgPlain_am_create_reservation'
    pub_core_aspacemgr.h:306: warning: type defaults to 'int' in declaration of 'NSegment'
    pub_core_aspacemgr.h:306: error: expected ';', ',' or ')' before '*' token
    pub_core_aspacemgr.h:318: warning: type defaults to 'int' in declaration of 'NSegment'
    pub_core_aspacemgr.h:318: error: expected ';', ',' or ')' before '*' token
    pub_core_aspacemgr.h:330: error: storage class specified for parameter 'vgPlain_am_relocate_nooverlap_client'
    pub_core_aspacemgr.h:354: error: storage class specified for parameter 'VgStack'
    pub_core_aspacemgr.h:363: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    pub_core_aspacemgr.h:368: error: expected ')' before '*' token
    m_addrinfo.c:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:89: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:275: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:281: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:317: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:334: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:342: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:350: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:558: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:563: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    m_addrinfo.c:570: error: old-style parameter declarations in prototyped function definition
    ../include/vki/vki-xen-tmem.h:4: error: parameter name omitted
    m_addrinfo.c:565: error: expected '{' at end of input
    make[3]: *** [libcoregrind_amd64_linux_a-m_addrinfo.o] Error 1
    make[3]: Leaving directory `/home/sachin/valgrind-3.10.1/coregrind'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/home/sachin/valgrind-3.10.1/coregrind'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/sachin/valgrind-3.10.1'
    make: *** [all] Error 2