|
From: Tom H. <th...@cy...> - 2004-10-07 08:24:00
|
CVS commit by thughes:
Added a module level stabs_debug flag to turn on all debugging.
M +11 -11 vg_stabs.c 1.18
--- valgrind/coregrind/vg_stabs.c #1.17:1.18
@@ -102,4 +102,5 @@ typedef struct _StabTypeTab {
} StabTypeTab;
+static const Bool stabs_debug = True;
static UInt header_hash(Char *filename, UInt instance)
@@ -123,5 +124,5 @@ static UInt header_hash(Char *filename,
static SymType *structRef(StabTypeTab *tab, SymType *def, Bool isstruct, Char *name)
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
struct structlist *sl;
SymType *ty;
@@ -168,5 +169,5 @@ static SymType *structRef(StabTypeTab *t
static SymType *structDef(StabTypeTab *tab, SymType *def, Bool isstruct, Char *name)
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
SymType *ref = structRef(tab, NULL, isstruct, name);
@@ -226,5 +227,5 @@ static StabFile *getStabFile(StabTypeTab
static void addFileAlias(StabTypeTab *tab, Char *filename, UInt instance, Int idx)
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
struct header *hp;
@@ -245,5 +246,5 @@ static void addFileAlias(StabTypeTab *ta
static void addHeader(StabTypeTab *tab, Char *filename, UInt instance, Int idx)
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
struct header *hp, **bucket;
@@ -496,5 +497,5 @@ static void parse_typeref(Char **pp, Int
static void stab_resolve(SymType *st, void *data)
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
Char *str = (Char *)data;
vg_assert(!VG_(st_isresolved)(st));
@@ -513,5 +514,5 @@ static void stab_resolve(SymType *st, vo
static SymType *stabtype_parser(SegInfo *si, SymType *def, Char **pp)
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
Char *p = *pp;
Char t;
@@ -1035,5 +1036,5 @@ static SymType *stabtype_parser(SegInfo
static Bool initSym(SegInfo *si, Sym *sym, stab_types kind, Char **namep, Int val)
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
Char *name = *namep;
Char *ty;
@@ -1167,5 +1167,5 @@ struct symlist {
static Scope *addSymsToScope(Scope *sc, struct symlist *list, Int nsyms, Scope *outer)
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
Int j;
struct symlist *n;
@@ -1213,5 +1213,5 @@ void VG_(read_debuginfo_stabs) ( SegInfo
UChar* stabstr, Int stabstr_sz )
{
- static const Bool debug = False;
+ static const Bool debug = False || stabs_debug;
Int i;
Int n_stab_entries;
@@ -1291,5 +1291,5 @@ void VG_(read_debuginfo_stabs) ( SegInfo
/* handle continued string stabs */
{
- static const Bool contdebug = False;
+ static const Bool contdebug = False || stabs_debug;
Int buflen = 0;
Int idx = 0;
|