|
From: <sv...@va...> - 2012-02-15 22:34:08
|
Author: philippe
Date: 2012-02-15 22:29:30 +0000 (Wed, 15 Feb 2012)
New Revision: 12388
Log:
* compare vgdb-error with n_errs_shown, not with n_errs_found.
Using n_errs_shown allows the user to stop on an error
identified in a previous run by counting errors shown.
* shows also n_errs_shown in monitor command v.info n_errs_found
* slightly clarified the manual, updated to new output of v.info n_errs_found
Modified:
trunk/NEWS
trunk/coregrind/m_errormgr.c
trunk/coregrind/m_gdbserver/server.c
trunk/coregrind/pub_core_errormgr.h
trunk/docs/xml/manual-core-adv.xml
trunk/gdbserver_tests/mcbreak.stderrB.exp
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2012-02-15 04:05:52 UTC (rev 12387)
+++ trunk/NEWS 2012-02-15 22:29:30 UTC (rev 12388)
@@ -58,8 +58,8 @@
290974 vgdb must align pages to VKI_SHMLBA (16KB) on ARM
293088 Add some VEX sanity checks for ppc64 unhandled instructions
294055 regtest none/tests/shell fails when locale is not set to C
+294190 --vgdb-error=xxx can be out of sync with errors shown to the user
-
Release 3.7.0 (5 November 2011)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.7.0 is a feature release with many significant improvements and the
Modified: trunk/coregrind/m_errormgr.c
===================================================================
--- trunk/coregrind/m_errormgr.c 2012-02-15 04:05:52 UTC (rev 12387)
+++ trunk/coregrind/m_errormgr.c 2012-02-15 22:29:30 UTC (rev 12388)
@@ -82,6 +82,9 @@
/* Running count of suppressed errors detected. */
static UInt n_errs_suppressed = 0;
+/* Running count of errors shown. */
+static UInt n_errs_shown = 0;
+
/* Running count of unsuppressed error contexts. */
static UInt n_err_contexts = 0;
@@ -171,6 +174,11 @@
return n_errs_found;
}
+UInt VG_(get_n_errs_shown)( void )
+{
+ return n_errs_shown;
+}
+
/*------------------------------------------------------------*/
/*--- Suppression type ---*/
/*------------------------------------------------------------*/
@@ -498,7 +506,7 @@
/* if user wants to debug from a certain error nr, then wait for gdb/vgdb */
if (VG_(clo_vgdb) != Vg_VgdbNo
&& allow_db_attach
- && VG_(dyn_vgdb_error) <= n_errs_found) {
+ && VG_(dyn_vgdb_error) <= n_errs_shown) {
VG_(umsg)("(action on error) vgdb me ... \n");
VG_(gdbserver)( err->tid );
VG_(umsg)("Continuing ...\n");
@@ -638,8 +646,6 @@
-static Int n_errs_shown = 0;
-
/* Top-level entry point to the error management subsystem.
All detected errors are notified here; this routine decides if/when the
user should see the error. */
@@ -796,12 +802,12 @@
p->supp = is_suppressible_error(&err);
errors = p;
if (p->supp == NULL) {
+ /* update stats */
n_err_contexts++;
n_errs_found++;
+ n_errs_shown++;
/* Actually show the error; more complex than you might think. */
pp_Error( p, /*allow_db_attach*/True, VG_(clo_xml) );
- /* update stats */
- n_errs_shown++;
} else {
n_supp_contexts++;
n_errs_suppressed++;
@@ -848,10 +854,10 @@
}
if (print_error) {
+ /* update stats */
+ n_errs_shown++;
/* Actually show the error; more complex than you might think. */
pp_Error(&err, allow_db_attach, VG_(clo_xml));
- /* update stats */
- n_errs_shown++;
}
return False;
Modified: trunk/coregrind/m_gdbserver/server.c
===================================================================
--- trunk/coregrind/m_gdbserver/server.c 2012-02-15 04:05:52 UTC (rev 12387)
+++ trunk/coregrind/m_gdbserver/server.c 2012-02-15 22:29:30 UTC (rev 12388)
@@ -246,8 +246,9 @@
VG_(show_all_errors)(/* verbosity */ 2, /* xml */ False);
break;
case 1: // n_errs_found
- VG_(gdb_printf) ("n_errs_found %d (vgdb-error %d)\n",
+ VG_(gdb_printf) ("n_errs_found %d n_errs_shown %d (vgdb-error %d)\n",
VG_(get_n_errs_found) (),
+ VG_(get_n_errs_shown) (),
VG_(dyn_vgdb_error));
break;
case 2: // last_error
Modified: trunk/coregrind/pub_core_errormgr.h
===================================================================
--- trunk/coregrind/pub_core_errormgr.h 2012-02-15 04:05:52 UTC (rev 12387)
+++ trunk/coregrind/pub_core_errormgr.h 2012-02-15 22:29:30 UTC (rev 12388)
@@ -67,6 +67,7 @@
extern Bool VG_(showing_core_errors) ( void );
extern UInt VG_(get_n_errs_found) ( void );
+extern UInt VG_(get_n_errs_shown) ( void );
extern void VG_(print_errormgr_stats) ( void );
Modified: trunk/docs/xml/manual-core-adv.xml
===================================================================
--- trunk/docs/xml/manual-core-adv.xml 2012-02-15 04:05:52 UTC (rev 12387)
+++ trunk/docs/xml/manual-core-adv.xml 2012-02-15 22:29:30 UTC (rev 12388)
@@ -381,7 +381,7 @@
or <option>--vgdb=full</option>. A secondary command line option,
<option>--vgdb-error=number</option>, can be used to tell the gdbserver
only to become active once the specified number of errors have been
-reported. A value of zero will therefore cause
+shown. A value of zero will therefore cause
the gdbserver to become active at startup, which allows you to
insert breakpoints before starting the run. For example:
<screen><![CDATA[
@@ -625,7 +625,7 @@
(gdb) mo v. n
v. can match v.set v.info v.wait v.kill v.translate
(gdb) mo v.i n
-n_errs_found 0 (vgdb-error 0)
+n_errs_found 0 n_errs_shown 0 (vgdb-error 0)
(gdb)
]]></programlisting>
</para>
@@ -1196,9 +1196,8 @@
<listitem>
<para><varname>v.info n_errs_found</varname> shows the number of
- errors found so far and the current value of the
- <option>--vgdb-error</option>
- argument.</para>
+ errors found so far, the nr of errors shown so far and the current
+ value of the <option>--vgdb-error</option> argument.</para>
</listitem>
<listitem>
Modified: trunk/gdbserver_tests/mcbreak.stderrB.exp
===================================================================
--- trunk/gdbserver_tests/mcbreak.stderrB.exp 2012-02-15 04:05:52 UTC (rev 12387)
+++ trunk/gdbserver_tests/mcbreak.stderrB.exp 2012-02-15 22:29:30 UTC (rev 12388)
@@ -1,7 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
vgdb-error value changed from 999999 to 0
-n_errs_found 1 (vgdb-error 0)
+n_errs_found 1 n_errs_shown 1 (vgdb-error 0)
vgdb-error value changed from 0 to 0
monitor command request to kill this process
Remote connection closed
|