|
From: <sv...@va...> - 2007-02-09 02:11:08
|
Author: sewardj
Date: 2007-02-09 02:11:06 +0000 (Fri, 09 Feb 2007)
New Revision: 6578
Log:
Unbreak aix build.
Modified:
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/coregrind/m_debuginfo/readxcoff.c
trunk/include/vki/vki-ppc32-aix5.h
trunk/include/vki/vki-ppc64-aix5.h
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/debuginfo.c 2007-02-08 16:25:56 UTC (rev =
6577)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2007-02-09 02:11:06 UTC (rev =
6578)
@@ -428,11 +428,12 @@
=20
} else {
=20
- /* Dump all the segInfos which intersect code_start/code_len. */
+ /* Dump all the segInfos whose text segments intersect
+ code_start/code_len. */
while (True) {
for (si =3D segInfo_list; si; si =3D si->next) {
- if (code_start + code_len <=3D si->start
- || si->start + si->size <=3D code_start)
+ if (code_start + code_len <=3D si->text_start_avma
+ || si->text_start_avma + si->text_size <=3D code_start)
continue; /* no overlap */
else=20
break;
Modified: trunk/coregrind/m_debuginfo/readxcoff.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/readxcoff.c 2007-02-08 16:25:56 UTC (rev =
6577)
+++ trunk/coregrind/m_debuginfo/readxcoff.c 2007-02-09 02:11:06 UTC (rev =
6578)
@@ -888,7 +888,8 @@
cand.last +=3D text_bias;
cand.name =3D name;
=20
- if (cand.last < si->start || cand.first >=3D si->start+si->s=
ize)
+ if (cand.last < si->text_start_avma=20
+ || cand.first >=3D si->text_start_avma+si->text_size)
continue;
if (cand.last < cand.first)
continue;
@@ -942,7 +943,8 @@
cand.last +=3D text_bias;
cand.name =3D name;
=20
- if (cand.last < si->start || cand.first >=3D si->start+si->s=
ize)
+ if (cand.last < si->text_start_avma=20
+ || cand.first >=3D si->text_start_avma+si->text_size)
continue;
if (cand.last < cand.first)
continue;
@@ -1550,7 +1552,8 @@
the actual text segment. Discard any that don't. */
=20
Addr fndescr_0 =3D (Addr)fndescr[0];
- if (fndescr_0 < si->start || fndescr_0 >=3D si->start+si->size)
+ if (fndescr_0 < si->text_start_avma=20
+ || fndescr_0 >=3D si->text_start_avma+si->text_size)
continue;
=20
/* Let's suppose that fndescr is the descriptor for a
@@ -1648,7 +1651,8 @@
break; /* no space left for a 3-word descriptor */
=20
w =3D wP[0];
- if (!(w >=3D si->start && w < si->start+si->size)) {
+ if (!(w >=3D si->text_start_avma=20
+ && w < si->text_start_avma+si->text_size)) {
wP++;
continue; /* entry pointer is not to text segment */
}
@@ -1723,8 +1727,8 @@
=20
/* If everything worked right, the symbol should fall within the
mapped text segment. Hence .. */
- Bool sane =3D addr >=3D si->start=20
- && addr+size <=3D si->start + si->size;
+ Bool sane =3D addr >=3D si->text_start_avma=20
+ && addr+size <=3D si->text_start_avma + si->text_size=
;
=20
if (SHOW && SHOW_SYMS_P6) {
VG_(printf)("Phase6: %s %3d 0x%08lx-0x%08lx 0x%08lx ",=20
@@ -1905,8 +1909,9 @@
The object file from which to read symbols is mapped temporarily at
[oimage .. oimage + n_oimage).
=20
- The VMA of where the relevant text section really got loaded
- (the "actual VMA", _avma) is [si->start .. si->start + si->size). =20
+ The VMA of where the relevant text section really got loaded (the
+ "actual VMA", _avma) is [si->text_start_avma .. si->text_start_avma
+ + si->text_size).
=20
The VMA of the associated data section really got loaded
(the "actual VMA", _avma) is [data_avma .. data_avma + data_alen).
@@ -2184,7 +2189,7 @@
.o files. These have a stated text VMA of zero, and so their
symbols start from zero and work upwards. In that case the
bias is precisely the offset where the text section is=20
- loaded (si->start), that is, the actual text VMA.
+ loaded (si->text_start_avma), that is, the actual text VMA.
=20
Except -- cryptically -- /usr/include/sys/ldr.h says that the
ld_info.ldinfo_textorg field is "start of loaded program
@@ -2208,15 +2213,15 @@
if (text_svma_known) {
#if 0
if (text_svma =3D=3D 0) {
- text_bias =3D si->start;
+ text_bias =3D si->text_start_avma;
if (sntext_1based_if_known >=3D 1=20
&& sntext_1based_if_known <=3D t_filehdr->f_nscns)
text_bias +=3D t_scnhdr[sntext_1based_if_known - 1].s_scnptr=
;
} else {
- text_bias =3D si->start - VG_PGROUNDDN(text_svma);
+ text_bias =3D si->text_start_avma - VG_PGROUNDDN(text_svma);
}
#else
- text_bias =3D si->start - text_svma;
+ text_bias =3D si->text_start_avma - text_svma;
if (sntext_1based_if_known >=3D 1=20
&& sntext_1based_if_known <=3D t_filehdr->f_nscns)
text_bias +=3D t_scnhdr[sntext_1based_if_known - 1].s_scnptr;
@@ -2225,7 +2230,7 @@
if (SHOW)
VG_(printf)(" text section: stated vma 0x%lx, "
"actual vma 0x%lx, bias 0x%lx\n",=20
- text_svma, si->start, text_bias);
+ text_svma, si->text_start_avma, text_bias);
} else {
text_bias =3D 0;
if (SHOW)
@@ -2615,10 +2620,10 @@
if (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir)) {
if (si->memname) {
VG_(message)(Vg_DebugMsg, "Reading syms from %s(%s) (%p)",
- si->filename, si->memname, si->start);
+ si->filename, si->memname, si->text_start_avma);
} else {
VG_(message)(Vg_DebugMsg, "Reading syms from %s (%p)",
- si->filename, si->start);
+ si->filename, si->text_start_avma);
}
}
=20
@@ -2627,8 +2632,8 @@
VG_(printf)("--- file: %s\n", si->filename);
VG_(printf)("--- mem: %s\n", si->memname ? si->memname =20
: (UChar*)"(non=
e)" );
- VG_(printf)("--- t actual vma: %p\n", si->start);
- VG_(printf)("--- t actual len: %ld\n", si->size);
+ VG_(printf)("--- t actual vma: %p\n", si->text_start_avma);
+ VG_(printf)("--- t actual len: %ld\n", si->text_size);
VG_(printf)("--- d actual vma: %p\n", data_avma);
VG_(printf)("--- d actual len: %ld\n", data_alen);
}
Modified: trunk/include/vki/vki-ppc32-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-ppc32-aix5.h 2007-02-08 16:25:56 UTC (rev 6577)
+++ trunk/include/vki/vki-ppc32-aix5.h 2007-02-09 02:11:06 UTC (rev 6578)
@@ -145,7 +145,12 @@
=20
/* ---------------- MMappery ---------------- */
=20
-#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
+/* This assumes the page size is 4096. That assumption is checked
+ by the launcher. */
+#define VKI_PAGE_SHIFT 12
+#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
+#define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
=20
#define VKI_PROT_NONE 0x00000000
#define VKI_PROT_READ 0x00000001
Modified: trunk/include/vki/vki-ppc64-aix5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-ppc64-aix5.h 2007-02-08 16:25:56 UTC (rev 6577)
+++ trunk/include/vki/vki-ppc64-aix5.h 2007-02-09 02:11:06 UTC (rev 6578)
@@ -145,7 +145,12 @@
=20
/* ---------------- MMappery ---------------- */
=20
-#define VKI_PAGE_SIZE 4096 /* this is checked by the launcher */
+/* This assumes the page size is 4096. That assumption is checked
+ by the launcher. */
+#define VKI_PAGE_SHIFT 12
+#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
+#define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
=20
#define VKI_PROT_NONE 0x00000000
#define VKI_PROT_READ 0x00000001
|