Author: sewardj
Date: 2008-02-29 19:44:04 +0000 (Fri, 29 Feb 2008)
New Revision: 7513
Log:
Make debuginfo reading work again on AIX, and improve debug printing a
bit.
Modified:
branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
branches/DATASYMS/coregrind/m_debuginfo/readxcoff.c
Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-29 19:37:03 UTC
(rev 7512)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-02-29 19:44:04 UTC
(rev 7513)
@@ -727,14 +727,20 @@
di = find_or_create_DebugInfo_for( file_name, mem_name );
vg_assert(di);
- di->text_svma = 0; /* don't know yet */
- di->text_bias = 0; /* don't know yet */
- di->text_avma = code_start;
- di->text_size = code_len;
- di->data_svma = 0; /* don't know yet */
- di->data_bias = 0; /* don't know yet */
- di->data_avma = data_start;
- di->data_size = data_len;
+ if (code_len > 0) {
+ di->text_present = True;
+ di->text_svma = 0; /* don't know yet */
+ di->text_bias = 0; /* don't know yet */
+ di->text_avma = code_start;
+ di->text_size = code_len;
+ }
+ if (data_len > 0) {
+ di->data_present = True;
+ di->data_svma = 0; /* don't know yet */
+ di->data_bias = 0; /* don't know yet */
+ 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
@@ -765,7 +771,8 @@
/* Dump all the debugInfos whose text segments intersect
code_start/code_len. */
- discard_syms_in_range( code_start, code_len );
+ if (code_len > 0)
+ discard_syms_in_range( code_start, code_len );
}
}
Modified: branches/DATASYMS/coregrind/m_debuginfo/readxcoff.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/readxcoff.c 2008-02-29 19:37:03 UTC
(rev 7512)
+++ branches/DATASYMS/coregrind/m_debuginfo/readxcoff.c 2008-02-29 19:44:04 UTC
(rev 7513)
@@ -93,7 +93,7 @@
#define SHOW_AR_DETAILS 0 /* show details of .a file internals */
-#define SHOW VG_(clo_trace_symtab)
+#define SHOW di->trace_symtab
/* A small stack of filenames is maintained for dealing
with BINCL/EINCL symbol table entries. */
@@ -1546,7 +1546,8 @@
}
-static void show_loader_section ( UChar* oi_start, UWord size )
+static void show_loader_section ( struct _DebugInfo* di,
+ UChar* oi_start, UWord size )
{
Int i, j;
LDHDR* hdr = (LDHDR*)oi_start;
@@ -2024,7 +2025,7 @@
i, name_of_scnhdr_s_flags(t_scnhdr[i].s_flags) );
switch (t_scnhdr[i].s_flags & 0xFFFF) {
case STYP_LOADER:
- show_loader_section( oimage + t_scnhdr[i].s_scnptr,
+ show_loader_section( di, oimage + t_scnhdr[i].s_scnptr,
t_scnhdr[i].s_size );
break;
default:
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers