|
From: <sv...@va...> - 2008-02-20 01:12:50
|
Author: sewardj
Date: 2008-02-20 01:12:54 +0000 (Wed, 20 Feb 2008)
New Revision: 7428
Log:
Unbreak build on aix5.
Modified:
branches/DATASYMS/coregrind/Makefile.am
branches/DATASYMS/coregrind/m_debuginfo/d3basics.c
branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
branches/DATASYMS/coregrind/m_debuginfo/readxcoff.c
Modified: branches/DATASYMS/coregrind/Makefile.am
===================================================================
--- branches/DATASYMS/coregrind/Makefile.am 2008-02-19 22:03:01 UTC (rev 7427)
+++ branches/DATASYMS/coregrind/Makefile.am 2008-02-20 01:12:54 UTC (rev 7428)
@@ -202,6 +202,7 @@
m_xarray.c \
m_aspacemgr/aspacemgr-common.c \
m_debuginfo/misc.c \
+ m_debuginfo/d3basics.c \
m_debuginfo/storage.c \
m_debuginfo/debuginfo.c \
m_debuginfo/tytypes.c \
@@ -222,7 +223,6 @@
m_aspacemgr/aspacemgr-linux.c \
m_initimg/initimg-linux.c \
m_debuginfo/readelf.c \
- m_debuginfo/d3basics.c \
m_debuginfo/readdwarf.c \
m_debuginfo/readdwarf3.c \
m_debuginfo/readstabs.c \
Modified: branches/DATASYMS/coregrind/m_debuginfo/d3basics.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/d3basics.c 2008-02-19 22:03:01 UTC (rev 7427)
+++ branches/DATASYMS/coregrind/m_debuginfo/d3basics.c 2008-02-20 01:12:54 UTC (rev 7428)
@@ -389,6 +389,8 @@
VG_(printf)("get_Dwarf_Reg(ppc64-linux)(%ld)\n", regno);
if (regno == 31) return False;
vg_assert(0);
+# elif defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
+ vg_assert(0); /* this function should never be called */
# else
# error "Unknown platform"
# endif
Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-19 22:03:01 UTC (rev 7427)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-20 01:12:54 UTC (rev 7428)
@@ -635,10 +635,10 @@
TRACE_SYMTAB("------ name = %s\n", di->filename);
TRACE_SYMTAB("\n");
- /* We're going to read symbols and debug info for the vma ranges
- [rx_map_avma,+rx_map_size) and [rw_map_avma,+rw_map_size).
- First get rid of any other DebugInfos which overlap either of
- those ranges (to avoid total confusion). */
+ /* We're going to read symbols and debug info for the avma
+ ranges [rx_map_avma, +rx_map_size) and [rw_map_avma,
+ +rw_map_size). First get rid of any other DebugInfos which
+ overlap either of those ranges (to avoid total confusion). */
discard_DebugInfos_which_overlap_with( di );
/* .. and acquire new info. */
@@ -736,6 +736,16 @@
di->data_avma = data_start;
di->data_size = data_len;
+ /* These need to be filled in in order to keep various
+ assertions in storage.c happy. In particular see
+ "Comment_Regarding_Text_Range_Checks" in that file. */
+ di->have_rx_map = True;
+ di->rx_map_avma = code_start;
+ di->rx_map_size = code_len;
+ di->have_rw_map = True;
+ di->rw_map_avma = data_start;
+ di->rw_map_size = data_len;
+
ok = ML_(read_xcoff_debug_info) ( di, is_mainexe );
if (ok) {
Modified: branches/DATASYMS/coregrind/m_debuginfo/readxcoff.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readxcoff.c 2008-02-19 22:03:01 UTC (rev 7427)
+++ branches/DATASYMS/coregrind/m_debuginfo/readxcoff.c 2008-02-20 01:12:54 UTC (rev 7428)
@@ -49,7 +49,6 @@
#include "pub_core_basics.h"
#include "pub_core_vki.h" /* struct vki_stat et al */
-#include "pub_core_debuginfo.h"
#include "pub_core_libcbase.h"
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
@@ -57,6 +56,9 @@
#include "pub_core_aspacemgr.h" /* for mmaping debuginfo files */
#include "pub_core_options.h" /* VG_(clo_trace_symtab) */
#include "pub_core_xarray.h"
+#include "priv_misc.h"
+#include "priv_tytypes.h"
+#include "priv_d3basics.h"
#include "priv_storage.h"
#include "priv_readxcoff.h" /* self */
@@ -492,19 +494,12 @@
return False;
}
-static void* malloc_AR_SYMTAB ( SizeT nbytes ) {
- return VG_(arena_malloc)(VG_AR_DINFO, nbytes);
-}
-static void free_AR_SYMTAB ( void* ptr ) {
- return VG_(arena_free)(VG_AR_DINFO, ptr);
-}
-
/* Read symbol and line number info for the given text section. (This
is the central routine for XCOFF reading.) Returns NULL on
success, or the text of an error message otherwise. */
static
HChar* read_symbol_table (
- /*MOD*/DebugInfo* di,
+ /*MOD*/struct _DebugInfo* di,
/* location of symbol table */
UChar* oi_symtab, UWord oi_nent_symtab,
@@ -574,7 +569,8 @@
add the rest to 'syms'.
---------------------------------------------------------- */
- syms = VG_(newXA)( malloc_AR_SYMTAB, free_AR_SYMTAB, sizeof(XCoffSym) );
+ syms = VG_(newXA)( ML_(dinfo_zalloc), ML_(dinfo_free),
+ sizeof(XCoffSym) );
if (SHOW && SHOW_SYMS_P1) {
VG_(printf)("--- BEGIN Phase1 (find text symbol starts) ---\n");
@@ -1684,7 +1680,7 @@
we get here.
*/
static
-Bool read_xcoff_mapped_object ( DebugInfo* di,
+Bool read_xcoff_mapped_object ( struct _DebugInfo* di,
UChar* oimage, UWord n_oimage )
{
#define BAD(_msg) do { ML_(symerr)(di, True/*serious*/,_msg); \
@@ -2138,7 +2134,7 @@
/* Returns True on success, False if any kind of problem. */
static
-Bool read_xcoff_o_or_a ( /*MOD*/DebugInfo* di,
+Bool read_xcoff_o_or_a ( /*MOD*/struct _DebugInfo* di,
HChar* a_name, HChar* o_name )
{
UChar* image = NULL;
@@ -2412,8 +2408,8 @@
and all other fields should be zeroed.
*/
-Bool ML_(read_xcoff_debug_info) ( DebugInfo* di,
- Bool is_mainexe )
+Bool ML_(read_xcoff_debug_info) ( struct _DebugInfo* di,
+ Bool is_mainexe )
{
Bool ok;
@@ -2458,14 +2454,14 @@
if (di->memname) {
/* set the soname to "archive.a(member.o)" */
Int nbytes = VG_(strlen)(p) + 1 + VG_(strlen)(di->memname) + 1 + 1;
- UChar* so = malloc_AR_SYMTAB(nbytes);
+ UChar* so = ML_(dinfo_zalloc)(nbytes);
vg_assert(so);
VG_(sprintf)(so, "%s(%s)", p, di->memname);
vg_assert(VG_(strlen)(so) == nbytes-1);
di->soname = so;
} else {
/* no member name, hence soname = "archive.a" */
- di->soname = VG_(arena_strdup)(VG_AR_DINFO, p);
+ di->soname = ML_(dinfo_strdup)(p);
}
}
if (SHOW)
|