/* Pointers to linked list of messages associated with this line. */
struct list_message *messages, *last_message;
- enum edict_enum edict;
- char *edict_arg;
-
+#ifdef OBJ_ELF
/* Nonzero if this line is to be omitted because it contains
debugging information. This can become a flags field if we come
up with more information to store here. */
- int debugging;
+ bool debugging;
+#endif
+
+ enum edict_enum edict;
+ char *edict_arg;
+
};
typedef struct list_info_struct list_info_type;
static void print_lines (list_info_type *, unsigned int, const char *,
unsigned int);
static void list_symbol_table (void);
-static int debugging_pseudo (list_info_type *, const char *);
static void listing_listing (char *);
static void
considered to be debugging information. This includes the
statement which switches us into the debugging section, which we
can only set after we are already in the debugging section. */
- if ((listing & LISTING_NODEBUG) != 0
+ if (IS_ELF
+ && (listing & LISTING_NODEBUG) != 0
&& listing_tail != NULL
&& ! listing_tail->debugging)
{
segname = segment_name (now_seg);
if (startswith (segname, ".debug")
|| startswith (segname, ".line"))
- listing_tail->debugging = 1;
+ listing_tail->debugging = true;
}
#endif
new_i->edict = EDICT_NONE;
new_i->hll_file = (file_info_type *) NULL;
new_i->hll_line = 0;
- new_i->debugging = 0;
new_frag ();
#ifdef OBJ_ELF
/* In ELF, anything in a section beginning with .debug or .line is
considered to be debugging information. */
+ new_i->debugging = false;
if ((listing & LISTING_NODEBUG) != 0)
{
const char *segname;
segname = segment_name (now_seg);
if (startswith (segname, ".debug")
|| startswith (segname, ".line"))
- new_i->debugging = 1;
+ new_i->debugging = true;
}
#endif
}
/* Sometimes the user doesn't want to be bothered by the debugging
records inserted by the compiler, see if the line is suspicious. */
-static int
-debugging_pseudo (list_info_type *list, const char *line)
+static bool
+debugging_pseudo (list_info_type *list ATTRIBUTE_UNUSED, const char *line)
{
#ifdef OBJ_ELF
- static int in_debug;
- int was_debug;
-#endif
+ static bool in_debug;
+ bool was_debug;
if (list->debugging)
{
-#ifdef OBJ_ELF
- in_debug = 1;
-#endif
- return 1;
+ in_debug = true;
+ return true;
}
-#ifdef OBJ_ELF
was_debug = in_debug;
- in_debug = 0;
+ in_debug = false;
#endif
while (ISSPACE (*line))
&& list->next != NULL
&& list->next->debugging)
{
- in_debug = 1;
- return 1;
+ in_debug = true;
+ return true;
}
#endif
- return 0;
+ return false;
}
line++;
if (startswith (line, "def"))
- return 1;
+ return true;
if (startswith (line, "val"))
- return 1;
+ return true;
if (startswith (line, "scl"))
- return 1;
+ return true;
if (startswith (line, "line"))
- return 1;
+ return true;
if (startswith (line, "endef"))
- return 1;
+ return true;
if (startswith (line, "ln"))
- return 1;
+ return true;
if (startswith (line, "type"))
- return 1;
+ return true;
if (startswith (line, "size"))
- return 1;
+ return true;
if (startswith (line, "dim"))
- return 1;
+ return true;
if (startswith (line, "tag"))
- return 1;
+ return true;
if (startswith (line, "stabs"))
- return 1;
+ return true;
if (startswith (line, "stabn"))
- return 1;
+ return true;
- return 0;
+ return false;
}
static void