Hello,

this patch fixes at least autoconf and parsing of /proc/self/maps in a
way so that it "works" on NetBSD-current. It doesn't break anything
that's already there.
I'm aware that starting from scratch is advised, but I'm unsure whether
or not I hav enough time and experience to do such a port. For now, take
this trivial contribution to the project.

Best regards,

Moritz


Index: configure.in
===================================================================
--- configure.in        (revision 330)
+++ configure.in        (working copy)
@@ -207,6 +207,11 @@
         VG_OS="netbsdelf2"
         ;;
 
+     *netbsdelf5*)
+      AC_MSG_RESULT([ok (${host_os})])
+        VG_OS="netbsdelf2"
+        ;;
+
      *) 
        AC_MSG_RESULT([no (${host_os})])
        AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please 
consider doing a port.])
Index: coregrind/m_aspacemgr/aspacemgr.c
===================================================================
--- coregrind/m_aspacemgr/aspacemgr.c   (revision 330)
+++ coregrind/m_aspacemgr/aspacemgr.c   (working copy)
@@ -3284,6 +3284,9 @@
    /* Read a word-sized hex number. */
    Int n = 0;
    *val = 0;
+   if (*buf == '0' && *(buf+1) == 'x') {
+        buf += 2; n += 2;
+   }
    while (hexdigit(*buf) >= 0) {
       *val = (*val << 4) + hexdigit(*buf);
       n++; buf++;
@@ -3296,6 +3299,9 @@
    /* Read a potentially 64-bit hex number. */
    Int n = 0;
    *val = 0;
+   if (*buf == '0' && *(buf+1) == 'x') {
+        buf += 2; n += 2;
+   }
    while (hexdigit(*buf) >= 0) {
       *val = (*val << 4) + hexdigit(*buf);
       n++; buf++;
_______________________________________________
Vg4nbsd-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/vg4nbsd-devel

Reply via email to