OSSP CVS Repository

ossp - Check-in [2178]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2178
Date: 2002-May-29 14:42:08 (local)
2002-May-29 12:42:08 (UTC)
User:ms
Branch:
Comment: Temporary debug segfault committal.
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc.c      1.29 -> 1.30     21 inserted, 5 deleted
ossp-pkg/rc/rc_anal.c      1.2 -> 1.3     34 inserted, 8 deleted

ossp-pkg/rc/rc.c 1.29 -> 1.30

--- rc.c 2002/05/22 16:01:49     1.29
+++ rc.c 2002/05/29 12:42:08     1.30
@@ -48,17 +48,33 @@
         configVerify();     /* Test for usage, help, and version options  */
 
         pAnal = analNew();  /* Construct a new configuration analyser     */
+TRACE("BeforeAnalparse");
         analParse(pAnal);   /* Preprocess the analysed configuration      */
+TRACE("AfterAnalparse");
     }
     ex_catch(Except) {      /* Exceptions during configuration and analysis */
-        if ((rc_return_t)Except.ex_value == RC_ERR_USE)
+TRACE("Hopla1");
+        if ((rc_return_t)Except.ex_value == RC_ERR_USE) {
+TRACE("Hopla2");
             clioptPrintusage();
-        else
+TRACE("Hopla3");
+        }
+        else {
+TRACE("Hopla4");
             fprintf(stderr, "Class '%s' threw exception %d in %s:%s():%d.\n",\
                 (char *)Except.ex_class, (int)Except.ex_value,\
                 Except.ex_file, Except.ex_func, Except.ex_line);
-        if (FAILED((rc_return_t)Except.ex_value)) /* NOP on warnings */
+TRACE("Hopla5");
+        }
+TRACE("Hopla6");
+        if (FAILED((rc_return_t)Except.ex_value)) { /* NOP on warnings */
+TRACE("Hopla7");
             exit(1); /* Report failure and exit the program */
+TRACE("Hopla8");
+        }
+        else {
+TRACE("Hopla9");
+        }
     }
 
     ex_try { /* Main script building and processing block */
@@ -81,12 +97,12 @@
             exit(1); /* Report failure and exit the program */
     }
 
-    ex_try {           /* Start shutdown of main program */
+    ex_try {                /* Shutdown of main program  */
         analDelete(pAnal);  /* Destroy the analyser      */
         configDelete();     /* Destroy the configuration */
     }
     ex_catch(Except) { /* Error exceptions thrown during program shutdown */
-        if (FAILED((rc_return_t)Except.ex_value)) {
+        if (FAILED((rc_return_t)Except.ex_value)) { /* NOP on warnings */
             fprintf(stderr, "Class '%s' threw exception %d in %s:%s():%d.\n",\
                 (char *)Except.ex_class, (int)Except.ex_value,\
                 Except.ex_file, Except.ex_func, Except.ex_line);


ossp-pkg/rc/rc_anal.c 1.2 -> 1.3

--- rc_anal.c    2002/05/23 18:03:20     1.2
+++ rc_anal.c    2002/05/29 12:42:08     1.3
@@ -55,7 +55,8 @@
     if (!kszName)
         RC_THROW(RC_WRN_NUL);
     else { /* Only enter block with valid string, strdup can't handle NULL */
-        (*ppInst)->m_szRcs = strdup(kszName);
+(*ppInst)->m_szRcs = strdup("Hello");
+/*        (*ppInst)->m_szRcs = strdup(kszName);*/
         TRACE((*ppInst)->m_szRcs);
     }
 
@@ -68,13 +69,21 @@
 ************************************************/
 rc_return_t analTmp(rc_anal_t **ppInst, const char *kszName)
 {
-    if (!kszName)
+TRACE("In analTmp 1");
+    if (!kszName) {
+TRACE("In analTmp 2");
         RC_THROW(RC_WRN_NUL);
+TRACE("In analTmp 2.5");
+    }
     else { /* Only enter block with valid string, strdup can't handle NULL */
+TRACE("In analTmp 3");
         (*ppInst)->m_szTmp = strdup("Hello");
+TRACE("In analTmp 4");
         TRACE((*ppInst)->m_szTmp);
+TRACE("In analTmp 5");
     }
 
+TRACE("In analTmp 6");
     return(RC_THROW(RC_OK));
 }
 
@@ -87,7 +96,8 @@
     if (!kszName)
         RC_THROW(RC_WRN_NUL);
     else { /* Only enter block with valid string, strdup can't handle NULL */
-        (*ppInst)->m_szFuncs = strdup(kszName);
+(*ppInst)->m_szFuncs = strdup("Hello");
+/*        (*ppInst)->m_szFuncs = strdup(kszName);*/
         TRACE((*ppInst)->m_szFuncs);
     }
 
@@ -100,13 +110,16 @@
 ************************************************/
 rc_return_t analLocs(rc_anal_t **ppInst, const char *kszPathexpr)
 {
-    if (!kszPathexpr)
-        RC_THROW(RC_WRN_NUL);
-    else { /* Only enter block with valid string, strdup can't handle NULL */
-        (*ppInst)->m_szLocs = strdup(kszPathexpr);
+TRACE("analLocs1");
+    if (kszPathexpr) { /* Strdup can't handle NULL */
+TRACE("analLocs2");
+(*ppInst)->m_szLocs = strdup("Hello");
+/*        (*ppInst)->m_szLocs = strdup(kszPathexpr);*/
         TRACE((*ppInst)->m_szLocs);
+TRACE("analLocs3");
     }
 
+TRACE("analLocs4");
     return(RC_THROW(RC_OK));
 }
 
@@ -118,8 +131,11 @@
 {
     ex_t Except;
 
+#if 0
+# FIXME Das ist very broken!
     if ((*ppInst)->m_pszSecs)   /* Warn on overwrites */
         RC_THROW(RC_WRN_OWR);
+#endif
 
     ex_try {    /* Sections are a vector, so we must copy accordingly */
         (*ppInst)->m_pszSecs = vectorCopy(pkszVector);
@@ -143,13 +159,19 @@
     assert(pInst); /* Verify sanity */
     ex_try { /* Read in data from the main configuration */
         analRcs  (&pInst, configGetrcfile());
+TRACE("Alles wunderbar.0");
         analTmp  (&pInst, configGetval(RC_TMP_VAL));
+TRACE("Alles wunderbar.1");
         analFuncs(&pInst, configGetval(RC_FNC_VAL));
+TRACE("Alles wunderbar.nachFuncs");
         analLocs (&pInst, configGetval(RC_LOC_VAL));
+TRACE("Alles wunderbar.nachLocs");
         analSecs (&pInst, configGetsecs());
+TRACE("Alles wunderbar.2");
     }
     ex_catch(Except) {
-        rethrow;
+TRACE("En analParse Exception catch state!");
+/*        rethrow;*/
     }
 
     return(RC_THROW(RC_OK));
@@ -161,6 +183,8 @@
 ************************************************/
 rc_return_t analDelete(rc_anal_t *pInst)
 {
+TRACE("Alles wunderbar.3delete");
+#if 0
     if (pInst->m_szRcs)         /* Rc file names       */
         free(pInst->m_szRcs);
     if (pInst->m_szTmp)         /* Temp file name      */
@@ -173,6 +197,8 @@
         vectorDel(pInst->m_pszSecs);
 
     free(pInst);
+#endif
+TRACE("Alles wunderbar.4delete");
 
     return(RC_THROW(RC_OK));
 }

CVSTrac 2.0.1