You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(3) |
|
2
(8) |
3
(19) |
4
(24) |
5
(23) |
6
(16) |
7
(33) |
8
(5) |
|
9
(4) |
10
(23) |
11
(22) |
12
(40) |
13
(30) |
14
(31) |
15
(17) |
|
16
(18) |
17
(20) |
18
(41) |
19
(36) |
20
(25) |
21
(8) |
22
(9) |
|
23
(17) |
24
(12) |
25
(15) |
26
(15) |
27
(16) |
28
(22) |
29
(6) |
|
30
(7) |
31
(10) |
|
|
|
|
|
|
From: <sv...@va...> - 2009-08-23 23:33:41
|
Author: njn Date: 2009-08-24 00:33:28 +0100 (Mon, 24 Aug 2009) New Revision: 10865 Log: Fix a broken regtest. Modified: branches/MSG2/none/tests/cmdline4.stderr.exp Modified: branches/MSG2/none/tests/cmdline4.stderr.exp =================================================================== --- branches/MSG2/none/tests/cmdline4.stderr.exp 2009-08-23 22:46:04 UTC (rev 10864) +++ branches/MSG2/none/tests/cmdline4.stderr.exp 2009-08-23 23:33:28 UTC (rev 10865) @@ -1,2 +1,2 @@ -valgrind: Bad option '--bad-bad-option'; aborting. +valgrind: Bad option: --bad-bad-option valgrind: Use --help for more information. |
|
From: <sv...@va...> - 2009-08-23 22:54:55
|
Author: njn
Date: 2009-08-23 23:46:04 +0100 (Sun, 23 Aug 2009)
New Revision: 10864
Log:
Make messaging more consistent for aborts at start-up (mostly due to bad
command line options); they all are prefixed just with "valgrind:" now.
Make '-h -h' equivalent to '--help-debug'.
Modified:
branches/MSG2/cachegrind/cg_main.c
branches/MSG2/callgrind/sim.c
branches/MSG2/coregrind/m_libcprint.c
branches/MSG2/coregrind/m_main.c
branches/MSG2/coregrind/m_options.c
branches/MSG2/coregrind/m_replacemalloc/replacemalloc_core.c
branches/MSG2/coregrind/pub_core_libcprint.h
branches/MSG2/coregrind/pub_core_options.h
branches/MSG2/docs/xml/manual-core.xml
branches/MSG2/include/pub_tool_libcprint.h
branches/MSG2/include/pub_tool_options.h
branches/MSG2/include/pub_tool_tooliface.h
branches/MSG2/massif/ms_main.c
Modified: branches/MSG2/cachegrind/cg_main.c
===================================================================
--- branches/MSG2/cachegrind/cg_main.c 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/cachegrind/cg_main.c 2009-08-23 22:46:04 UTC (rev 10864)
@@ -1175,44 +1175,36 @@
static cache_t clo_D1_cache = UNDEFINED_CACHE;
static cache_t clo_L2_cache = UNDEFINED_CACHE;
-/* Checks cache config is ok; makes it so if not. */
-static
-void check_cache(cache_t* cache, Char *name)
+// Checks cache config is ok. Returns NULL if ok, or a pointer to an error
+// string otherwise.
+static Char* check_cache(cache_t* cache)
{
- /* Simulator requires line size and set count to be powers of two */
- if (( cache->size % (cache->line_size * cache->assoc) != 0) ||
- (-1 == VG_(log2)(cache->size/cache->line_size/cache->assoc))) {
- VG_(umsg)("error: %s set count not a power of two; aborting.\n", name);
- VG_(exit)(1);
- }
+ // Simulator requires set count to be a power of two.
+ if ((cache->size % (cache->line_size * cache->assoc) != 0) ||
+ (-1 == VG_(log2)(cache->size/cache->line_size/cache->assoc)))
+ {
+ return "Cache set count is not a power of two.\n";
- if (-1 == VG_(log2)(cache->line_size)) {
- VG_(umsg)("error: %s line size of %dB not a power of two; aborting.\n",
- name, cache->line_size);
- VG_(exit)(1);
- }
+ // Simulator requires line size to be a power of two.
+ } else if (-1 == VG_(log2)(cache->line_size)) {
+ return "Cache line size is not a power of two.\n";
// Then check line size >= 16 -- any smaller and a single instruction could
// straddle three cache lines, which breaks a simulation assertion and is
// stupid anyway.
- if (cache->line_size < MIN_LINE_SIZE) {
- VG_(umsg)("error: %s line size of %dB too small; aborting.\n",
- name, cache->line_size);
- VG_(exit)(1);
- }
+ } else if (cache->line_size < MIN_LINE_SIZE) {
+ return "Cache line size is too small.\n";
- /* Then check cache size > line size (causes seg faults if not). */
- if (cache->size <= cache->line_size) {
- VG_(umsg)("error: %s cache size of %dB <= line size of %dB; aborting.\n",
- name, cache->size, cache->line_size);
- VG_(exit)(1);
- }
+ // Then check cache size > line size (causes seg faults if not).
+ } else if (cache->size <= cache->line_size) {
+ return "Cache size <= line size.\n";
- /* Then check assoc <= (size / line size) (seg faults otherwise). */
- if (cache->assoc > (cache->size / cache->line_size)) {
- VG_(umsg)("warning: %s associativity > (size / line size); aborting.\n",
- name);
- VG_(exit)(1);
+ // Then check assoc <= (size / line size) (seg faults otherwise).
+ } else if (cache->assoc > (cache->size / cache->line_size)) {
+ return "Cache associativity > (size / line size).\n";
+
+ } else {
+ return NULL;
}
}
@@ -1221,27 +1213,28 @@
{
#define DEFINED(L) (-1 != L.size || -1 != L.assoc || -1 != L.line_size)
- Int n_clos = 0;
+ Char* checkRes;
- // Count how many were defined on the command line.
- if (DEFINED(clo_I1_cache)) { n_clos++; }
- if (DEFINED(clo_D1_cache)) { n_clos++; }
- if (DEFINED(clo_L2_cache)) { n_clos++; }
+ Bool all_caches_clo_defined =
+ (DEFINED(clo_I1_cache) &&
+ DEFINED(clo_D1_cache) &&
+ DEFINED(clo_L2_cache));
// Set the cache config (using auto-detection, if supported by the
- // architecture)
- VG_(configure_caches)( I1c, D1c, L2c, (3 == n_clos) );
+ // architecture).
+ VG_(configure_caches)( I1c, D1c, L2c, all_caches_clo_defined );
- // Then replace with any defined on the command line.
+ // Check the default/auto-detected values.
+ checkRes = check_cache(I1c); tl_assert(!checkRes);
+ checkRes = check_cache(D1c); tl_assert(!checkRes);
+ checkRes = check_cache(L2c); tl_assert(!checkRes);
+
+ // Then replace with any defined on the command line. (Already checked in
+ // parse_cache_opt().)
if (DEFINED(clo_I1_cache)) { *I1c = clo_I1_cache; }
if (DEFINED(clo_D1_cache)) { *D1c = clo_D1_cache; }
if (DEFINED(clo_L2_cache)) { *L2c = clo_L2_cache; }
- // Then check values and fix if not acceptable.
- check_cache(I1c, "I1");
- check_cache(D1c, "D1");
- check_cache(L2c, "L2");
-
if (VG_(clo_verbosity) >= 2) {
VG_(umsg)("Cache configuration used:\n");
VG_(umsg)(" I1: %dB, %d-way, %dB lines\n",
@@ -1659,6 +1652,7 @@
{
Long i1, i2, i3;
Char* endptr;
+ Char* checkRes;
// Option argument looks like "65536,2,64". Extract them.
i1 = VG_(strtoll10)(optval, &endptr); if (*endptr != ',') goto bad;
@@ -1673,12 +1667,20 @@
if (cache->assoc != i2) goto overflow;
if (cache->line_size != i3) goto overflow;
+ checkRes = check_cache(cache);
+ if (checkRes) {
+ VG_(msgf)(checkRes);
+ goto bad;
+ }
+
return;
+ bad:
+ VG_(msgf_bad_option)(opt, "");
+
overflow:
- VG_(umsg)("one of the cache parameters was too large and overflowed\n");
- bad:
- VG_(err_bad_option)(opt);
+ VG_(msgf_bad_option)(opt,
+ "One of the cache parameters was too large and overflowed.\n");
}
static Bool cg_process_cmd_line_option(Char* arg)
Modified: branches/MSG2/callgrind/sim.c
===================================================================
--- branches/MSG2/callgrind/sim.c 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/callgrind/sim.c 2009-08-23 22:46:04 UTC (rev 10864)
@@ -1298,49 +1298,36 @@
static cache_t clo_D1_cache = UNDEFINED_CACHE;
static cache_t clo_L2_cache = UNDEFINED_CACHE;
-
-/* Checks cache config is ok; makes it so if not. */
-static
-void check_cache(cache_t* cache, Char *name)
+// Checks cache config is ok. Returns NULL if ok, or a pointer to an error
+// string otherwise.
+static Char* check_cache(cache_t* cache)
{
- /* Simulator requires line size and set count to be powers of two */
- if (( cache->size % (cache->line_size * cache->assoc) != 0) ||
- (-1 == VG_(log2)(cache->size/cache->line_size/cache->assoc))) {
- VG_(message)(Vg_UserMsg,
- "error: %s set count not a power of two; aborting.\n",
- name);
- }
+ // Simulator requires line size and set count to be powers of two.
+ if ((cache->size % (cache->line_size * cache->assoc) != 0) ||
+ (-1 == VG_(log2)(cache->size/cache->line_size/cache->assoc)))
+ {
+ return "Cache set count is not a power of two.\n";
- if (-1 == VG_(log2)(cache->line_size)) {
- VG_(message)(Vg_UserMsg,
- "error: %s line size of %dB not a power of two; aborting.\n",
- name, cache->line_size);
- VG_(exit)(1);
- }
+ // Simulator requires line size to be a power of two.
+ } else if (-1 == VG_(log2)(cache->line_size)) {
+ return "Cache line size is not a power of two.\n";
// Then check line size >= 16 -- any smaller and a single instruction could
// straddle three cache lines, which breaks a simulation assertion and is
// stupid anyway.
- if (cache->line_size < MIN_LINE_SIZE) {
- VG_(message)(Vg_UserMsg,
- "error: %s line size of %dB too small; aborting.\n",
- name, cache->line_size);
- VG_(exit)(1);
- }
+ } else if (cache->line_size < MIN_LINE_SIZE) {
+ return "Cache line size is too small.\n";
- /* Then check cache size > line size (causes seg faults if not). */
- if (cache->size <= cache->line_size) {
- VG_(message)(Vg_UserMsg,
- "error: %s cache size of %dB <= line size of %dB; aborting.\n",
- name, cache->size, cache->line_size);
- VG_(exit)(1);
- }
+ // Then check cache size > line size (causes seg faults if not).
+ } else if (cache->size <= cache->line_size) {
+ return "Cache size <= line size.\n";
- /* Then check assoc <= (size / line size) (seg faults otherwise). */
- if (cache->assoc > (cache->size / cache->line_size)) {
- VG_(message)(Vg_UserMsg,
- "warning: %s associativity > (size / line size); aborting.\n", name);
- VG_(exit)(1);
+ // Then check assoc <= (size / line size) (seg faults otherwise).
+ } else if (cache->assoc > (cache->size / cache->line_size)) {
+ return "Cache associativity > (size / line size).\n";
+
+ } else {
+ return NULL;
}
}
@@ -1349,27 +1336,27 @@
{
#define DEFINED(L) (-1 != L.size || -1 != L.assoc || -1 != L.line_size)
- Int n_clos = 0;
+ Char* checkRes;
- // Count how many were defined on the command line.
- if (DEFINED(clo_I1_cache)) { n_clos++; }
- if (DEFINED(clo_D1_cache)) { n_clos++; }
- if (DEFINED(clo_L2_cache)) { n_clos++; }
+ Bool all_caches_clo_defined =
+ (DEFINED(clo_I1_cache) &&
+ DEFINED(clo_D1_cache) &&
+ DEFINED(clo_L2_cache));
// Set the cache config (using auto-detection, if supported by the
- // architecture)
- VG_(configure_caches)( I1c, D1c, L2c, (3 == n_clos) );
+ // architecture).
+ VG_(configure_caches)( I1c, D1c, L2c, all_caches_clo_defined );
+ // Check the default/auto-detected values.
+ checkRes = check_cache(I1c); tl_assert(!checkRes);
+ checkRes = check_cache(D1c); tl_assert(!checkRes);
+ checkRes = check_cache(L2c); tl_assert(!checkRes);
+
// Then replace with any defined on the command line.
if (DEFINED(clo_I1_cache)) { *I1c = clo_I1_cache; }
if (DEFINED(clo_D1_cache)) { *D1c = clo_D1_cache; }
if (DEFINED(clo_L2_cache)) { *L2c = clo_L2_cache; }
- // Then check values and fix if not acceptable.
- check_cache(I1c, "I1");
- check_cache(D1c, "D1");
- check_cache(L2c, "L2");
-
if (VG_(clo_verbosity) > 1) {
VG_(message)(Vg_UserMsg, "Cache configuration used:\n");
VG_(message)(Vg_UserMsg, " I1: %dB, %d-way, %dB lines\n",
@@ -1532,13 +1519,14 @@
);
}
-static void parse_opt ( cache_t* cache, char* opt )
+static void parse_opt ( cache_t* cache, Char* opt, Char* optval )
{
Long i1, i2, i3;
Char* endptr;
+ Char* checkRes;
// Option argument looks like "65536,2,64". Extract them.
- i1 = VG_(strtoll10)(opt, &endptr); if (*endptr != ',') goto bad;
+ i1 = VG_(strtoll10)(optval, &endptr); if (*endptr != ',') goto bad;
i2 = VG_(strtoll10)(endptr+1, &endptr); if (*endptr != ',') goto bad;
i3 = VG_(strtoll10)(endptr+1, &endptr); if (*endptr != '\0') goto bad;
@@ -1550,15 +1538,20 @@
if (cache->assoc != i2) goto overflow;
if (cache->line_size != i3) goto overflow;
+ checkRes = check_cache(cache);
+ if (checkRes) {
+ VG_(msgf)(checkRes);
+ goto bad;
+ }
+
return;
- overflow:
- VG_(message)(Vg_UserMsg,
- "one of the cache parameters was too large and overflowed\n");
bad:
- // XXX: this omits the "--I1/D1/L2=" part from the message, but that's
- // not a big deal.
- VG_(err_bad_option)(opt);
+ VG_(msgf_bad_option)(opt, "");
+
+ overflow:
+ VG_(msgf_bad_option)(opt,
+ "One of the cache parameters was too large and overflowed.\n");
}
/* Check for command line option for cache configuration.
@@ -1582,11 +1575,11 @@
}
else if VG_STR_CLO(arg, "--I1", tmp_str)
- parse_opt(&clo_I1_cache, tmp_str);
+ parse_opt(&clo_I1_cache, arg, tmp_str);
else if VG_STR_CLO(arg, "--D1", tmp_str)
- parse_opt(&clo_D1_cache, tmp_str);
+ parse_opt(&clo_D1_cache, arg, tmp_str);
else if VG_STR_CLO(arg, "--L2", tmp_str)
- parse_opt(&clo_L2_cache, tmp_str);
+ parse_opt(&clo_L2_cache, arg, tmp_str);
else
return False;
Modified: branches/MSG2/coregrind/m_libcprint.c
===================================================================
--- branches/MSG2/coregrind/m_libcprint.c 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/coregrind/m_libcprint.c 2009-08-23 22:46:04 UTC (rev 10864)
@@ -529,6 +529,12 @@
return count;
}
+static void revert_to_stderr ( void )
+{
+ VG_(log_output_sink).fd = 2; /* stderr */
+ VG_(log_output_sink).is_socket = False;
+}
+
/* VG_(message) variants with hardwired first argument. */
UInt VG_(msgf) ( const HChar* format, ... )
@@ -541,6 +547,18 @@
return count;
}
+void VG_(msgf_bad_option) ( HChar* opt, const HChar* format, ... )
+{
+ va_list vargs;
+ va_start(vargs,format);
+ revert_to_stderr();
+ VG_(message) (Vg_StartFailMsg, "Bad option: %s\n", opt);
+ VG_(vmessage)(Vg_StartFailMsg, format, vargs );
+ VG_(message) (Vg_StartFailMsg, "Use --help for more information.\n");
+ VG_(exit)(1);
+ va_end(vargs);
+}
+
// MMM: get rid of eventually, then rename VG_(msgu) as VG_(umsg). Likewise
// for dmsg.
UInt VG_(umsg) ( const HChar* format, ... )
@@ -602,7 +620,25 @@
b->buf_used = 0;
}
+__attribute__((noreturn))
+void VG_(err_missing_prog) ( void )
+{
+ revert_to_stderr();
+ VG_(msgf)("no program specified\n");
+ VG_(msgf)("Use --help for more information.\n");
+ VG_(exit)(1);
+}
+__attribute__((noreturn))
+void VG_(err_config_error) ( Char* msg )
+{
+ revert_to_stderr();
+ VG_(msgf)("Startup or configuration error:\n %s\n", msg);
+ VG_(msgf)("Unable to start up properly. Giving up.\n");
+ VG_(exit)(1);
+}
+
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
Modified: branches/MSG2/coregrind/m_main.c
===================================================================
--- branches/MSG2/coregrind/m_main.c 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/coregrind/m_main.c 2009-08-23 22:46:04 UTC (rev 10864)
@@ -296,10 +296,10 @@
VG_(printf)("valgrind-" VERSION "\n");
VG_(exit)(0);
}
- else if VG_XACT_CLO(str, "--help", *need_help, 1) {}
- else if VG_XACT_CLO(str, "-h", *need_help, 1) {}
+ else if VG_XACT_CLO(str, "--help", *need_help, *need_help+1) {}
+ else if VG_XACT_CLO(str, "-h", *need_help, *need_help+1) {}
- else if VG_XACT_CLO(str, "--help-debug", *need_help, 2) {}
+ else if VG_XACT_CLO(str, "--help-debug", *need_help, *need_help+2) {}
// The tool has already been determined, but we need to know the name
// here.
@@ -531,10 +531,9 @@
else if VG_STR_CLO(arg, "--suppressions", tmp_str) {
if (VG_(clo_n_suppressions) >= VG_CLO_MAX_SFILES) {
- VG_(message)(Vg_UserMsg, "Too many suppression files specified.\n");
- VG_(message)(Vg_UserMsg,
- "Increase VG_CLO_MAX_SFILES and recompile.\n");
- VG_(err_bad_option)(arg);
+ VG_(msgf_bad_option)(arg,
+ "Too many suppression files specified.\n"
+ "Increase VG_CLO_MAX_SFILES and recompile.\n");
}
VG_(clo_suppressions)[VG_(clo_n_suppressions)] = tmp_str;
VG_(clo_n_suppressions)++;
@@ -545,17 +544,15 @@
Int j;
if (8 != VG_(strlen)(tmp_str)) {
- VG_(message)(Vg_UserMsg,
- "--trace-flags argument must have 8 digits\n");
- VG_(err_bad_option)(arg);
+ VG_(msgf_bad_option)(arg,
+ "--trace-flags argument must have 8 digits.\n");
}
for (j = 0; j < 8; j++) {
if ('0' == tmp_str[j]) { /* do nothing */ }
else if ('1' == tmp_str[j]) VG_(clo_trace_flags) |= (1 << (7-j));
else {
- VG_(message)(Vg_UserMsg, "--trace-flags argument can only "
- "contain 0s and 1s\n");
- VG_(err_bad_option)(arg);
+ VG_(msgf_bad_option)(arg,
+ "--trace-flags argument can only contain 0s and 1s.\n");
}
}
}
@@ -565,17 +562,15 @@
Int j;
if (8 != VG_(strlen)(tmp_str)) {
- VG_(message)(Vg_UserMsg,
- "--profile-flags argument must have 8 digits\n");
- VG_(err_bad_option)(arg);
+ VG_(msgf_bad_option)(arg,
+ "--profile-flags argument must have 8 digits.\n");
}
for (j = 0; j < 8; j++) {
if ('0' == tmp_str[j]) { /* do nothing */ }
else if ('1' == tmp_str[j]) VG_(clo_profile_flags) |= (1 << (7-j));
else {
- VG_(message)(Vg_UserMsg, "--profile-flags argument can only "
- "contain 0s and 1s\n");
- VG_(err_bad_option)(arg);
+ VG_(msgf_bad_option)(arg,
+ "--profile-flags argument can only contain 0s and 1s.\n");
}
}
}
@@ -591,7 +586,7 @@
else if ( ! VG_(needs).command_line_options
|| ! VG_TDICT_CALL(tool_process_cmd_line_option, arg) ) {
- VG_(err_bad_option)(arg);
+ VG_(msgf_bad_option)(arg, "");
}
}
@@ -612,22 +607,24 @@
if (VG_(clo_verbosity) < 0)
VG_(clo_verbosity) = 0;
+ // MMM: why single out --gen-suppressions in this way? Heaps of options
+ // only make sense for error-producing tools. Either check all or none.
+ // If checking all, need an equivalent to
+ // VG_(replacement_malloc_process_cmd_line_option) for errors. (See
+ // ms_main.c for more.)
if (VG_(clo_gen_suppressions) > 0 &&
!VG_(needs).core_errors && !VG_(needs).tool_errors) {
- VG_(message)(Vg_UserMsg,
- "Can't use --gen-suppressions= with this tool,\n");
- VG_(message)(Vg_UserMsg,
- "as it doesn't generate errors.\n");
- VG_(err_bad_option)("--gen-suppressions=");
+ VG_(msgf_bad_option)("--gen-suppressions=yes",
+ "Can't use --gen-suppressions=yes with %s\n"
+ "because it doesn't generate errors.\n", VG_(details).name);
}
/* If XML output is requested, check that the tool actually
supports it. */
if (VG_(clo_xml) && !VG_(needs).xml_output) {
VG_(clo_xml) = False;
- VG_(message)(Vg_UserMsg,
+ VG_(msgf_bad_option)("--xml=yes",
"%s does not support XML output.\n", VG_(details).name);
- VG_(err_bad_option)("--xml=yes");
/*NOTREACHED*/
}
@@ -648,33 +645,28 @@
(--gen-suppressions=all is still OK since we don't need any
user interaction in this case.) */
if (VG_(clo_gen_suppressions) == 1) {
- VG_(umsg)(
- "When --xml=yes is specified, only --gen-suppressions=no\n"
- "or --gen-suppressions=all are allowed, but not "
+ VG_(msgf_bad_option)(
+ "--xml=yes together with --gen-suppressions=yes",
+ "When --xml=yes is specified, --gen-suppressions=no\n"
+ "or --gen-suppressions=all is allowed, but not "
"--gen-suppressions=yes.\n");
- /* FIXME: this is really a misuse of VG_(err_bad_option). */
- VG_(err_bad_option)(
- "--xml=yes together with --gen-suppressions=yes");
}
/* We can't allow DB attaching (or we maybe could, but results
could be chaotic ..) since it requires user input. Hence
disallow. */
if (VG_(clo_db_attach)) {
- VG_(umsg)("--db-attach=yes is not allowed in XML mode,\n"
- "as it would require user input.\n");
- /* FIXME: this is really a misuse of VG_(err_bad_option). */
- VG_(err_bad_option)(
- "--xml=yes together with --db-attach=yes");
+ VG_(msgf_bad_option)(
+ "--xml=yes together with --db-attach=yes",
+ "--db-attach=yes is not allowed with --xml=yes\n"
+ "because it would require user input.\n");
}
/* Disallow dump_error in XML mode; sounds like a recipe for
chaos. No big deal; dump_error is a flag for debugging V
itself. */
if (VG_(clo_dump_error) > 0) {
- /* FIXME: this is really a misuse of VG_(err_bad_option). */
- VG_(err_bad_option)(
- "--xml=yes together with --dump-error=");
+ VG_(msgf_bad_option)("--xml=yes together with --dump-error", "");
}
/* Disable error limits (this might be a bad idea!) */
@@ -732,11 +724,9 @@
tmp_log_fd = sr_Res(sres);
VG_(clo_log_fname_expanded) = logfilename;
} else {
- VG_(message)(Vg_UserMsg,
- "Can't create log file '%s' (%s); giving up!\n",
- logfilename, VG_(strerror)(sr_Err(sres)));
- VG_(err_bad_option)(
- "--log-file=<file> (didn't work out for some reason.)");
+ VG_(msgf)("can't create log file '%s': %s\n",
+ logfilename, VG_(strerror)(sr_Err(sres)));
+ VG_(exit)(1);
/*NOTREACHED*/
}
break;
@@ -747,23 +737,15 @@
vg_assert(VG_(strlen)(log_fsname_unexpanded) <= 900); /* paranoia */
tmp_log_fd = VG_(connect_via_socket)( log_fsname_unexpanded );
if (tmp_log_fd == -1) {
- VG_(message)(Vg_UserMsg,
- "Invalid --log-socket=ipaddr or "
- "--log-socket=ipaddr:port spec\n");
- VG_(message)(Vg_UserMsg,
- "of '%s'; giving up!\n", log_fsname_unexpanded );
- VG_(err_bad_option)(
- "--log-socket=");
+ VG_(msgf)("Invalid --log-socket spec of '%s'\n",
+ log_fsname_unexpanded);
+ VG_(exit)(1);
/*NOTREACHED*/
}
if (tmp_log_fd == -2) {
- VG_(message)(Vg_UserMsg,
- "valgrind: failed to connect to logging server '%s'.\n",
- log_fsname_unexpanded );
- VG_(message)(Vg_UserMsg,
- "Log messages will sent to stderr instead.\n" );
- VG_(message)(Vg_UserMsg,
- "\n" );
+ VG_(msgv)("failed to connect to logging server '%s'.\n"
+ "Log messages will sent to stderr instead.\n",
+ log_fsname_unexpanded);
/* We don't change anything here. */
vg_assert(VG_(log_output_sink).fd == 2);
tmp_log_fd = 2;
@@ -803,11 +785,9 @@
*xml_fname_unexpanded = VG_(strdup)( "main.mpclo.2",
xml_fsname_unexpanded );
} else {
- VG_(message)(Vg_UserMsg,
- "Can't create XML file '%s' (%s); giving up!\n",
- xmlfilename, VG_(strerror)(sr_Err(sres)));
- VG_(err_bad_option)(
- "--xml-file=<file> (didn't work out for some reason.)");
+ VG_(msgf)("can't create XML file '%s': %s\n",
+ xmlfilename, VG_(strerror)(sr_Err(sres)));
+ VG_(exit)(1);
/*NOTREACHED*/
}
break;
@@ -818,23 +798,15 @@
vg_assert(VG_(strlen)(xml_fsname_unexpanded) <= 900); /* paranoia */
tmp_xml_fd = VG_(connect_via_socket)( xml_fsname_unexpanded );
if (tmp_xml_fd == -1) {
- VG_(message)(Vg_UserMsg,
- "Invalid --xml-socket=ipaddr or "
- "--xml-socket=ipaddr:port spec\n");
- VG_(message)(Vg_UserMsg,
- "of '%s'; giving up!\n", xml_fsname_unexpanded );
- VG_(err_bad_option)(
- "--xml-socket=");
+ VG_(msgf)("Invalid --xml-socket spec of '%s'\n",
+ xml_fsname_unexpanded );
+ VG_(exit)(1);
/*NOTREACHED*/
}
if (tmp_xml_fd == -2) {
- VG_(message)(Vg_UserMsg,
- "valgrind: failed to connect to XML logging server '%s'.\n",
- xml_fsname_unexpanded );
- VG_(message)(Vg_UserMsg,
- "XML output will sent to stderr instead.\n" );
- VG_(message)(Vg_UserMsg,
- "\n" );
+ VG_(msgv)("failed to connect to XML logging server '%s'.\n"
+ "XML output will sent to stderr instead.\n",
+ xml_fsname_unexpanded);
/* We don't change anything here. */
vg_assert(VG_(xml_output_sink).fd == 2);
tmp_xml_fd = 2;
@@ -852,13 +824,12 @@
but that is likely to confuse the hell out of users, which is
distinctly Ungood. */
if (VG_(clo_xml) && tmp_xml_fd == -1) {
- VG_(umsg)(
+ VG_(msgf_bad_option)(
+ "--xml=yes, but no XML destination specified",
"--xml=yes has been specified, but there is no XML output\n"
"destination. You must specify an XML output destination\n"
- "using --xml-fd=, --xml-file= or --xml=socket=.\n" );
- /* FIXME: this is really a misuse of VG_(err_bad_option). */
- VG_(err_bad_option)(
- "--xml=yes, but no XML destination specified");
+ "using --xml-fd, --xml-file or --xml-socket.\n"
+ );
}
// Finalise the output fds: the log fd ..
@@ -1861,7 +1832,7 @@
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Print help and quit, if requested\n");
if (need_help) {
- usage_NORETURN(/*--help-debug?*/2 == need_help);
+ usage_NORETURN(/*--help-debug?*/need_help >= 2);
}
//--------------------------------------------------------------
Modified: branches/MSG2/coregrind/m_options.c
===================================================================
--- branches/MSG2/coregrind/m_options.c 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/coregrind/m_options.c 2009-08-23 22:46:04 UTC (rev 10864)
@@ -95,42 +95,9 @@
/*====================================================================*/
-/*=== Command line errors ===*/
+/*=== File expanstion ===*/
/*====================================================================*/
-static void revert_to_stderr ( void )
-{
- VG_(log_output_sink).fd = 2; /* stderr */
- VG_(log_output_sink).is_socket = False;
-}
-
-__attribute__((noreturn))
-void VG_(err_bad_option) ( Char* opt )
-{
- revert_to_stderr();
- VG_(msgf)("Bad option '%s'; aborting.\n", opt);
- VG_(msgf)("Use --help for more information.\n");
- VG_(exit)(1);
-}
-
-__attribute__((noreturn))
-void VG_(err_missing_prog) ( void )
-{
- revert_to_stderr();
- VG_(msgf)("no program specified\n");
- VG_(msgf)("Use --help for more information.\n");
- VG_(exit)(1);
-}
-
-__attribute__((noreturn))
-void VG_(err_config_error) ( Char* msg )
-{
- revert_to_stderr();
- VG_(msgf)("Startup or configuration error:\n %s\n", msg);
- VG_(msgf)("Unable to start up properly. Giving up.\n");
- VG_(exit)(1);
-}
-
// Copies the string, prepending it with the startup working directory, and
// expanding %p and %q entries. Returns a new, malloc'd string.
Char* VG_(expand_file_name)(Char* option_name, Char* format)
@@ -258,12 +225,10 @@
VG_(strcpy)(opt, option_name);
VG_(strcat)(opt, "=");
VG_(strcat)(opt, format);
- VG_(err_bad_option)(opt);
+ VG_(msgf_bad_option)(opt, ""); // MMM: check this case
}
}
-
-
/*--------------------------------------------------------------------*/
-/*--- end m_options.c ---*/
+/*--- end ---*/
/*--------------------------------------------------------------------*/
Modified: branches/MSG2/coregrind/m_replacemalloc/replacemalloc_core.c
===================================================================
--- branches/MSG2/coregrind/m_replacemalloc/replacemalloc_core.c 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/coregrind/m_replacemalloc/replacemalloc_core.c 2009-08-23 22:46:04 UTC (rev 10864)
@@ -58,12 +58,9 @@
VG_(clo_alignment) > 4096 ||
VG_(log2)( VG_(clo_alignment) ) == -1 /* not a power of 2 */)
{
- VG_(message)(Vg_UserMsg,
- "Invalid --alignment= setting. "
- "Should be a power of 2, >= %d, <= 4096.\n",
- VG_MIN_MALLOC_SZB
- );
- VG_(err_bad_option)("--alignment");
+ VG_(msgf_bad_option)(arg,
+ "Alignment must be a power of 2 in the range %d..4096.\n",
+ VG_MIN_MALLOC_SZB);
}
}
Modified: branches/MSG2/coregrind/pub_core_libcprint.h
===================================================================
--- branches/MSG2/coregrind/pub_core_libcprint.h 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/coregrind/pub_core_libcprint.h 2009-08-23 22:46:04 UTC (rev 10864)
@@ -54,6 +54,16 @@
m_main during startup. */
void VG_(elapsed_wallclock_time) ( /*OUT*/HChar* buf );
+/* Call this if the executable is missing. This function prints an
+ error message, then shuts down the entire system. */
+__attribute__((noreturn))
+extern void VG_(err_missing_prog) ( void );
+
+/* Similarly - complain and stop if there is some kind of config error. */
+__attribute__((noreturn))
+extern void VG_(err_config_error) ( Char* msg );
+
+
#endif // __PUB_CORE_LIBCPRINT_H
/*--------------------------------------------------------------------*/
Modified: branches/MSG2/coregrind/pub_core_options.h
===================================================================
--- branches/MSG2/coregrind/pub_core_options.h 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/coregrind/pub_core_options.h 2009-08-23 22:46:04 UTC (rev 10864)
@@ -170,19 +170,6 @@
.dSYM directories as necessary? */
extern Bool VG_(clo_dsymutil);
-/* --------- Functions --------- */
-
-/* Call this if the executable is missing. This function prints an
- error message, then shuts down the entire system. */
-__attribute__((noreturn))
-extern void VG_(err_missing_prog) ( void );
-
-/* Similarly - complain and stop if there is some kind of config
- error. */
-__attribute__((noreturn))
-extern void VG_(err_config_error) ( Char* msg );
-
-
#endif // __PUB_CORE_OPTIONS_H
/*--------------------------------------------------------------------*/
Modified: branches/MSG2/docs/xml/manual-core.xml
===================================================================
--- branches/MSG2/docs/xml/manual-core.xml 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/docs/xml/manual-core.xml 2009-08-23 22:46:04 UTC (rev 10864)
@@ -596,7 +596,8 @@
<term><option>-h --help</option></term>
<listitem>
<para>Show help for all options, both for the core and for the
- selected tool.</para>
+ selected tool. If the option is repeated it is equivalent to giving
+ <option>--help-debug</option>.</para>
</listitem>
</varlistentry>
Modified: branches/MSG2/include/pub_tool_libcprint.h
===================================================================
--- branches/MSG2/include/pub_tool_libcprint.h 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/include/pub_tool_libcprint.h 2009-08-23 22:46:04 UTC (rev 10864)
@@ -32,19 +32,9 @@
#define __PUB_TOOL_LIBCPRINT_H
/* ---------------------------------------------------------------------
- Basic printing
+ Formatting functions
------------------------------------------------------------------ */
-/* Note that they all output to the file descriptor given by the
- --log-fd/--log-file/--log-socket argument, which defaults to 2
- (stderr). Hence no need for VG_(fprintf)().
-*/
-extern UInt VG_(printf) ( const HChar *format, ... )
- PRINTF_CHECK(1, 2);
-
-extern UInt VG_(vprintf) ( const HChar *format, va_list vargs )
- PRINTF_CHECK(1, 0);
-
extern UInt VG_(sprintf) ( Char* buf, const HChar* format, ... )
PRINTF_CHECK(2, 3);
@@ -65,29 +55,22 @@
void* opaque,
const HChar* format, va_list vargs );
-/* These are the same as the non "_xml" versions above, except the
- output goes on the selected XML output channel instead of the
- normal one.
-*/
-extern UInt VG_(printf_xml) ( const HChar *format, ... )
- PRINTF_CHECK(1, 2);
-
-extern UInt VG_(vprintf_xml) ( const HChar *format, va_list vargs )
- PRINTF_CHECK(1, 0);
-
-// Just like VG_(printf_xml) but without the PRINTF_CHECK, so it can be used
-// with our non-standard %t format specifier.
-extern UInt VG_(printf_xml_no_f_c) ( const HChar *format, ... );
-
// Percentify n/m with d decimal places. Includes the '%' symbol at the end.
// Right justifies in 'buf'.
extern void VG_(percentify)(ULong n, ULong m, UInt d, Int n_buf, char buf[]);
/* ---------------------------------------------------------------------
- Messages for the user
+ Output-printing functions
------------------------------------------------------------------ */
+/* Note that almost all output goes to the file descriptor given by the
+ --log-fd/--log-file/--log-socket argument, which defaults to 2 (stderr).
+ (Except that some text always goes to stdout/stderr at startup, and
+ debugging messages always go to stderr.) Hence no need for
+ VG_(fprintf)().
+*/
+
/* No, really. I _am_ that strange. */
#define OINK(nnn) VG_(message)(Vg_DebugMsg, "OINK %d\n",nnn)
@@ -106,29 +89,64 @@
}
VgMsgKind;
-/* Send a single-part message. The format specification may contain
- any ISO C format specifier or %t. No attempt is made to let the
- compiler verify consistency of the format string and the argument
- list. */
+// These print output that isn't prefixed with anything, and should be
+// used in very few cases, such as printing usage messages.
+extern UInt VG_(printf) ( const HChar *format, ... )
+ PRINTF_CHECK(1, 2);
+extern UInt VG_(vprintf) ( const HChar *format, va_list vargs )
+ PRINTF_CHECK(1, 0);
+
+// The "_no_f_c" functions here are just like their non-"_no_f_c" counterparts
+// but without the PRINTF_CHECK, so they can be used with our non-standard %t
+// format specifier.
+
+// These are the same as the non "_xml" versions above, except the
+// output goes on the selected XML output channel instead of the
+// normal one.
+extern UInt VG_(printf_xml) ( const HChar *format, ... )
+ PRINTF_CHECK(1, 2);
+extern UInt VG_(printf_xml_no_f_c) ( const HChar *format, ... );
+extern UInt VG_(vprintf_xml) ( const HChar *format, va_list vargs )
+ PRINTF_CHECK(1, 0);
+
+// Send a single-part message.
+// MMM: make private?
+extern UInt VG_(message) ( VgMsgKind kind, const HChar* format, ... )
+ PRINTF_CHECK(2, 3);
extern UInt VG_(message_no_f_c)( VgMsgKind kind, const HChar* format, ... );
-/* Send a single-part message. The format specification may contain
- any ISO C format specifier. The gcc compiler will verify
- consistency of the format string and the argument list. */
-// MMM: make private?
-extern UInt VG_(message)( VgMsgKind kind, const HChar* format, ... )
- PRINTF_CHECK(2, 3);
-
// MMM: remove?
-extern UInt VG_(vmessage)( VgMsgKind kind, const HChar* format, va_list vargs )
- PRINTF_CHECK(2, 0);
+extern UInt VG_(vmessage) ( VgMsgKind kind, const HChar* format,
+ va_list vargs )
+ PRINTF_CHECK(2, 0);
// Short-cuts for VG_(message)().
// MMM: rename these as vmsg/fmsg/etc eventually
+// This is used for start-up failures that occur before the preamble is
+// printed, eg. due to a bad executable.
extern UInt VG_(msgf) ( const HChar* format, ... ) PRINTF_CHECK(1, 2);
+
+// This is used if an option was bad for some reason. Note: don't use it just
+// because an option was unrecognised -- return 'False' from
+// VG_(tdict).tool_process_cmd_line_option) to indicate that -- use it if eg.
+// an option was given an inappropriate argument. This function prints an
+// error message, then shuts down the entire system.
+__attribute__((noreturn))
+extern void VG_(msgf_bad_option) ( HChar* opt,
+ const HChar* format, ... ) PRINTF_CHECK(2, 3);
+
+// This is used for messages that are interesting to the user: info about
+// their program (eg. preamble, tool error messages, postamble) or stuff they
+// requested.
extern UInt VG_(msgu) ( const HChar* format, ... ) PRINTF_CHECK(1, 2);
+
+// This is used for messages that are about Valgrind's execution, and of less
+// direct interest to the user.
extern UInt VG_(msgv) ( const HChar* format, ... ) PRINTF_CHECK(1, 2);
+
+// This is used for debugging messages that are only of use to developers.
extern UInt VG_(msgd) ( const HChar* format, ... ) PRINTF_CHECK(1, 2);
-// MMM: get rid of these to begin with
+
+// MMM: synonyms; get rid of these to begin with
extern UInt VG_(umsg) ( const HChar* format, ... ) PRINTF_CHECK(1, 2);
extern UInt VG_(dmsg) ( const HChar* format, ... ) PRINTF_CHECK(1, 2);
Modified: branches/MSG2/include/pub_tool_options.h
===================================================================
--- branches/MSG2/include/pub_tool_options.h 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/include/pub_tool_options.h 2009-08-23 22:46:04 UTC (rev 10864)
@@ -77,7 +77,7 @@
Long n = VG_(strtoll10)( val, &s ); \
(qq_var) = n; \
/* Check for non-numeralness, or overflow. */ \
- if ('\0' != s[0] || (qq_var) != n) VG_(err_bad_option)(qq_arg); \
+ if ('\0' != s[0] || (qq_var) != n) VG_(msgf_bad_option)(qq_arg, ""); \
True; \
}) \
)
@@ -91,15 +91,16 @@
Char* s; \
Long n = VG_(strtoll##qq_base)( val, &s ); \
(qq_var) = n; \
+ /* MMM: separate the two cases, and explain the problem; likewise */ \
+ /* for all the other macros in this file. */ \
/* Check for non-numeralness, or overflow. */ \
/* Nb: it will overflow if qq_var is unsigned and qq_val is negative! */ \
- if ('\0' != s[0] || (qq_var) != n) VG_(err_bad_option)(qq_arg); \
+ if ('\0' != s[0] || (qq_var) != n) VG_(msgf_bad_option)(qq_arg, ""); \
/* Check bounds. */ \
if ((qq_var) < (qq_lo) || (qq_var) > (qq_hi)) { \
- VG_(message)(Vg_UserMsg, \
- "'%s' argument must be between %lld and %lld\n", \
- (qq_option), (Long)(qq_lo), (Long)(qq_hi)); \
- VG_(err_bad_option)(qq_arg); \
+ VG_(msgf_bad_option)(qq_arg, \
+ "'%s' argument must be between %lld and %lld\n", \
+ (qq_option), (Long)(qq_lo), (Long)(qq_hi)); \
} \
True; \
}) \
@@ -124,7 +125,7 @@
double n = VG_(strtod)( val, &s ); \
(qq_var) = n; \
/* Check for non-numeralness */ \
- if ('\0' != s[0]) VG_(err_bad_option)(qq_arg); \
+ if ('\0' != s[0]) VG_(msgf_bad_option)(qq_arg, ""); \
True; \
}) \
)
@@ -165,15 +166,6 @@
extern Bool VG_(clo_show_below_main);
-/* Call this if a recognised option was bad for some reason. Note:
- don't use it just because an option was unrecognised -- return
- 'False' from VG_(tdict).tool_process_cmd_line_option) to indicate that --
- use it if eg. an option was given an inappropriate argument.
- This function prints an error message, then shuts down the entire system.
- It returns a Bool so it can be used in the _CLO_ macros. */
-__attribute__((noreturn))
-extern void VG_(err_bad_option) ( Char* opt );
-
/* Used to expand file names. "option_name" is the option name, eg.
"--log-file". 'format' is what follows, eg. "cachegrind.out.%p". In
'format':
Modified: branches/MSG2/include/pub_tool_tooliface.h
===================================================================
--- branches/MSG2/include/pub_tool_tooliface.h 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/include/pub_tool_tooliface.h 2009-08-23 22:46:04 UTC (rev 10864)
@@ -378,6 +378,11 @@
// record the option as well. Nb: tools can assume that the argv will
// never disappear. So they can, for example, store a pointer to a string
// within an option, rather than having to make a copy.
+ //
+ // Options (and combinations of options) should be checked in this function
+ // if possible rather than in post_clo_init(), and if they are bad then
+ // VG_(err_bad_option)() should be called. This ensures that the messaging
+ // is consistent with command line option errors from the core.
Bool (*process_cmd_line_option)(Char* argv),
// Print out command line usage for options for normal tool operation.
Modified: branches/MSG2/massif/ms_main.c
===================================================================
--- branches/MSG2/massif/ms_main.c 2009-08-23 11:17:25 UTC (rev 10863)
+++ branches/MSG2/massif/ms_main.c 2009-08-23 22:46:04 UTC (rev 10864)
@@ -423,7 +423,12 @@
else if VG_BINT_CLO(arg, "--heap-admin", clo_heap_admin, 0, 1024) {}
else if VG_BINT_CLO(arg, "--depth", clo_depth, 1, MAX_DEPTH) {}
- else if VG_DBL_CLO(arg, "--threshold", clo_threshold) {}
+ else if VG_DBL_CLO(arg, "--threshold", clo_threshold) {
+ if (clo_threshold < 0 || clo_threshold > 100) {
+ VG_(msgf_bad_option)(arg,
+ "--threshold must be between 0.0 and 100.0\n");
+ }
+ }
else if VG_DBL_CLO(arg, "--peak-inaccuracy", clo_peak_inaccuracy) {}
@@ -443,6 +448,8 @@
else if VG_STR_CLO(arg, "--massif-out-file", clo_massif_out_file) {}
else
+ // MMM: should handle this in the core if needs_malloc_replacement is
+ // set.
return VG_(replacement_malloc_process_cmd_line_option)(arg);
return True;
@@ -2264,12 +2271,6 @@
{
Int i;
- // Check options.
- if (clo_threshold < 0 || clo_threshold > 100) {
- VG_(umsg)("--threshold must be between 0.0 and 100.0\n");
- VG_(err_bad_option)("--threshold");
- }
-
// If we have --heap=no, set --heap-admin to zero, just to make sure we
// don't accidentally use a non-zero heap-admin size somewhere.
if (!clo_heap) {
|
|
From: Nicholas N. <n.n...@gm...> - 2009-08-23 22:25:34
|
On Sun, Aug 23, 2009 at 9:11 PM, <sv...@va...> wrote:
> Author: bart
> Date: 2009-08-23 12:11:36 +0100 (Sun, 23 Aug 2009)
> New Revision: 10861
>
> Log:
> Fixed a declaration: function attributes must be inserted after the return type instead of before, otherwise gcc 4.4 ignores the attribute declaration.
Really? Is this described in the GCC docs anywhere? It's a very
disturbing change, I'm sure we have numerous functions where the
attribute comes first. For example, all the Cachegrind simulation
functions look like this:
static VG_REGPARM(1)
void log_1I_0D_cache_access(InstrInfo* n)
{
...
}
If the attribute was ignored then Cachegrind should almost certainly
crash very quickly.
Nick
|
|
From: Nicholas N. <n.n...@gm...> - 2009-08-23 22:23:01
|
On Mon, Aug 24, 2009 at 2:13 AM, Bart Van Assche<bar...@gm...> wrote: > > Earlier today I found out that the functions defined in the source file > coregrind/m_aspacemgr/aspacemgr-linux.c are not only used on Linux but that > some of the functions defined in this source file are also needed for the > Darwin build. This is misleading. It might be appropriate to refactor this > module such that operating-system neutral code is moved to a common file and > only operating-system specific code remains in the source file > aspacemgr-linux.c. It's like that because the two OSes share roughly 90% of the code, but the AIX version is quite different, so I couldn't see a clean way to break it up. The easiest thing would be to rename the file as aspacemgr-linux-darwin.c. Nick |
|
From: Bart V. A. <bar...@gm...> - 2009-08-23 16:14:00
|
Hello, Earlier today I found out that the functions defined in the source file coregrind/m_aspacemgr/aspacemgr-linux.c are not only used on Linux but that some of the functions defined in this source file are also needed for the Darwin build. This is misleading. It might be appropriate to refactor this module such that operating-system neutral code is moved to a common file and only operating-system specific code remains in the source file aspacemgr-linux.c. Bart. |
|
From: <sv...@va...> - 2009-08-23 11:17:37
|
Author: bart
Date: 2009-08-23 12:17:25 +0100 (Sun, 23 Aug 2009)
New Revision: 10863
Log:
Compiles again on Darwin.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-08-23 11:14:12 UTC (rev 10862)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-08-23 11:17:25 UTC (rev 10863)
@@ -2986,6 +2986,8 @@
#endif // HAVE_MREMAP
+#if defined(VGO_linux)
+
/*-----------------------------------------------------------------*/
/*--- ---*/
/*--- A simple parser for /proc/self/maps on Linux 2.4.X/2.6.X. ---*/
@@ -3491,7 +3493,9 @@
return !css_overflowed;
}
+#endif // defined(VGO_linux)
+
#endif // defined(VGO_linux) || defined(VGO_darwin)
/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2009-08-23 11:14:26
|
Author: bart
Date: 2009-08-23 12:14:12 +0100 (Sun, 23 Aug 2009)
New Revision: 10862
Log:
The format attribute may be repeated in the function definition but does not have to.
Modified:
trunk/coregrind/m_debuglog.c
Modified: trunk/coregrind/m_debuglog.c
===================================================================
--- trunk/coregrind/m_debuglog.c 2009-08-23 11:11:36 UTC (rev 10861)
+++ trunk/coregrind/m_debuglog.c 2009-08-23 11:14:12 UTC (rev 10862)
@@ -932,7 +932,6 @@
/* Send a logging message. Nothing is output unless 'level'
is <= the current loglevel. */
/* EXPORTED */
-__attribute__((format(__printf__, 3, 4)))
void VG_(debugLog) ( Int level, const HChar* modulename,
const HChar* format, ... )
{
|
|
From: <sv...@va...> - 2009-08-23 11:11:49
|
Author: bart
Date: 2009-08-23 12:11:36 +0100 (Sun, 23 Aug 2009)
New Revision: 10861
Log:
Fixed a declaration: function attributes must be inserted after the return type instead of before, otherwise gcc 4.4 ignores the attribute declaration.
Modified:
trunk/coregrind/pub_core_debuglog.h
Modified: trunk/coregrind/pub_core_debuglog.h
===================================================================
--- trunk/coregrind/pub_core_debuglog.h 2009-08-23 09:53:27 UTC (rev 10860)
+++ trunk/coregrind/pub_core_debuglog.h 2009-08-23 11:11:36 UTC (rev 10861)
@@ -69,9 +69,9 @@
/* Send debugging output. Nothing happens unless 'level'
does not exceed the logging threshold level. */
extern
-__attribute__((format(__printf__, 3, 4)))
void VG_(debugLog) ( Int level, const HChar* modulename,
- const HChar* format, ... );
+ const HChar* format, ... )
+ __attribute__((format(__printf__, 3, 4)));
/* A simple vprintf(). For each emitted byte, (*send_fn) is called with
|
|
From: <sv...@va...> - 2009-08-23 09:53:41
|
Author: bart
Date: 2009-08-23 10:53:27 +0100 (Sun, 23 Aug 2009)
New Revision: 10860
Log:
The configure-time test whether the proc filesystem is mounted (introduced
in r10156) broke cross-compilation. This patch converts the configure-time
test into a runtime test. Should fix bug #204843.
Modified:
trunk/configure.in
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_libcfile.c
trunk/coregrind/m_main.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/pub_core_libcfile.h
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-08-23 09:48:56 UTC (rev 10859)
+++ trunk/configure.in 2009-08-23 09:53:27 UTC (rev 10860)
@@ -1470,14 +1470,6 @@
#----------------------------------------------------------------------------
-# Check for /proc filesystem
-#----------------------------------------------------------------------------
-AC_CHECK_FILES(/proc/self/fd /proc/self/exe /proc/self/maps,
- [ AC_DEFINE([HAVE_PROC], 1, [can use /proc filesystem]) ],
- [])
-
-
-#----------------------------------------------------------------------------
# Checks for C header files.
#----------------------------------------------------------------------------
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-08-23 09:48:56 UTC (rev 10859)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-08-23 09:53:27 UTC (rev 10860)
@@ -2986,8 +2986,6 @@
#endif // HAVE_MREMAP
-#if HAVE_PROC
-
/*-----------------------------------------------------------------*/
/*--- ---*/
/*--- A simple parser for /proc/self/maps on Linux 2.4.X/2.6.X. ---*/
@@ -3493,9 +3491,7 @@
return !css_overflowed;
}
-#endif // HAVE_PROC
-
#endif // defined(VGO_linux) || defined(VGO_darwin)
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_libcfile.c
===================================================================
--- trunk/coregrind/m_libcfile.c 2009-08-23 09:48:56 UTC (rev 10859)
+++ trunk/coregrind/m_libcfile.c 2009-08-23 09:53:27 UTC (rev 10860)
@@ -1083,7 +1083,24 @@
return buf;
}
+/* ---------------------------------------------------------------------
+ proc filesystem
+ ------------------------------------------------------------------ */
+Bool VG_(have_proc_filesystem)(void)
+{
+ static int have_proc_fs = -1;
+ if (have_proc_fs < 0)
+ {
+ have_proc_fs
+ = VG_(access)("/proc/self/fd", 1, 0, 0) == 0
+ && VG_(access)("/proc/self/exe", 1, 0, 0) == 0
+ && VG_(access)("/proc/self/maps", 1, 0, 0) == 0;
+ }
+ return have_proc_fs;
+}
+
+
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_main.c
===================================================================
--- trunk/coregrind/m_main.c 2009-08-23 09:48:56 UTC (rev 10859)
+++ trunk/coregrind/m_main.c 2009-08-23 09:53:27 UTC (rev 10860)
@@ -1802,48 +1802,48 @@
// when it tries to open /proc/<pid>/cmdline for itself.
// p: setup file descriptors
//--------------------------------------------------------------
-#if !HAVE_PROC
- // client shouldn't be using /proc!
- VG_(cl_cmdline_fd) = -1;
-#else
- if (!need_help) {
- HChar buf[50], buf2[50+64];
- HChar nul[1];
- Int fd, r;
- HChar* exename;
+ if (! VG_(have_proc_filesystem)()) {
+ // client shouldn't be using /proc!
+ VG_(cl_cmdline_fd) = -1;
+ } else {
+ if (!need_help) {
+ HChar buf[50], buf2[50+64];
+ HChar nul[1];
+ Int fd, r;
+ HChar* exename;
- VG_(debugLog)(1, "main", "Create fake /proc/<pid>/cmdline\n");
+ VG_(debugLog)(1, "main", "Create fake /proc/<pid>/cmdline\n");
- VG_(sprintf)(buf, "proc_%d_cmdline", VG_(getpid)());
- fd = VG_(mkstemp)( buf, buf2 );
- if (fd == -1)
- VG_(err_config_error)("Can't create client cmdline file in /tmp.");
+ VG_(sprintf)(buf, "proc_%d_cmdline", VG_(getpid)());
+ fd = VG_(mkstemp)( buf, buf2 );
+ if (fd == -1)
+ VG_(err_config_error)("Can't create client cmdline file in /tmp.");
- nul[0] = 0;
- exename = VG_(args_the_exename) ? VG_(args_the_exename)
- : "unknown_exename";
- VG_(write)(fd, VG_(args_the_exename),
- VG_(strlen)( VG_(args_the_exename) ));
- VG_(write)(fd, nul, 1);
-
- for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
- HChar* arg = * (HChar**) VG_(indexXA)( VG_(args_for_client), i );
- VG_(write)(fd, arg, VG_(strlen)( arg ));
+ nul[0] = 0;
+ exename = VG_(args_the_exename) ? VG_(args_the_exename)
+ : "unknown_exename";
+ VG_(write)(fd, VG_(args_the_exename),
+ VG_(strlen)( VG_(args_the_exename) ));
VG_(write)(fd, nul, 1);
- }
- /* Don't bother to seek the file back to the start; instead do
- it every time a copy of it is given out (by PRE(sys_open)).
- That is probably more robust across fork() etc. */
+ for (i = 0; i < VG_(sizeXA)( VG_(args_for_client) ); i++) {
+ HChar* arg = * (HChar**) VG_(indexXA)( VG_(args_for_client), i );
+ VG_(write)(fd, arg, VG_(strlen)( arg ));
+ VG_(write)(fd, nul, 1);
+ }
- /* Now delete it, but hang on to the fd. */
- r = VG_(unlink)( buf2 );
- if (r)
- VG_(err_config_error)("Can't delete client cmdline file in /tmp.");
+ /* Don't bother to seek the file back to the start; instead do
+ it every time a copy of it is given out (by PRE(sys_open)).
+ That is probably more robust across fork() etc. */
- VG_(cl_cmdline_fd) = fd;
+ /* Now delete it, but hang on to the fd. */
+ r = VG_(unlink)( buf2 );
+ if (r)
+ VG_(err_config_error)("Can't delete client cmdline file in /tmp.");
+
+ VG_(cl_cmdline_fd) = fd;
+ }
}
-#endif
//--------------------------------------------------------------
// Init tool part 1: pre_clo_init
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2009-08-23 09:48:56 UTC (rev 10859)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2009-08-23 09:53:27 UTC (rev 10860)
@@ -3526,12 +3526,12 @@
}
PRE_MEM_RASCIIZ( "open(filename)", ARG1 );
-#if HAVE_PROC
- /* Handle the case where the open is of /proc/self/cmdline or
- /proc/<pid>/cmdline, and just give it a copy of the fd for the
- fake file we cooked up at startup (in m_main). Also, seek the
- cloned fd back to the start. */
+ if (VG_(have_proc_filesystem)())
{
+ /* Handle the case where the open is of /proc/self/cmdline or
+ /proc/<pid>/cmdline, and just give it a copy of the fd for the
+ fake file we cooked up at startup (in m_main). Also, seek the
+ cloned fd back to the start. */
HChar name[30];
Char* arg1s = (Char*) ARG1;
SysRes sres;
@@ -3551,7 +3551,6 @@
return;
}
}
-#endif // HAVE_PROC
/* Otherwise handle normally */
*flags |= SfMayBlock;
@@ -3674,7 +3673,6 @@
PRE_MEM_WRITE( "readlink(buf)", ARG2,ARG3 );
{
-#if HAVE_PROC
/*
* Handle the case where readlink is looking at /proc/self/exe or
* /proc/<pid>/exe.
@@ -3682,7 +3680,7 @@
HChar name[25];
Char* arg1s = (Char*) ARG1;
VG_(sprintf)(name, "/proc/%d/exe", VG_(getpid)());
- if (ML_(safe_to_deref)(arg1s, 1) &&
+ if (VG_(have_proc_filesystem()) && ML_(safe_to_deref)(arg1s, 1) &&
(VG_STREQ(arg1s, name) || VG_STREQ(arg1s, "/proc/self/exe"))
)
{
@@ -3690,7 +3688,6 @@
SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, (UWord)name,
ARG2, ARG3));
} else
-#endif // HAVE_PROC
{
/* Normal case */
SET_STATUS_from_SysRes( VG_(do_syscall3)(saved, ARG1, ARG2, ARG3));
Modified: trunk/coregrind/pub_core_libcfile.h
===================================================================
--- trunk/coregrind/pub_core_libcfile.h 2009-08-23 09:48:56 UTC (rev 10859)
+++ trunk/coregrind/pub_core_libcfile.h 2009-08-23 09:53:27 UTC (rev 10860)
@@ -98,6 +98,10 @@
calling VG_(get_startup_wd) (in pub_tool_libcfile.h). */
extern Bool VG_(record_startup_wd) ( void );
+/* Whether or not the proc filesystem has been mounted at the /proc
+ mountpoint. */
+extern Bool VG_(have_proc_filesystem)(void);
+
#endif // __PUB_CORE_LIBCFILE_H
/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2009-08-23 09:49:16
|
Author: bart
Date: 2009-08-23 10:48:56 +0100 (Sun, 23 Aug 2009)
New Revision: 10859
Log:
Fixed a compiler warning.
Modified:
trunk/coregrind/launcher-linux.c
Modified: trunk/coregrind/launcher-linux.c
===================================================================
--- trunk/coregrind/launcher-linux.c 2009-08-22 22:50:40 UTC (rev 10858)
+++ trunk/coregrind/launcher-linux.c 2009-08-23 09:48:56 UTC (rev 10859)
@@ -135,7 +135,7 @@
return NULL;
}
- VG_(debugLog)(2, "launcher", "read %d bytes from '%s'\n", n_bytes, clientname);
+ VG_(debugLog)(2, "launcher", "read %ld bytes from '%s'\n", n_bytes, clientname);
if (header[0] == '#' && header[1] == '!') {
int i = 2;
|
|
From: Nicholas N. <n.n...@gm...> - 2009-08-23 09:11:53
|
On Sun, Aug 23, 2009 at 5:15 PM, Bart Van Assche<bar...@gm...> wrote: > > Every single regression test failure is annoying because after every > regression test run it has to be analyzed again why the regression > test failed. So I don't think that making regression tests pass is not > useful. Disabling the test is another option. > If the stabs format is increasingly rare, why is the deep_templates > regression test compiled with the -gstabs flag ? Because it was testing a former bug with the stabs reader. Nick |
|
From: Ashley P. <as...@pi...> - 2009-08-23 08:49:08
|
On Sat, 2009-08-22 at 10:49 +1000, Nicholas Nethercote wrote: > Here's a summary of a proposal. > I haven't thought much about XML yet, but hopefully the stuff we > produce via XML matches the "==pid==" category pretty closely, and > "--pid--" and "++pid++" messages won't end up in XML. My thoughts about XML are that is should contain at least as much output as the non XML output, in fact being able to re-create the normal output from the XML output is a good test that it's complete. Currently there are some options which the XML ignores, or rather are assumed turned on IIRC and it prints the output for them even if it isn't requested (--leak-check=yes) springs to mind. I think this is probably a good thing although it's perhaps not always clear that it's doing it. I would say that if it's zero cost for valgrind to collect the data then it should be included in the xml and any higher level tool can be assumed to look at the command line and only display the requested output. If collecting data has cost, like --trace-origins then it shouldn't be collected unless requested. > Any thoughts? I think it'll help users, because if they don't > understand a message at least they'll know what it pertains to (eg. > their program vs. Valgrind itself). And debugging info is cleanly > segregated. And currently a lot of messages don't have a prefix, so > if the prefix is added at least it's clear that it comes from > Valgrind. Sounds like a good idea to me. If in the process of this it would be possible to enable both xml and normal output somehow then that would be appreciated as well. https://bugs.kde.org/show_bug.cgi?id=204842 Forcing a rename of VG_(printf)() to something else would help catch all the error paths which currently just report to the error log without any matching XML warnings, hopefully it would allow xml reporting of these errors as well. Ashley, -- Ashley Pittman, Bath, UK. Padb - A parallel job inspection tool for cluster computing http://padb.pittman.org.uk |
|
From: Bart V. A. <bar...@gm...> - 2009-08-23 07:25:37
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-08-23 02:16:02 EDT Ended at 2009-08-23 03:25:15 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 446 tests, 43 stderr failures, 8 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) |
|
From: Bart V. A. <bar...@gm...> - 2009-08-23 07:15:36
|
On Sun, Aug 23, 2009 at 12:20 AM, Nicholas Nethercote <n.n...@gm...> wrote: > > On Sat, Aug 22, 2009 at 5:49 PM, Bart Van > Assche<bar...@gm...> wrote: > > > > It would be great if someone familiar with the stabs format could have > > a look at the bug report https://bugs.kde.org/show_bug.cgi?id=162482. > > Reading the debug info of > > memcheck/tests/deep_templates causes a crash in Valgrind on certain > > PPC distro's. I'm not sure however whether this is an issue with the > > Valgrind stabs reader or that the stabs debug info of the test program > > is invalid. > > The problem with stabs is that there isn't a clear standard. There is > a document, from Red Hat I think, floating around which is a > quasi-standard, and I think Valgrind's reader is based on this. But > some compilers just do different things, eg. stabs on Darwin is close > to unusable. > > Given that stabs is increasingly rare, I think there are more useful > things that can be worked on. Especially if it has only so far > manifested as a single regtest failure. Every single regression test failure is annoying because after every regression test run it has to be analyzed again why the regression test failed. So I don't think that making regression tests pass is not useful. If the stabs format is increasingly rare, why is the deep_templates regression test compiled with the -gstabs flag ? From memcheck/tests/Makefile.am: deep_templates_SOURCES = deep_templates.cpp deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs Bart. |
|
From: Tom H. <th...@cy...> - 2009-08-23 02:49:50
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-08-23 03:05:04 BST Ended at 2009-08-23 03:49:32 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 529 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Tom H. <th...@cy...> - 2009-08-23 02:49:21
|
Nightly build on vauxhall ( x86_64, Fedora 11 ) Started at 2009-08-23 03:20:05 BST Ended at 2009-08-23 03:49:02 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 539 tests, 9 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) helgrind/tests/pth_spinlock (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/qt4_rwlock (stderr) drd/tests/qt4_semaphore (stderr) exp-ptrcheck/tests/bad_percentify (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 539 tests, 6 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sun Aug 23 03:34:36 2009 --- new.short Sun Aug 23 03:49:02 2009 *************** *** 8,12 **** ! == 539 tests, 6 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) helgrind/tests/tc06_two_races_xml (stderr) --- 8,13 ---- ! == 539 tests, 9 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) + helgrind/tests/pth_spinlock (stderr) helgrind/tests/tc06_two_races_xml (stderr) *************** *** 14,15 **** --- 15,18 ---- helgrind/tests/tc23_bogus_condwait (stderr) + drd/tests/qt4_rwlock (stderr) + drd/tests/qt4_semaphore (stderr) exp-ptrcheck/tests/bad_percentify (stderr) |
|
From: Tom H. <th...@cy...> - 2009-08-23 02:31:06
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-08-23 03:10:05 BST Ended at 2009-08-23 03:30:48 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 536 tests, 2 stderr failures, 0 stdout failures, 0 post failures == helgrind/tests/pth_spinlock (stderr) helgrind/tests/tc06_two_races_xml (stderr) |