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
(11) |
2
(9) |
3
(14) |
4
(18) |
5
(13) |
|
6
(4) |
7
(12) |
8
(16) |
9
(14) |
10
(8) |
11
(9) |
12
(7) |
|
13
(12) |
14
(6) |
15
(14) |
16
(5) |
17
(10) |
18
(8) |
19
(5) |
|
20
(10) |
21
(16) |
22
(5) |
23
(14) |
24
(10) |
25
(11) |
26
(6) |
|
27
(9) |
28
(8) |
29
(11) |
30
(9) |
31
(18) |
|
|
|
From: <sv...@va...> - 2008-01-09 22:53:42
|
Author: sewardj
Date: 2008-01-09 22:53:42 +0000 (Wed, 09 Jan 2008)
New Revision: 7335
Log:
Now that the infrastructure behind it is straightened out a bit, fix
VG_(seginfo_sect_kind) accordingly.
Modified:
branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
branches/DATASYMS/include/pub_tool_debuginfo.h
Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-01-09 22:01:40 UTC (rev 7334)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-01-09 22:53:42 UTC (rev 7335)
@@ -1455,38 +1455,46 @@
VgSectKind VG_(seginfo_sect_kind)(Addr a)
{
DebugInfo* di;
- VgSectKind ret = Vg_SectUnknown;
for (di = debugInfo_list; di != NULL; di = di->next) {
- if (a >= di->text_avma
- && a < di->text_avma + di->text_size) {
- if (0)
- VG_(printf)(
- "addr=%p di=%p %s got=%p %ld plt=%p %ld data=%p %ld bss=%p %ld\n",
- a, di, di->filename,
- di->got_avma, di->got_size,
- di->plt_avma, di->plt_size,
- di->data_avma, di->data_size,
- di->bss_avma, di->bss_size);
+ if (0)
+ VG_(printf)(
+ "addr=%p di=%p %s got=%p,%ld plt=%p,%ld data=%p,%ld bss=%p,%ld\n",
+ a, di, di->filename,
+ di->got_avma, di->got_size,
+ di->plt_avma, di->plt_size,
+ di->data_avma, di->data_size,
+ di->bss_avma, di->bss_size);
- ret = Vg_SectText;
+ if (di->text_size > 0
+ && a >= di->text_avma && a < di->text_avma + di->text_size)
+ return Vg_SectText;
- if (a >= di->data_avma && a < di->data_avma + di->data_size)
- ret = Vg_SectData;
- else
- if (a >= di->bss_avma && a < di->bss_avma + di->bss_size)
- ret = Vg_SectBSS;
- else
- if (a >= di->plt_avma && a < di->plt_avma + di->plt_size)
- ret = Vg_SectPLT;
- else
- if (a >= di->got_avma && a < di->got_avma + di->got_size)
- ret = Vg_SectGOT;
- }
+ if (di->data_size > 0
+ && a >= di->data_avma && a < di->data_avma + di->data_size)
+ return Vg_SectData;
+
+ if (di->bss_size > 0
+ && a >= di->bss_avma && a < di->bss_avma + di->bss_size)
+ return Vg_SectBSS;
+
+ if (di->plt_size > 0
+ && a >= di->plt_avma && a < di->plt_avma + di->plt_size)
+ return Vg_SectPLT;
+
+ if (di->got_size > 0
+ && a >= di->got_avma && a < di->got_avma + di->got_size)
+ return Vg_SectGOT;
+
+ if (di->opd_size > 0
+ && a >= di->opd_avma && a < di->opd_avma + di->opd_size)
+ return Vg_SectOPD;
+
+ /* we could also check for .eh_frame, if anyone really cares */
}
- return ret;
+ return Vg_SectUnknown;
}
Char* VG_(seginfo_sect_kind_name)(Addr a, Char* buf, UInt n_buf)
@@ -1510,6 +1518,9 @@
case Vg_SectPLT:
VG_(snprintf)(buf, n_buf, "PLT");
break;
+ case Vg_SectOPD:
+ VG_(snprintf)(buf, n_buf, "OPD");
+ break;
default:
vg_assert(0);
}
Modified: branches/DATASYMS/include/pub_tool_debuginfo.h
===================================================================
--- branches/DATASYMS/include/pub_tool_debuginfo.h 2008-01-09 22:01:40 UTC (rev 7334)
+++ branches/DATASYMS/include/pub_tool_debuginfo.h 2008-01-09 22:53:42 UTC (rev 7335)
@@ -130,7 +130,8 @@
Vg_SectData,
Vg_SectBSS,
Vg_SectGOT,
- Vg_SectPLT
+ Vg_SectPLT,
+ Vg_SectOPD
}
VgSectKind;
|
|
From: <sv...@va...> - 2008-01-09 22:01:40
|
Author: sewardj
Date: 2008-01-09 22:01:40 +0000 (Wed, 09 Jan 2008)
New Revision: 7334
Log:
Enable some syscalls needed to run firefox on 64-bit ppc on Fedora 8.
Modified:
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2008-01-09 21:19:44 UTC (rev 7333)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2008-01-09 22:01:40 UTC (rev 7334)
@@ -1269,7 +1269,7 @@
GENXY(__NR_wait4, sys_wait4), // 114
// _____(__NR_swapoff, sys_swapoff), // 115
-// _____(__NR_sysinfo, sys_sysinfo), // 116
+ LINXY(__NR_sysinfo, sys_sysinfo), // 116
PLAXY(__NR_ipc, sys_ipc), // 117
GENX_(__NR_fsync, sys_fsync), // 118
// _____(__NR_sigreturn, sys_sigreturn), // 119
@@ -1328,13 +1328,13 @@
GENX_(__NR_mremap, sys_mremap), // 163
// _____(__NR_setresuid, sys_setresuid), // 164
-// _____(__NR_getresuid, sys_getresuid), // 165
+ LINXY(__NR_getresuid, sys_getresuid), // 165
// _____(__NR_query_module, sys_query_module), // 166
GENXY(__NR_poll, sys_poll), // 167
// _____(__NR_nfsservctl, sys_nfsservctl), // 168
// _____(__NR_setresgid, sys_setresgid), // 169
-// _____(__NR_getresgid, sys_getresgid), // 170
+ LINXY(__NR_getresgid, sys_getresgid), // 170
// _____(__NR_prctl, sys_prctl), // 171
PLAX_(__NR_rt_sigreturn, sys_rt_sigreturn), // 172
LINXY(__NR_rt_sigaction, sys_rt_sigaction), // 173
|
|
From: <sv...@va...> - 2008-01-09 21:19:45
|
Author: sewardj Date: 2008-01-09 21:19:44 +0000 (Wed, 09 Jan 2008) New Revision: 7333 Log: Start a bug-tracking file for the 3.3 line. Added: trunk/docs/internals/3_3_BUGSTATUS.txt Modified: trunk/docs/internals/Makefile.am Added: trunk/docs/internals/3_3_BUGSTATUS.txt =================================================================== --- trunk/docs/internals/3_3_BUGSTATUS.txt (rev 0) +++ trunk/docs/internals/3_3_BUGSTATUS.txt 2008-01-09 21:19:44 UTC (rev 7333) @@ -0,0 +1,26 @@ + +---------- Legend -------------------------------------------------- + +n-i-bz = not in bugzilla +pending = is scheduled to be fixed (or at least considered) on this branch +wontfix = will not fix on this branch +many = fix composed of many commits +WF = waiting for feedback from bug reporter + +PRI: 33 = fix this for 3.3.1 + Vfd = fix has been verified on 3.3.X branch + + +---------- Bugs reported after (in) 3.3.0 -------------------------- + +TRUNK 33BRANCH PRI BUG# WHAT + +r7299 pending 33 n-i-bz stupid sizeof bug in Helgrind +r7322 pending 33 n-i-bz check fd on sys_llseek +r7323 pending 33 n-i-bz update syscall lists to kernel 2.6.23.1 +r7324 pending 33 n-i-bz support sys_sync_file_range + +vx1807 pending 33 155011 vex x86->IR: 0xCF (iret) + +pending pending 33 155091 Warning [...] unhandled DW_OP_ opcode 0x23 + (patch proposed, waiting for feedback) Modified: trunk/docs/internals/Makefile.am =================================================================== --- trunk/docs/internals/Makefile.am 2008-01-09 21:03:43 UTC (rev 7332) +++ trunk/docs/internals/Makefile.am 2008-01-09 21:19:44 UTC (rev 7333) @@ -1,5 +1,6 @@ EXTRA_DIST = \ 3_0_BUGSTATUS.txt 3_1_BUGSTATUS.txt \ + 3_2_BUGSTATUS.txt 3_3_BUGSTATUS.txt \ darwin-notes.txt darwin-syscalls.txt \ directory-structure.txt \ m_replacemalloc.txt \ |
|
From: <sv...@va...> - 2008-01-09 21:03:47
|
Author: sewardj
Date: 2008-01-09 21:03:43 +0000 (Wed, 09 Jan 2008)
New Revision: 7332
Log:
Make a new regtest target, "all-regtest", being the union of "make
regtest" and "make exp-regtest". Then change the nightly build system
to run all-regtest instead of exp-regtest.
Modified:
trunk/Makefile.am
trunk/nightly/bin/nightly
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2008-01-09 18:37:41 UTC (rev 7331)
+++ trunk/Makefile.am 2008-01-09 21:03:43 UTC (rev 7332)
@@ -70,6 +70,8 @@
@PERL@ tests/vg_regtest $(TOOLS)
exp-regtest: check
@PERL@ tests/vg_regtest $(EXP_TOOLS)
+all-regtest: check
+ @PERL@ tests/vg_regtest $(TOOLS) $(EXP_TOOLS)
## Preprend @PERL@ because tests/vg_per isn't executable
perf: check
Modified: trunk/nightly/bin/nightly
===================================================================
--- trunk/nightly/bin/nightly 2008-01-09 18:37:41 UTC (rev 7331)
+++ trunk/nightly/bin/nightly 2008-01-09 21:03:43 UTC (rev 7332)
@@ -97,7 +97,7 @@
\
runcmd $logfile \
"Running regression tests " \
- "cd valgrind && make regtest"
+ "cd valgrind && make all-regtest"
# Grab some indicative text for the short log file -- if the regtests
# succeeded, show their results. If we didn't make it that far, show the
|
|
From: Yossi K. <yos...@gm...> - 2008-01-09 19:29:50
|
On Jan 9, 2008 8:26 PM, Julian Seward <js...@ac...> wrote: > > I agree. It seems to me a Windows port would be extremely difficult. > Given that Wine already runs on lightly patched version of Valgrind, > your time would be much better spent pushing the via-Wine approach along. > Just my 2 Euro-cents .. > OK, looks like time to give up :) My original problem is shipping a custom shared memory checker to customers who use Windows as a corporate policy, without forcing them to have physical/virtual Linux machines. The skin itself is tiny, and works awfully well. Sigh... Thanks for your feedback! -- Yossi |
|
From: <sv...@va...> - 2008-01-09 18:37:39
|
Author: sewardj
Date: 2008-01-09 18:37:41 +0000 (Wed, 09 Jan 2008)
New Revision: 7331
Log:
Move VG_(clo_backtrace_size) to a tool-visible header file.
Modified:
trunk/coregrind/pub_core_options.h
trunk/include/pub_tool_options.h
Modified: trunk/coregrind/pub_core_options.h
===================================================================
--- trunk/coregrind/pub_core_options.h 2008-01-09 17:51:55 UTC (rev 7330)
+++ trunk/coregrind/pub_core_options.h 2008-01-09 18:37:41 UTC (rev 7331)
@@ -131,8 +131,6 @@
/* Display gory details for the k'th most popular error. default:
Infinity. */
extern Int VG_(clo_dump_error);
-/* Number of parents of a backtrace. Default: 8. */
-extern Int VG_(clo_backtrace_size);
/* Engage miscellaneous weird hacks needed for some progs. */
extern Char* VG_(clo_sim_hints);
/* Show symbols in the form 'name+offset' ? Default: NO */
Modified: trunk/include/pub_tool_options.h
===================================================================
--- trunk/include/pub_tool_options.h 2008-01-09 17:51:55 UTC (rev 7330)
+++ trunk/include/pub_tool_options.h 2008-01-09 18:37:41 UTC (rev 7331)
@@ -116,6 +116,9 @@
less aggressively if that is needed (callgrind needs this). */
extern VexControl VG_(clo_vex_control);
+/* Number of parents of a backtrace. Default: 8. */
+extern Int VG_(clo_backtrace_size);
+
/* 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
|
|
From: Julian S. <js...@ac...> - 2008-01-09 18:28:34
|
On Monday 07 January 2008 20:00, Dan Kegel wrote: > On Jan 7, 2008 8:50 AM, Yossi Kreinin <yos...@gm...> wrote: > > What I need is to support people using Windows as their development > > machine. > > Call me crazy, but I think the best way to do that > is to get their windows development tools running > 100% under Wine :-) I agree. It seems to me a Windows port would be extremely difficult. Given that Wine already runs on lightly patched version of Valgrind, your time would be much better spent pushing the via-Wine approach along. Just my 2 Euro-cents .. J |
|
From: <sv...@va...> - 2008-01-09 17:51:54
|
Author: sewardj
Date: 2008-01-09 17:51:55 +0000 (Wed, 09 Jan 2008)
New Revision: 7330
Log:
Fix more ppc64-linux regressions, and improve reporting of errors that
occur when reading symbol table or debug info from files.
Modified:
branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h
branches/DATASYMS/coregrind/m_debuginfo/readdwarf.c
branches/DATASYMS/coregrind/m_debuginfo/readelf.c
branches/DATASYMS/coregrind/m_debuginfo/storage.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-01-09 14:50:32 UTC (rev 7329)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-01-09 17:51:55 UTC (rev 7330)
@@ -451,14 +451,14 @@
VG_(memset)(buf1k, 0, sizeof(buf1k));
fd = VG_(open)( filename, VKI_O_RDONLY, 0 );
if (fd.isError) {
- ML_(symerr)("can't open file to inspect ELF header");
+ ML_(symerr)(NULL, True, "can't open file to inspect ELF header");
return;
}
nread = VG_(read)( fd.res, buf1k, sizeof(buf1k) );
VG_(close)( fd.res );
if (nread <= 0) {
- ML_(symerr)("can't read file to inspect ELF header");
+ ML_(symerr)(NULL, True, "can't read file to inspect ELF header");
return;
}
vg_assert(nread > 0 && nread <= sizeof(buf1k) );
Modified: branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h 2008-01-09 14:50:32 UTC (rev 7329)
+++ branches/DATASYMS/coregrind/m_debuginfo/priv_storage.h 2008-01-09 17:51:55 UTC (rev 7330)
@@ -371,8 +371,10 @@
/* ------ Misc ------ */
/* Show a non-fatal debug info reading error. Use vg_panic if
- terminal. */
-extern void ML_(symerr) ( HChar* msg );
+ terminal. 'serious' errors are always shown, not 'serious' ones
+ are shown only at verbosity level 2 and above. */
+extern
+void ML_(symerr) ( struct _DebugInfo* di, Bool serious, HChar* msg );
/* Print a symbol. */
extern void ML_(ppSym) ( Int idx, DiSym* sym );
Modified: branches/DATASYMS/coregrind/m_debuginfo/readdwarf.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readdwarf.c 2008-01-09 14:50:32 UTC (rev 7329)
+++ branches/DATASYMS/coregrind/m_debuginfo/readdwarf.c 2008-01-09 17:51:55 UTC (rev 7330)
@@ -497,7 +497,8 @@
/* Check the length of the block. */
if (info.li_length > noLargerThan) {
- ML_(symerr)("DWARF line info appears to be corrupt "
+ ML_(symerr)(di, True,
+ "DWARF line info appears to be corrupt "
"- the section is too small");
goto out;
}
@@ -510,7 +511,8 @@
(Int)info.li_version);
if (info.li_version != 2) {
- ML_(symerr)("Only DWARF version 2 line info "
+ ML_(symerr)(di, True,
+ "Only DWARF version 2 line info "
"is currently supported.");
goto out;
}
@@ -642,7 +644,8 @@
VG_(printf)("\n");
if (*data != 0) {
- ML_(symerr)("can't find NUL at end of DWARF2 directory table");
+ ML_(symerr)(di, True,
+ "can't find NUL at end of DWARF2 directory table");
goto out;
}
data ++;
@@ -683,7 +686,8 @@
VG_(printf)("\n");
if (*data != 0) {
- ML_(symerr)("can't find NUL at end of DWARF2 file name table");
+ ML_(symerr)(di, True,
+ "can't find NUL at end of DWARF2 file name table");
goto out;
}
data ++;
@@ -1132,7 +1136,8 @@
/* Make sure we at least have a header for the first block */
if (debug_info_sz < 4) {
- ML_(symerr)( "Last block truncated in .debug_info; ignoring" );
+ ML_(symerr)( di, True,
+ "Last block truncated in .debug_info; ignoring" );
return;
}
@@ -1146,14 +1151,16 @@
blklen = read_initial_length_field( block_img, &blklen_is_64 );
blklen_len = blklen_is_64 ? 12 : 4;
if ( block_img + blklen + blklen_len > end_img ) {
- ML_(symerr)( "Last block truncated in .debug_info; ignoring" );
+ ML_(symerr)( di, True,
+ "Last block truncated in .debug_info; ignoring" );
return;
}
/* version should be 2 */
ver = *((UShort*)( block_img + blklen_len ));
if ( ver != 2 ) {
- ML_(symerr)( "Ignoring non-dwarf2 block in .debug_info" );
+ ML_(symerr)( di, True,
+ "Ignoring non-dwarf2 block in .debug_info" );
continue;
}
Modified: branches/DATASYMS/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-09 14:50:32 UTC (rev 7329)
+++ branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-09 17:51:55 UTC (rev 7330)
@@ -413,7 +413,7 @@
Char buf[80];
vg_assert(VG_(strlen)(tab_name) < 40);
VG_(sprintf)(buf, " object doesn't have a %s", tab_name);
- ML_(symerr)(buf);
+ ML_(symerr)(di, False, buf);
return;
}
@@ -517,7 +517,7 @@
Char buf[80];
vg_assert(VG_(strlen)(tab_name) < 40);
VG_(sprintf)(buf, " object doesn't have a %s", tab_name);
- ML_(symerr)(buf);
+ ML_(symerr)(di, False, buf);
return;
}
@@ -934,13 +934,13 @@
fd = VG_(open)(di->filename, VKI_O_RDONLY, 0);
if (fd.isError) {
- ML_(symerr)("Can't open .so/.exe to read symbols?!");
+ ML_(symerr)(di, True, "Can't open .so/.exe to read symbols?!");
return False;
}
n_oimage = VG_(fsize)(fd.res);
if (n_oimage <= 0) {
- ML_(symerr)("Can't stat .so/.exe (to determine its size)?!");
+ ML_(symerr)(di, True, "Can't stat .so/.exe (to determine its size)?!");
VG_(close)(fd.res);
return False;
}
@@ -977,7 +977,7 @@
ok &= ML_(is_elf_object_file)(ehdr_img, n_oimage);
if (!ok) {
- ML_(symerr)("Invalid ELF Header");
+ ML_(symerr)(di, True, "Invalid ELF Header");
goto out;
}
@@ -1004,7 +1004,7 @@
|| !contained_within(
oimage, n_oimage,
(Addr)phdr_img, phdr_nent * phdr_ent_szB)) {
- ML_(symerr)("Missing or invalid ELF Program Header Table");
+ ML_(symerr)(di, True, "Missing or invalid ELF Program Header Table");
goto out;
}
@@ -1012,7 +1012,7 @@
|| !contained_within(
oimage, n_oimage,
(Addr)shdr_img, shdr_nent * shdr_ent_szB)) {
- ML_(symerr)("Missing or invalid ELF Section Header Table");
+ ML_(symerr)(di, True, "Missing or invalid ELF Section Header Table");
goto out;
}
@@ -1026,7 +1026,7 @@
if (!contained_within( oimage, n_oimage,
(Addr)shdr_strtab_img,
1/*bogus, but we don't know the real size*/ )) {
- ML_(symerr)("Invalid ELF Section Header String Table");
+ ML_(symerr)(di, True, "Invalid ELF Section Header String Table");
goto out;
}
@@ -1050,7 +1050,8 @@
if (debug)
VG_(printf)("Comparing %p %p\n", prev_svma, phdr->p_vaddr);
if (phdr->p_vaddr < prev_svma) {
- ML_(symerr)("ELF Program Headers are not in ascending order");
+ ML_(symerr)(di, True,
+ "ELF Program Headers are not in ascending order");
goto out;
}
prev_svma = phdr->p_vaddr;
@@ -1177,12 +1178,13 @@
/* Check for sane-sized segments. SHT_NOBITS sections have zero
size in the file. */
if ((foff >= n_oimage) || (foff + (bits ? size : 0) > n_oimage)) {
- ML_(symerr)("ELF Section extends beyond image end");
+ ML_(symerr)(di, True, "ELF Section extends beyond image end");
goto out;
}
# define BAD(_secname) \
- do { ML_(symerr)("Can't make sense of " _secname \
+ do { ML_(symerr)(di, True, \
+ "Can't make sense of " _secname \
" section mapping"); \
goto out; \
} while (0)
@@ -1222,6 +1224,11 @@
di->bss_size = size;
if (debug)
VG_(printf)("acquiring .bss avma = %p\n", di->bss_avma);
+ } else
+ if ((!inrw) && (!inrx) && size > 0 && di->bss_size == 0) {
+ /* File contains a .bss, but it didn't get mapped. Ignore. */
+ di->bss_avma = 0;
+ di->bss_size = 0;
} else {
BAD(".bss");
}
@@ -1252,7 +1259,7 @@
BAD(".plt");
}
}
-# elif defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+# elif defined(VGP_ppc32_linux)
/* Accept .plt where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".plt")) {
if (inrw && size > 0 && di->plt_size == 0) {
@@ -1264,6 +1271,25 @@
BAD(".plt");
}
}
+# elif defined(VGP_ppc64_linux)
+ /* Accept .plt where mapped as rw (data), or unmapped */
+ if (0 == VG_(strcmp)(name, ".plt")) {
+ if (inrw && size > 0 && di->plt_size == 0) {
+ di->plt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->plt_size = size;
+ if (debug)
+ VG_(printf)("acquiring .plt avma = %p\n", di->plt_avma);
+ } else
+ if ((!inrw) && (!inrx) && size > 0 && di->plt_size == 0) {
+ /* File contains a .plt, but it didn't get mapped.
+ Presumably it is not required on this platform. At
+ least don't reject the situation as invalid. */
+ di->plt_avma = 0;
+ di->plt_size = 0;
+ } else {
+ BAD(".plt");
+ }
+ }
# else
# error "Unsupported platform"
# endif
@@ -1382,7 +1408,8 @@
/* SHT_NOBITS sections have zero size in the file. */ \
if ( shdr->sh_offset \
+ (nobits ? 0 : sec_size) > n_oimage ) { \
- ML_(symerr)(" section beyond image end?!"); \
+ ML_(symerr)(di, True, \
+ " section beyond image end?!"); \
goto out; \
} \
} \
@@ -1448,7 +1475,8 @@
|| !contained_within(
dimage, n_dimage,
(Addr)phdr_dimg, phdr_dnent * phdr_dent_szB)) {
- ML_(symerr)("Missing or invalid ELF Program Header Table"
+ ML_(symerr)(di, True,
+ "Missing or invalid ELF Program Header Table"
" (debuginfo file)");
goto out;
}
@@ -1457,7 +1485,8 @@
|| !contained_within(
dimage, n_dimage,
(Addr)shdr_dimg, shdr_dnent * shdr_dent_szB)) {
- ML_(symerr)("Missing or invalid ELF Section Header Table"
+ ML_(symerr)(di, True,
+ "Missing or invalid ELF Section Header Table"
" (debuginfo file)");
goto out;
}
@@ -1473,7 +1502,8 @@
dimage, n_dimage,
(Addr)shdr_strtab_dimg,
1/*bogus, but we don't know the real size*/ )) {
- ML_(symerr)("Invalid ELF Section Header String Table"
+ ML_(symerr)(di, True,
+ "Invalid ELF Section Header String Table"
" (debuginfo file)");
goto out;
}
@@ -1523,7 +1553,8 @@
/* SHT_NOBITS sections have zero size in the file. */ \
if ( shdr->sh_offset \
+ (nobits ? 0 : sec_size) > n_dimage ) { \
- ML_(symerr)(" section beyond image end?!"); \
+ ML_(symerr)(di, True, \
+ " section beyond image end?!"); \
goto out; \
} \
} \
Modified: branches/DATASYMS/coregrind/m_debuginfo/storage.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/storage.c 2008-01-09 14:50:32 UTC (rev 7329)
+++ branches/DATASYMS/coregrind/m_debuginfo/storage.c 2008-01-09 17:51:55 UTC (rev 7330)
@@ -52,13 +52,36 @@
/*------------------------------------------------------------*/
/* Show a non-fatal debug info reading error. Use vg_panic if
- terminal. */
-void ML_(symerr) ( HChar* msg )
+ terminal. 'serious' errors are shown regardless of the
+ verbosity setting. */
+void ML_(symerr) ( struct _DebugInfo* di, Bool serious, HChar* msg )
{
- if (VG_(clo_verbosity) > 1)
+ /* XML mode hides everything :-( */
+ if (VG_(clo_xml))
+ return;
+
+ if (serious) {
+
+ VG_(message)(Vg_DebugMsg, "WARNING: Serious error when "
+ "reading debug info");
+ if (VG_(clo_verbosity) < 2) {
+ /* Need to show what the file name is, at verbosity levels 2
+ or below, since that won't already have been shown */
+ VG_(message)(Vg_DebugMsg,
+ "When reading debug info from %s:",
+ (di && di->filename) ? di->filename : (UChar*)"???");
+ }
VG_(message)(Vg_DebugMsg, "%s", msg);
+
+ } else { /* !serious */
+
+ if (VG_(clo_verbosity) >= 2)
+ VG_(message)(Vg_DebugMsg, "%s", msg);
+
+ }
}
+
/* Print a symbol. */
void ML_(ppSym) ( Int idx, DiSym* sym )
{
|
|
From: <sv...@va...> - 2008-01-09 14:50:31
|
Author: sewardj
Date: 2008-01-09 14:50:32 +0000 (Wed, 09 Jan 2008)
New Revision: 7329
Log:
* unbreak soname reading; make the logic more clearly like that of GNU
readelf
* unbreak ELF symbol table reading on ppc32/64-linux
* tidy up read_elf_symtab__{ppc64_linux,normal} - get rid of redundant
parameters, and use the _img/_svma/_avma/_bias naming scheme
consistently
* change lots of tabs to spaces
Modified:
branches/DATASYMS/coregrind/m_debuginfo/readelf.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-08 23:59:03 UTC (rev 7328)
+++ branches/DATASYMS/coregrind/m_debuginfo/readelf.c 2008-01-09 14:50:32 UTC (rev 7329)
@@ -196,8 +196,8 @@
ElfXX_Sym* sym, /* ELF symbol */
Char* sym_name, /* name */
Addr sym_addr, /* declared address */
- UChar* opd_filea, /* oimage of .opd sec (ppc64-linux only) */
- OffT opd_offset, /* base address assumed in oimage */
+ UChar* opd_img, /* oimage of .opd sec (ppc64-linux only) */
+ OffT opd_bias, /* for biasing AVMAs found in .opd */
/* OUTPUTS */
Char** sym_name_out, /* name we should record */
Addr* sym_addr_out, /* addr we should record */
@@ -299,8 +299,8 @@
Int offset_in_opd;
ULong* fn_descr;
- if (0) VG_(printf)("opdXXX: opd_offset %p, sym_addr %p\n",
- (void*)(opd_offset), (void*)sym_addr);
+ if (0) VG_(printf)("opdXXX: opd_bias %p, sym_addr %p\n",
+ (void*)(opd_bias), (void*)sym_addr);
if (!VG_IS_8_ALIGNED(sym_addr)) {
TRACE_SYMTAB(" ignore -- not 8-aligned: %s\n", sym_name);
@@ -320,22 +320,26 @@
/* Now we want to know what's at that offset in the .opd
section. We can't look in the running image since it won't
necessarily have been mapped. But we can consult the oimage.
- opd_filea is the start address of the .opd in the oimage.
+ opd_img is the start address of the .opd in the oimage.
Hence: */
- fn_descr = (ULong*)(opd_filea + offset_in_opd);
+ fn_descr = (ULong*)(opd_img + offset_in_opd);
if (0) VG_(printf)("opdXXY: offset %d, fn_descr %p\n",
offset_in_opd, fn_descr);
if (0) VG_(printf)("opdXXZ: *fn_descr %p\n", (void*)(fn_descr[0]));
- /* opd_offset is the difference between di->start (where the
- library got mapped) and the address space used for addresses
- within the library file. */
-
- sym_addr = fn_descr[0] + opd_offset;
+ /* opd_bias is the what we have to add to SVMAs found in .opd to
+ get plausible .text AVMAs for the entry point, and .data
+ AVMAs (presumably) for the TOC locations. We use the caller
+ supplied value (which is di->text_bias) for both of these.
+ Not sure why that is correct - it seems to work, and sounds
+ OK for fn_descr[0], but surely we need to use the data bias
+ and not the text bias for fn_descr[1] ? Oh Well.
+ */
+ sym_addr = fn_descr[0] + opd_bias;
*sym_addr_out = sym_addr;
- *sym_tocptr_out = fn_descr[1] + opd_offset;
+ *sym_tocptr_out = fn_descr[1] + opd_bias;
*from_opd_out = True;
is_in_opd = True;
@@ -391,12 +395,12 @@
__attribute__((unused)) /* not referred to on all targets */
void read_elf_symtab__normal(
struct _DebugInfo* di, UChar* tab_name,
- ElfXX_Sym* o_symtab, UInt o_symtab_sz, OffT o_symtab_offset,
- UChar* o_strtab, UInt o_strtab_sz,
- UChar* opd_filea, OffT opd_offset /* ppc64-linux only */
+ ElfXX_Sym* symtab_img, SizeT symtab_szB,
+ UChar* strtab_img, SizeT strtab_szB,
+ UChar* opd_img /* ppc64-linux only */
)
{
- Int i;
+ Word i;
Addr sym_addr, sym_addr_really;
Char *sym_name, *sym_name_really;
Int sym_size;
@@ -405,7 +409,7 @@
DiSym risym;
ElfXX_Sym *sym;
- if (o_strtab == NULL || o_symtab == NULL) {
+ if (strtab_img == NULL || symtab_img == NULL) {
Char buf[80];
vg_assert(VG_(strlen)(tab_name) < 40);
VG_(sprintf)(buf, " object doesn't have a %s", tab_name);
@@ -414,20 +418,20 @@
}
TRACE_SYMTAB("\nReading (ELF, standard) %s (%d entries)\n", tab_name,
- o_symtab_sz/sizeof(ElfXX_Sym) );
+ symtab_szB/sizeof(ElfXX_Sym) );
/* Perhaps should start at i = 1; ELF docs suggest that entry
0 always denotes 'unknown symbol'. */
- for (i = 1; i < (Int)(o_symtab_sz/sizeof(ElfXX_Sym)); i++) {
- sym = & o_symtab[i];
- sym_name = (Char*)(o_strtab + sym->st_name);
- sym_addr = o_symtab_offset + sym->st_value;
+ for (i = 1; i < (Word)(symtab_szB/sizeof(ElfXX_Sym)); i++) {
+ sym = & symtab_img[i];
+ sym_name = (UChar*)(strtab_img + sym->st_name);
+ sym_addr = di->text_bias + sym->st_value;
if (di->trace_symtab)
show_raw_elf_symbol(i, sym, sym_name, sym_addr, False);
if (get_elf_symbol_info(di, sym, sym_name, sym_addr,
- opd_filea, opd_offset,
+ opd_img, di->text_bias,
&sym_name_really,
&sym_addr_really,
&sym_size,
@@ -490,12 +494,13 @@
__attribute__((unused)) /* not referred to on all targets */
void read_elf_symtab__ppc64_linux(
struct _DebugInfo* di, UChar* tab_name,
- ElfXX_Sym* o_symtab, UInt o_symtab_sz, OffT o_symtab_offset,
- UChar* o_strtab, UInt o_strtab_sz,
- UChar* opd_filea, OffT opd_offset /* ppc64-linux only */
+ ElfXX_Sym* symtab_img, SizeT symtab_szB,
+ UChar* strtab_img, SizeT strtab_szB,
+ UChar* opd_img /* ppc64-linux only */
)
{
- Int i, old_size;
+ Word i;
+ Int old_size;
Addr sym_addr, sym_addr_really;
Char *sym_name, *sym_name_really;
Int sym_size;
@@ -508,7 +513,7 @@
TempSym *elem;
TempSym *prev;
- if (o_strtab == NULL || o_symtab == NULL) {
+ if (strtab_img == NULL || symtab_img == NULL) {
Char buf[80];
vg_assert(VG_(strlen)(tab_name) < 40);
VG_(sprintf)(buf, " object doesn't have a %s", tab_name);
@@ -517,7 +522,7 @@
}
TRACE_SYMTAB("\nReading (ELF, ppc64-linux) %s (%d entries)\n", tab_name,
- o_symtab_sz/sizeof(ElfXX_Sym) );
+ symtab_szB/sizeof(ElfXX_Sym) );
oset = VG_(OSetGen_Create)( offsetof(TempSym,key),
(OSetCmp_t)cmp_TempSymKey,
@@ -526,16 +531,16 @@
/* Perhaps should start at i = 1; ELF docs suggest that entry
0 always denotes 'unknown symbol'. */
- for (i = 1; i < (Int)(o_symtab_sz/sizeof(ElfXX_Sym)); i++) {
- sym = & o_symtab[i];
- sym_name = (Char*)(o_strtab + sym->st_name);
- sym_addr = o_symtab_offset + sym->st_value;
+ for (i = 1; i < (Word)(symtab_szB/sizeof(ElfXX_Sym)); i++) {
+ sym = & symtab_img[i];
+ sym_name = (Char*)(strtab_img + sym->st_name);
+ sym_addr = di->text_bias + sym->st_value;
if (di->trace_symtab)
show_raw_elf_symbol(i, sym, sym_name, sym_addr, True);
if (get_elf_symbol_info(di, sym, sym_name, sym_addr,
- opd_filea, opd_offset,
+ opd_img, di->text_bias,
&sym_name_really,
&sym_addr_really,
&sym_size,
@@ -553,7 +558,7 @@
modify_size = False;
modify_tocptr = False;
old_size = 0;
- old_tocptr = 0;
+ old_tocptr = 0;
if (prev->from_opd && !from_opd
&& (prev->size == 24 || prev->size == 16)
@@ -582,7 +587,7 @@
}
/* Only one or the other is possible (I think) */
- vg_assert(!(modify_size && modify_tocptr));
+ vg_assert(!(modify_size && modify_tocptr));
if (modify_size && di->trace_symtab) {
VG_(printf)(" modify (old sz %4d) "
@@ -766,7 +771,8 @@
SysRes res = VG_(am_munmap_valgrind)(sres.res, *size);
vg_assert(!res.isError);
if (VG_(clo_verbosity) > 1)
- VG_(message)(Vg_DebugMsg, "... CRC mismatch (computed %08x wanted %08x)", calccrc, crc);
+ VG_(message)(Vg_DebugMsg,
+ "... CRC mismatch (computed %08x wanted %08x)", calccrc, crc);
return 0;
}
@@ -787,7 +793,9 @@
if ((objdirptr = VG_(strrchr)(objdir, '/')) != NULL)
*objdirptr = '\0';
- debugpath = VG_(arena_malloc)(VG_AR_DINFO, VG_(strlen)(objdir) + VG_(strlen)(debugname) + 16);
+ debugpath = VG_(arena_malloc)(
+ VG_AR_DINFO,
+ VG_(strlen)(objdir) + VG_(strlen)(debugname) + 16);
VG_(sprintf)(debugpath, "%s/%s", objdir, debugname);
@@ -821,6 +829,31 @@
return (void*)( ((UChar*)base) + index * scale );
}
+/* Find the file offset corresponding to SVMA by using the program
+ headers. This is taken from binutils-2.17/binutils/readelf.c
+ offset_from_vma(). */
+static
+Word file_offset_from_svma ( /*OUT*/Bool* ok,
+ Addr svma,
+ ElfXX_Phdr* phdr_img,
+ Word phdr_nent,
+ Word phdr_ent_szB )
+{
+ Word i;
+ ElfXX_Phdr* seg;
+ for (i = 0; i < phdr_nent; i++) {
+ seg = INDEX_BIS( phdr_img, i, phdr_ent_szB );
+ if (seg->p_type != PT_LOAD)
+ continue;
+ if (svma >= (seg->p_vaddr & -seg->p_align)
+ && svma + 1 <= seg->p_vaddr + seg->p_filesz) {
+ *ok = True;
+ return svma - seg->p_vaddr + seg->p_offset;
+ }
+ }
+ *ok = False;
+ return 0;
+}
/* The central function for reading ELF debug info. For the
object/exe specified by the DebugInfo, find ELF sections, then read
@@ -1007,8 +1040,7 @@
vg_assert(di->soname == NULL);
{
- ElfXX_Addr prev_addr = 0;
- Addr baseaddr = 0;
+ ElfXX_Addr prev_svma = 0;
for (i = 0; i < phdr_nent; i++) {
ElfXX_Phdr* phdr = INDEX_BIS( phdr_img, i, phdr_ent_szB );
@@ -1016,12 +1048,12 @@
/* Make sure the PT_LOADable entries are in order */
if (phdr->p_type == PT_LOAD) {
if (debug)
- VG_(printf)("Comparing %p %p\n", prev_addr, phdr->p_vaddr);
- if (phdr->p_vaddr < prev_addr) {
+ VG_(printf)("Comparing %p %p\n", prev_svma, phdr->p_vaddr);
+ if (phdr->p_vaddr < prev_svma) {
ML_(symerr)("ELF Program Headers are not in ascending order");
goto out;
}
- prev_addr = phdr->p_vaddr;
+ prev_svma = phdr->p_vaddr;
}
/* Try to get the soname. If there isn't one, use "NONE".
@@ -1031,57 +1063,68 @@
if (phdr->p_type == PT_DYNAMIC && di->soname == NULL) {
ElfXX_Dyn* dyn_img = (ElfXX_Dyn*)( ((UChar*)ehdr_img)
+ phdr->p_offset);
- Word stroff = -1;
- UChar* strtab = NULL;
- Word j;
-
- for (j = 0; dyn_img[j].d_tag != DT_NULL; j++) {
- switch (dyn_img[j].d_tag) {
- case DT_SONAME:
- stroff = dyn_img[j].d_un.d_val;
- break;
- case DT_STRTAB:
- strtab = ((UChar*)ehdr_img)
- + dyn_img[j].d_un.d_ptr - baseaddr;
- break;
- }
- }
-
- if (stroff != -1 && strtab != NULL) {
+ Word stroff = -1;
+ UChar* strtab = NULL;
+ Word j;
+ for (j = 0; dyn_img[j].d_tag != DT_NULL; j++) {
+ switch (dyn_img[j].d_tag) {
+ case DT_SONAME: {
+ stroff = dyn_img[j].d_un.d_val;
+ break;
+ }
+ case DT_STRTAB: {
+ Bool ok2 = False;
+ Word offset = file_offset_from_svma(
+ &ok2,
+ dyn_img[j].d_un.d_ptr,
+ phdr_img,
+ phdr_nent, phdr_ent_szB
+ );
+ if (ok2 && strtab == NULL) {
+ vg_assert(offset >= 0 && offset <= n_oimage);
+ strtab = ((UChar*)ehdr_img) + offset;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ if (stroff != -1 && strtab != NULL) {
if (debug)
VG_(printf)("Got soname=%s\n", strtab+stroff);
- TRACE_SYMTAB("soname=%s\n", strtab+stroff);
- di->soname = VG_(arena_strdup)(VG_AR_DINFO, strtab+stroff);
- }
- }
+ TRACE_SYMTAB("soname=%s\n", strtab+stroff);
+ di->soname = VG_(arena_strdup)(VG_AR_DINFO, strtab+stroff);
+ }
+ }
-//zz if (o_phdr->p_type != PT_LOAD)
-//zz continue;
+//zz if (o_phdr->p_type != PT_LOAD)
+//zz continue;
//zz
-//zz if (!offset_set) {
-//zz offset_set = True;
-//zz offset_oimage = si->text_start_avma - o_phdr->p_vaddr;
-//zz baseaddr = o_phdr->p_vaddr;
-//zz }
+//zz if (!offset_set) {
+//zz offset_set = True;
+//zz offset_oimage = si->text_start_avma - o_phdr->p_vaddr;
+//zz baseaddr = o_phdr->p_vaddr;
+//zz }
//zz
//zz // Get the data and bss start/size if appropriate
-//zz mapped = o_phdr->p_vaddr + offset_oimage;
-//zz mapped_end = mapped + o_phdr->p_memsz;
-//zz if (si->data_start_avma == 0 &&
-//zz (o_phdr->p_flags & (PF_R|PF_W|PF_X)) == (PF_R|PF_W)) {
-//zz si->data_start_avma = mapped;
-//zz si->data_size = o_phdr->p_filesz;
-//zz si->bss_start_avma = mapped + o_phdr->p_filesz;
-//zz if (o_phdr->p_memsz > o_phdr->p_filesz)
-//zz si->bss_size = o_phdr->p_memsz - o_phdr->p_filesz;
-//zz else
-//zz si->bss_size = 0;
-//zz }
+//zz mapped = o_phdr->p_vaddr + offset_oimage;
+//zz mapped_end = mapped + o_phdr->p_memsz;
+//zz if (si->data_start_avma == 0 &&
+//zz (o_phdr->p_flags & (PF_R|PF_W|PF_X)) == (PF_R|PF_W)) {
+//zz si->data_start_avma = mapped;
+//zz si->data_size = o_phdr->p_filesz;
+//zz si->bss_start_avma = mapped + o_phdr->p_filesz;
+//zz if (o_phdr->p_memsz > o_phdr->p_filesz)
+//zz si->bss_size = o_phdr->p_memsz - o_phdr->p_filesz;
+//zz else
+//zz si->bss_size = 0;
+//zz }
//zz
//zz mapped = mapped & ~(VKI_PAGE_SIZE-1);
-//zz mapped_end = (mapped_end + VKI_PAGE_SIZE - 1) & ~(VKI_PAGE_SIZE-1);
+//zz mapped_end = (mapped_end + VKI_PAGE_SIZE - 1) & ~(VKI_PAGE_SIZE-1);
//zz
-//zz if (VG_(needs).data_syms
+//zz if (VG_(needs).data_syms
//zz && mapped >= si->text_start_avma
//zz && mapped <= (si->text_start_avma + si->text_size)
//zz && mapped_end > (si->text_start_avma + si->text_size)) {
@@ -1090,18 +1133,18 @@
//zz the segment's text_size unless there is an assumption
//zz that the data segment has been mapped immediately after
//zz the text segment. Which doesn't sound good to me. */
-//zz UInt newsz = mapped_end - si->text_start_avma;
-//zz if (newsz > si->text_size) {
-//zz if (0)
-//zz VG_(printf)("extending mapping %p..%p %d -> ..%p %d\n",
-//zz si->text_start_avma,
+//zz UInt newsz = mapped_end - si->text_start_avma;
+//zz if (newsz > si->text_size) {
+//zz if (0)
+//zz VG_(printf)("extending mapping %p..%p %d -> ..%p %d\n",
+//zz si->text_start_avma,
//zz si->text_start_avma + si->text_size,
//zz si->text_size,
-//zz si->text_start_avma + newsz, newsz);
+//zz si->text_start_avma + newsz, newsz);
//zz
-//zz si->text_size = newsz;
-//zz }
-//zz }
+//zz si->text_size = newsz;
+//zz }
+//zz }
}
}
@@ -1196,6 +1239,8 @@
}
}
+ /* PLT is different on different platforms, it seems. */
+# if defined(VGP_x86_linux) || defined(VGP_amd64_linux)
/* Accept .plt where mapped as rx (code) */
if (0 == VG_(strcmp)(name, ".plt")) {
if (inrx && size > 0 && di->plt_size == 0) {
@@ -1207,6 +1252,21 @@
BAD(".plt");
}
}
+# elif defined(VGP_ppc32_linux) || defined(VGP_ppc64_linux)
+ /* Accept .plt where mapped as rw (data) */
+ if (0 == VG_(strcmp)(name, ".plt")) {
+ if (inrw && size > 0 && di->plt_size == 0) {
+ di->plt_avma = di->rw_map_avma + foff - di->rw_map_foff;
+ di->plt_size = size;
+ if (debug)
+ VG_(printf)("acquiring .plt avma = %p\n", di->plt_avma);
+ } else {
+ BAD(".plt");
+ }
+ }
+# else
+# error "Unsupported platform"
+# endif
/* Accept .opd where mapped as rw (data) */
if (0 == VG_(strcmp)(name, ".opd")) {
@@ -1275,7 +1335,7 @@
UChar* dwarf1d_img = NULL; /* .debug (dwarf1) */
UChar* dwarf1l_img = NULL; /* .line (dwarf1) */
UChar* ehframe_img = NULL; /* .eh_frame (dwarf2) */
- UChar* opd_img = NULL; /* .opd (dwarf2, ppc64-linux) */
+ UChar* opd_img = NULL; /* .opd (dwarf2, ppc64-linux) */
/* Section sizes, in bytes */
SizeT strtab_sz = 0;
@@ -1292,17 +1352,18 @@
SizeT dwarf1d_sz = 0;
SizeT dwarf1l_sz = 0;
SizeT ehframe_sz = 0;
+ SizeT opd_sz_unused = 0;
/* Find all interesting sections */
/* What FIND does: it finds the section called SEC_NAME. The
- size of it is assigned to SEC_SIZE. The address of the
- section in the transiently loaded oimage is assigned to
- SEC_FILEA. Even for sections which are marked loadable, the
- client's ld.so may not have loaded them yet, so there is no
- guarantee that we can safely prod around in any such area).
- Because the entire object file is transiently mapped aboard
- for inspection, it's always safe to inspect that area. */
+ size of it is assigned to SEC_SIZE. The address of the
+ section in the transiently loaded oimage is assigned to
+ SEC_FILEA. Even for sections which are marked loadable, the
+ client's ld.so may not have loaded them yet, so there is no
+ guarantee that we can safely prod around in any such area).
+ Because the entire object file is transiently mapped aboard
+ for inspection, it's always safe to inspect that area. */
for (i = 0; i < ehdr_img->e_shnum; i++) {
@@ -1347,6 +1408,8 @@
FIND(".line", dwarf1l_sz, dwarf1l_img)
FIND(".eh_frame", ehframe_sz, ehframe_img)
+ FIND(".opd", opd_sz_unused, opd_img)
+
# undef FIND
}
@@ -1368,13 +1431,13 @@
&& ML_(is_elf_object_file)((void*)dimage, n_dimage)) {
/* Pull out and validate program header and section header info */
- ElfXX_Ehdr* ehdr_dimg = (ElfXX_Ehdr*)dimage;
- ElfXX_Phdr* phdr_dimg = (ElfXX_Phdr*)( ((UChar*)ehdr_dimg)
- + ehdr_dimg->e_phoff );
- UWord phdr_dnent = ehdr_dimg->e_phnum;
- UWord phdr_dent_szB = ehdr_dimg->e_phentsize;
- ElfXX_Shdr* shdr_dimg = (ElfXX_Shdr*)( ((UChar*)ehdr_dimg)
- + ehdr_dimg->e_shoff );
+ ElfXX_Ehdr* ehdr_dimg = (ElfXX_Ehdr*)dimage;
+ ElfXX_Phdr* phdr_dimg = (ElfXX_Phdr*)( ((UChar*)ehdr_dimg)
+ + ehdr_dimg->e_phoff );
+ UWord phdr_dnent = ehdr_dimg->e_phnum;
+ UWord phdr_dent_szB = ehdr_dimg->e_phentsize;
+ ElfXX_Shdr* shdr_dimg = (ElfXX_Shdr*)( ((UChar*)ehdr_dimg)
+ + ehdr_dimg->e_shoff );
UWord shdr_dnent = ehdr_dimg->e_shnum;
UWord shdr_dent_szB = ehdr_dimg->e_shentsize;
UChar* shdr_strtab_dimg = NULL;
@@ -1385,7 +1448,8 @@
|| !contained_within(
dimage, n_dimage,
(Addr)phdr_dimg, phdr_dnent * phdr_dent_szB)) {
- ML_(symerr)("Missing or invalid ELF Program Header Table (debuginfo file)");
+ ML_(symerr)("Missing or invalid ELF Program Header Table"
+ " (debuginfo file)");
goto out;
}
@@ -1393,7 +1457,8 @@
|| !contained_within(
dimage, n_dimage,
(Addr)shdr_dimg, shdr_dnent * shdr_dent_szB)) {
- ML_(symerr)("Missing or invalid ELF Section Header Table (debuginfo file)");
+ ML_(symerr)("Missing or invalid ELF Section Header Table"
+ " (debuginfo file)");
goto out;
}
@@ -1404,10 +1469,12 @@
shdr_strtab_dimg
= (UChar*)( ((UChar*)ehdr_dimg)
+ shdr_dimg[ehdr_dimg->e_shstrndx].sh_offset);
- if (!contained_within( dimage, n_dimage,
- (Addr)shdr_strtab_dimg,
- 1/*bogus, but we don't know the real size*/ )) {
- ML_(symerr)("Invalid ELF Section Header String Table (debuginfo file)");
+ if (!contained_within(
+ dimage, n_dimage,
+ (Addr)shdr_strtab_dimg,
+ 1/*bogus, but we don't know the real size*/ )) {
+ ML_(symerr)("Invalid ELF Section Header String Table"
+ " (debuginfo file)");
goto out;
}
@@ -1418,7 +1485,8 @@
for (i = 0; i < ehdr_dimg->e_phnum; i++) {
ElfXX_Phdr* phdr
- = INDEX_BIS( (void*)(dimage + ehdr_dimg->e_phoff), i, phdr_ent_szB );
+ = INDEX_BIS( (void*)(dimage + ehdr_dimg->e_phoff),
+ i, phdr_ent_szB );
if (phdr->p_type == PT_LOAD) {
//offset_dimage = di->text_avma - phdr->p_vaddr;
// FIXME: update di->text_bias at this point?
@@ -1436,7 +1504,7 @@
/* Find all interesting sections */
for (i = 0; i < ehdr_dimg->e_shnum; i++) {
-# define FIND(condition, sec_name, sec_size, sec_img) \
+# define FIND(condition, sec_name, sec_size, sec_img) \
do { ElfXX_Shdr* shdr \
= INDEX_BIS( shdr_dimg, i, shdr_dent_szB ); \
if (condition \
@@ -1449,8 +1517,9 @@
sec_size = shdr->sh_size; \
nobits = shdr->sh_type == SHT_NOBITS; \
TRACE_SYMTAB( "%18s: filea %p .. %p\n", \
- sec_name, (UChar*)sec_img, \
- ((UChar*)sec_img) + sec_size - 1); \
+ sec_name, \
+ (UChar*)sec_img, \
+ ((UChar*)sec_img) + sec_size - 1); \
/* SHT_NOBITS sections have zero size in the file. */ \
if ( shdr->sh_offset \
+ (nobits ? 0 : sec_size) > n_dimage ) { \
@@ -1483,26 +1552,29 @@
/* Read symbols */
{
- void (*read_elf_symtab)(struct _DebugInfo*,UChar*,ElfXX_Sym*,
- UInt,OffT,UChar*,UInt,UChar*,OffT);
+ void (*read_elf_symtab)(struct _DebugInfo*,UChar*,
+ ElfXX_Sym*,SizeT,
+ UChar*,SizeT,
+ UChar*);
# if defined(VGP_ppc64_linux)
read_elf_symtab = read_elf_symtab__ppc64_linux;
# else
read_elf_symtab = read_elf_symtab__normal;
# endif
read_elf_symtab(di, "symbol table",
- symtab_img, symtab_sz, di->text_bias,
+ symtab_img, symtab_sz,
strtab_img, strtab_sz,
- opd_img, di->data_bias/*opd_offset*/);
+ opd_img);
read_elf_symtab(di, "dynamic symbol table",
- dynsym_img, dynsym_sz, di->text_bias,
+ dynsym_img, dynsym_sz,
dynstr_img, dynstr_sz,
- opd_img, di->data_bias/*opd_offset*/);
+ opd_img);
}
/* Read .eh_frame (call-frame-info) if any */
if (ehframe_img) {
+ vg_assert(ehframe_sz == di->ehframe_size);
ML_(read_callframe_info_dwarf3)
( di, ehframe_img, di->ehframe_size, di->ehframe_avma );
}
|
|
From: Vince W. <vi...@cs...> - 2008-01-09 04:16:33
|
Hello > > http://www.csl.cornell.edu/~vince/projects/valsim/ > > > We don't really have official guidelines for adding experimental tools, > other than someone must be willing to maintain it. I think it could be > useful to multiple people using Simpoints, so I think it could be a suitable > addition. I see it's a fairly simple tool (bbv_main.c isn't very long), so > that's a plus. Yes, it's a relatively straightforward tool. It would be nice to have a completely open-source bbv generating tool available to the general public. I must admit some of my reasons for wanting it merged are a bit selfish; I mainly hate messting around with automake and configure files whenever I want to build the tool on a new machine. I really need to get some test cases too. Trying to get things in shape for merging with a public tree is a good incentive for getting around to lots of testing and code cleanup. > If you're looking up the OSet for every instruction then I can believe that > would cause a big slow-down. I think you can instead do the look-up at > instrumentation-time rather than run-time. You're right, I hadn't thought about that! I've made this change, and now my tool runs at least twice as fast as it used to. Thanks Vince |
|
From: Tom H. <th...@cy...> - 2008-01-09 04:01:15
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2008-01-09 03:15:08 GMT 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 == 323 tests, 66 stderr failures, 1 stdout failure, 28 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/lsframe1 (stderr) memcheck/tests/lsframe2 (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/noisy_child (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/x86/bug152022 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (post) massif/tests/basic (post) massif/tests/basic2 (post) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (post) massif/tests/ignoring (post) massif/tests/insig (post) massif/tests/long-time (post) massif/tests/new-cpp (post) massif/tests/null (post) massif/tests/one (post) massif/tests/overloaded-new (post) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (post) massif/tests/zero2 (post) none/tests/blockfault (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/hg06_readshared (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc02_simple_tls (stderr) helgrind/tests/tc03_re_excl (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) helgrind/tests/tc24_nonzero_sem (stderr) |
|
From: Tom H. <th...@cy...> - 2008-01-09 03:38:24
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2008-01-09 03:05:09 GMT 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 == 357 tests, 7 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) |
|
From: Tom H. <th...@cy...> - 2008-01-09 03:28:35
|
Nightly build on dellow ( x86_64, Fedora 8 ) started at 2008-01-09 03:10:06 GMT 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 == 357 tests, 8 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) |
|
From: Tom H. <th...@cy...> - 2008-01-09 03:15:40
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2008-01-09 03:00:02 GMT 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 == 359 tests, 30 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/blockfault (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |