[dyninst] * Fri Jul 13 2012 William Cohen <wcohen at redhat.com> - 7.99-0.18 - Rebase on newer git tree the has a

William Eden Cohen wcohen at fedoraproject.org
Fri Jul 13 20:09:22 UTC 2012


commit 221ead6cbd3f6812e0a4df85029f0accb0f55cda
Author: William Cohen <wcohen at redhat.com>
Date:   Fri Jul 13 16:08:34 2012 -0400

    * Fri Jul 13 2012 William Cohen <wcohen at redhat.com> - 7.99-0.18
    - Rebase on newer git tree the has a number of merges into it.
    - Adjust spec file to allow direct use of git patches
    - Fix to eliminate unused varables.
    - Proper delete for array.

 dyninst-delete_array.patch |   19 ++++
 dyninst-stdint.patch       |   23 ----
 dyninst-unused_vars.patch  |  244 ++++++++++++++++++++++++++++++++++++++++++++
 dyninst.spec               |   19 +++-
 sources                    |    2 +-
 5 files changed, 279 insertions(+), 28 deletions(-)
---
diff --git a/dyninst-delete_array.patch b/dyninst-delete_array.patch
new file mode 100644
index 0000000..3f717f1
--- /dev/null
+++ b/dyninst-delete_array.patch
@@ -0,0 +1,19 @@
+commit d4d422b792f5621e5b08e4025bd3f2d447857c0a
+Author: William Cohen <wcohen at redhat.com>
+Date:   Tue Jul 10 09:46:31 2012 -0400
+
+    Use proper kind of delete for array object.
+
+diff --git a/dyninstAPI/src/BPatch_flowGraph.C b/dyninstAPI/src/BPatch_flowGraph.C
+index ea85413..638cfab 100644
+--- a/dyninstAPI/src/BPatch_flowGraph.C
++++ b/dyninstAPI/src/BPatch_flowGraph.C
+@@ -369,7 +369,7 @@ BPatch_basicBlock* BPatch_flowGraph::findBlockByAddr(Address where)
+   if (first <= last) {
+     ret = blocks[idx];
+   }
+-  delete blocks;
++  delete[] blocks;
+   return ret;
+ }
+ 
diff --git a/dyninst-unused_vars.patch b/dyninst-unused_vars.patch
new file mode 100644
index 0000000..fabb6c7
--- /dev/null
+++ b/dyninst-unused_vars.patch
@@ -0,0 +1,244 @@
+commit 59803a8928076463096fbaa8834ee15cd63852f9
+Author: William Cohen <wcohen at redhat.com>
+Date:   Mon Jul 9 15:25:42 2012 -0400
+
+    Remove the unused variable assignments for getenv() calls
+    
+    There were a number of places in the code that assigned the return value
+    of getenv to a variable. However, the variable was never used in most cases.
+    This patch cleans up those unneeded assignments.
+
+diff --git a/common/src/Annotatable.C b/common/src/Annotatable.C
+index bdc67a0..2b9f875 100644
+--- a/common/src/Annotatable.C
++++ b/common/src/Annotatable.C
+@@ -75,16 +75,15 @@ void annotations_debug_init()
+ {
+ 	if (dyn_debug_annotations) return;
+ 
+-	char *p;
+-	if ( (p=getenv("DYNINST_DEBUG_ANNOTATIONS"))) {
++	if (getenv("DYNINST_DEBUG_ANNOTATIONS")) {
+ 		fprintf(stderr, "Enabling DyninstAPI annotations debug\n");
+ 		dyn_debug_annotations = true;
+ 	}
+-	else if ( (p=getenv("DYNINST_DEBUG_ANNOTATION"))) {
++	else if (getenv("DYNINST_DEBUG_ANNOTATION")) {
+ 		fprintf(stderr, "Enabling DyninstAPI annotations debug\n");
+ 		dyn_debug_annotations = true;
+ 	}
+-	else if ( (p=getenv("DYNINST_DEBUG_ANNOTATABLE"))) {
++	else if (getenv("DYNINST_DEBUG_ANNOTATABLE")) {
+ 		fprintf(stderr, "Enabling DyninstAPI annotations debug\n");
+ 		dyn_debug_annotations = true;
+ 	}
+diff --git a/dataflowAPI/src/debug_dataflow.C b/dataflowAPI/src/debug_dataflow.C
+index d1adf11..6499375 100644
+--- a/dataflowAPI/src/debug_dataflow.C
++++ b/dataflowAPI/src/debug_dataflow.C
+@@ -54,34 +54,32 @@ bool df_init_debug() {
+   if (init) return true;
+   init = true;
+ 
+-  char *p;
+-
+ #if defined(_MSC_VER)
+ #pragma warning(push)
+ #pragma warning(disable:4996) 
+ #endif
+ 
+-  if ((p=getenv("DATAFLOW_DEBUG_STACKANALYSIS"))) {
++  if ((getenv("DATAFLOW_DEBUG_STACKANALYSIS"))) {
+     fprintf(stderr, "Enabling DataflowAPI stack analysis debugging\n");
+     df_debug_stackanalysis = 1;
+   }
+ 
+-  if ((p=getenv("DATAFLOW_DEBUG_SLICING"))) {
++  if ((getenv("DATAFLOW_DEBUG_SLICING"))) {
+     fprintf(stderr, "Enabling DataflowAPI slicing debugging\n");
+     df_debug_slicing = 1;
+   }
+ 
+-  if ((p=getenv("DATAFLOW_DEBUG_CONVERT"))) {
++  if ((getenv("DATAFLOW_DEBUG_CONVERT"))) {
+     fprintf(stderr, "Enabling DataflowAPI->ROSE conversion debugging\n");
+     df_debug_convert = 1;
+   }
+ 
+-  if ((p=getenv("DATAFLOW_DEBUG_EXPAND"))) {
++  if ((getenv("DATAFLOW_DEBUG_EXPAND"))) {
+     fprintf(stderr, "Enabling DataflowAPI symbolic expansion debugging\n");
+     df_debug_expand = 1;
+   }
+ 
+-  if ((p=getenv("DATAFLOW_DEBUG_LIVENESS"))) {
++  if ((getenv("DATAFLOW_DEBUG_LIVENESS"))) {
+     fprintf(stderr, "Enabling DataflowAPI liveness debugging\n");
+     df_debug_liveness = 1;
+   }
+diff --git a/dyninstAPI/src/Relocation/patchapi_debug.C b/dyninstAPI/src/Relocation/patchapi_debug.C
+index 474ba0f..14fa96a 100644
+--- a/dyninstAPI/src/Relocation/patchapi_debug.C
++++ b/dyninstAPI/src/Relocation/patchapi_debug.C
+@@ -45,15 +45,14 @@ bool init_debug_patchapi() {
+   if (init) return true;
+   init = true;
+ 
+-  char *p;
+-  if ( (p=getenv("DYNINST_DEBUG_RELOCATION")) ||
+-       (p=getenv("PATCHAPI_DEBUG_RELOCATION"))) {
++  if ( getenv("DYNINST_DEBUG_RELOCATION") ||
++       getenv("PATCHAPI_DEBUG_RELOCATION")) {
+      fprintf(stderr, "Enabling DyninstAPI relocation debug\n");
+      patch_debug_relocation = 1;
+   }
+ 
+-  if ( (p=getenv("DYNINST_DEBUG_SPRINGBOARD")) ||
+-       (p=getenv("PATCHAPI_DEBUG_SPRINGBOARD"))) {
++  if ( getenv("DYNINST_DEBUG_SPRINGBOARD") ||
++       getenv("PATCHAPI_DEBUG_SPRINGBOARD")) {
+      fprintf(stderr, "Enabling DyninstAPI springboard debug\n");
+      patch_debug_relocation = 1;
+   }
+diff --git a/dyninstAPI/src/debug.C b/dyninstAPI/src/debug.C
+index 8bb677b..a6ecc86 100644
+--- a/dyninstAPI/src/debug.C
++++ b/dyninstAPI/src/debug.C
+@@ -243,19 +243,19 @@ bool init_debug() {
+   init = true;
+ 
+   char *p;
+-  if ( (p=getenv("DYNINST_DEBUG_MALWARE"))) {
++  if (getenv("DYNINST_DEBUG_MALWARE")) {
+     fprintf(stderr, "Enabling DyninstAPI malware debug\n");
+     dyn_debug_malware = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_TRAP"))) {
++  if (getenv("DYNINST_DEBUG_TRAP")) {
+     fprintf(stderr, "Enabling DyninstAPI debugging using traps\n");
+     dyn_debug_trap = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_SPRINGBOARD"))) {
++  if (getenv("DYNINST_DEBUG_SPRINGBOARD")) {
+     fprintf(stderr, "Enabling DyninstAPI springboard debug\n");
+     dyn_debug_springboard = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_STARTUP"))) {
++  if (getenv("DYNINST_DEBUG_STARTUP")) {
+     fprintf(stderr, "Enabling DyninstAPI startup debug\n");
+     dyn_debug_startup = 1;
+   }
+@@ -271,68 +271,68 @@ bool init_debug() {
+ 	    dyn_debug_parsing = 1;
+ 	  }
+   }
+-  if (    (p=getenv("DYNINST_DEBUG_DYNPC")) 
+-       || (p=getenv("DYNINST_DEBUG_FORKEXEC")) 
+-       || (p=getenv("DYNINST_DEBUG_INFRPC"))
+-       || (p=getenv("DYNINST_DEBUG_SIGNAL"))
+-       || (p=getenv("DYNINST_DEBUG_INFERIORRPC"))
+-       || (p=getenv("DYNINST_DEBUG_THREAD"))
+-       || (p=getenv("DYNINST_DEBUG_MAILBOX"))
+-       || (p=getenv("DYNINST_DEBUG_DBI"))
++  if (    getenv("DYNINST_DEBUG_DYNPC")
++       || getenv("DYNINST_DEBUG_FORKEXEC")
++       || getenv("DYNINST_DEBUG_INFRPC")
++       || getenv("DYNINST_DEBUG_SIGNAL")
++       || getenv("DYNINST_DEBUG_INFERIORRPC")
++       || getenv("DYNINST_DEBUG_THREAD")
++       || getenv("DYNINST_DEBUG_MAILBOX")
++       || getenv("DYNINST_DEBUG_DBI")
+      ) 
+   {
+     fprintf(stderr, "Enabling DyninstAPI process control debug\n");
+     dyn_debug_proccontrol = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_STACKWALK"))) {
++  if (getenv("DYNINST_DEBUG_STACKWALK")) {
+     fprintf(stderr, "Enabling DyninstAPI stack walking debug\n");
+     dyn_debug_stackwalk = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_INST"))) {
++  if (getenv("DYNINST_DEBUG_INST")) {
+     fprintf(stderr, "Enabling DyninstAPI inst debug\n");
+     dyn_debug_inst = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_RELOC"))) {
++  if (getenv("DYNINST_DEBUG_RELOC")) {
+     fprintf(stderr, "Enabling DyninstAPI relocation debug\n");
+     dyn_debug_reloc = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_RELOCATION"))) {
++  if (getenv("DYNINST_DEBUG_RELOCATION")) {
+     fprintf(stderr, "Enabling DyninstAPI relocation debug\n");
+     dyn_debug_reloc = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_SENSITIVITY"))) {
++  if (getenv("DYNINST_DEBUG_SENSITIVITY")) {
+     fprintf(stderr, "Enabling DyninstAPI sensitivity debug\n");
+     dyn_debug_sensitivity = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_DYN_UNW"))) {
++  if (getenv("DYNINST_DEBUG_DYN_UNW")) {
+     fprintf(stderr, "Enabling DyninstAPI dynamic unwind debug\n");
+     dyn_debug_dyn_unw = 1;
+     }
+-  if ( (p=getenv("DYNINST_DEBUG_MUTEX"))) {
++  if (getenv("DYNINST_DEBUG_MUTEX")) {
+     fprintf(stderr, "Enabling DyninstAPI mutex debug\n");
+     dyn_debug_mutex = 1;
+     }
+-  if ( (p=getenv("DYNINST_DEBUG_DWARF"))) {
++  if (getenv("DYNINST_DEBUG_DWARF")) {
+     fprintf(stderr, "Enabling DyninstAPI dwarf debug\n");
+     dyn_debug_dwarf= 1;
+     }
+-  if ( (p=getenv("DYNINST_DEBUG_RTLIB"))) {
++  if (getenv("DYNINST_DEBUG_RTLIB")) {
+       fprintf(stderr, "Enabling DyninstAPI RTlib debug\n");
+       dyn_debug_rtlib = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_CATCHUP"))) {
++  if (getenv("DYNINST_DEBUG_CATCHUP")) {
+       fprintf(stderr, "Enabling DyninstAPI catchup debug\n");
+       dyn_debug_catchup = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_BPATCH"))) {
++  if (getenv("DYNINST_DEBUG_BPATCH")) {
+       fprintf(stderr, "Enabling DyninstAPI bpatch debug\n");
+       dyn_debug_bpatch = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_REGALLOC"))) {
++  if (getenv("DYNINST_DEBUG_REGALLOC")) {
+       fprintf(stderr, "Enabling DyninstAPI register allocation debug\n");
+       dyn_debug_regalloc = 1;
+   }
+-  if ( (p=getenv("DYNINST_DEBUG_AST"))) {
++  if (getenv("DYNINST_DEBUG_AST")) {
+       fprintf(stderr, "Enabling DyninstAPI ast debug\n");
+       dyn_debug_ast = 1;
+   }
+@@ -351,7 +351,7 @@ bool init_debug() {
+      dyn_debug_crash = 1;
+      dyn_debug_crash_debugger = p;
+   }
+-  if ((p=getenv("DYNINST_DEBUG_DISASS"))) {
++  if (getenv("DYNINST_DEBUG_DISASS")) {
+       fprintf(stderr, "Enabling DyninstAPI instrumentation disassembly debugging\n");
+       dyn_debug_disassemble = 1;
+   }
+diff --git a/parseAPI/src/SymtabCodeSource.C b/parseAPI/src/SymtabCodeSource.C
+index 660fa9d..72b0fcd 100644
+--- a/parseAPI/src/SymtabCodeSource.C
++++ b/parseAPI/src/SymtabCodeSource.C
+@@ -273,9 +273,7 @@ SymtabCodeSource::SymtabCodeSource(char * file) :
+ 
+ bool
+ SymtabCodeSource::init_stats() {
+-    char *p;
+-
+-    if ((p = getenv("DYNINST_STATS_PARSING"))) {
++    if ((getenv("DYNINST_STATS_PARSING"))) {
+         parsing_printf("[%s] Enabling ParseAPI parsing statistics\n", FILE__);
+         // General counts
+         stats_parse->add(PARSE_BLOCK_COUNT, CountStat);
diff --git a/dyninst.spec b/dyninst.spec
index 8a41e41..fcfb39c 100644
--- a/dyninst.spec
+++ b/dyninst.spec
@@ -4,7 +4,7 @@ Summary: An API for Run-time Code Generation
 License: LGPLv2+
 Name: dyninst
 Group: Development/Libraries
-Release: 0.17%{?dist}
+Release: 0.18%{?dist}
 URL: http://www.dyninst.org
 Version: %version
 Exclusiveos: linux
@@ -14,14 +14,15 @@ ExcludeArch: s390 s390x %{arm}
 # The source for this package was pulled from upstream's vcs.  Use the
 # following commands to generate the tarball:
 #  git clone http://git.dyninst.org/dyninst.git; cd dyninst
-#  git archive --format=tar.gz --prefix=dyninst/ 590d6ca623a6f4b8dde1edff2742b2663d726329 >  dyninst-7.99.tar.gz
+#  git archive --format=tar.gz --prefix=dyninst/ 96826d0b7cbec7deb1398019ecadea5cf756c9c7 >  dyninst-7.99.tar.gz
 #  git clone http://git.dyninst.org/docs.git; cd docs
 #  git archive --format=tar.gz fe92e5b28804791ecadc893e469bc2215dbc3066 > dyninst-docs-7.99.tar.gz
 Source0: %{name}-%{version}.tar.gz
 Source1: %{name}-docs-%{version}.tar.gz
 # Change version number so official dyninst 8.0 will replace it
 Patch3: dyninst-git.patch
-Patch4: dyninst-stdint.patch
+Patch5: dyninst-unused_vars.patch
+Patch6: dyninst-delete_array.patch
 BuildRequires: libxml2-devel >= 2.7.8
 BuildRequires: libdwarf-devel 
 BuildRequires: elfutils-libelf-devel
@@ -59,7 +60,11 @@ the dyninst user-space libraries and interfaces.
 %setup -q -T -D -a 1
 
 %patch3 -p1 -b .git
-%patch4 -p1 -b .stdint
+
+pushd dyninst
+%patch5 -p1 -b .unused
+%patch6 -p1 -b .delete
+popd
 
 %build
 
@@ -123,6 +128,12 @@ chmod 644 %{buildroot}%{_libdir}/dyninst/*.a
 %{_libdir}/dyninst/*.a
 
 %changelog
+* Fri Jul 13 2012 William Cohen <wcohen at redhat.com> - 7.99-0.18
+- Rebase on newer git tree the has a number of merges into it.
+- Adjust spec file to allow direct use of git patches
+- Fix to eliminate unused varables.
+- Proper delete for array.
+
 * Thu Jun 28 2012 William Cohen <wcohen at redhat.com> - 7.99-0.17
 - Rebase on newer git repo.
 
diff --git a/sources b/sources
index de68513..1042bd3 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-24cb19de1dd3e385467d9351d3734972  dyninst-7.99.tar.gz
 be21f6a11b37a386e8b4ad16a86e3715  dyninst-docs-7.99.tar.gz
+78c2fde803c0c94c799fda7cb3f8eb34  dyninst-7.99.tar.gz


More information about the scm-commits mailing list