aboutsummaryrefslogtreecommitdiff
path: root/binutils/rddbg.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-11-30 08:39:46 +0000
committerAlan Modra <amodra@gmail.com>2002-11-30 08:39:46 +0000
commitb34976b65aea8f33690229600bbf4527ec3118e1 (patch)
tree6411348664ef81ca2aa2e3ff325116e6e6502edf /binutils/rddbg.c
parent583d52d728c60410c0d39bae68ee536a7b9e7a6c (diff)
downloadgdb-b34976b65aea8f33690229600bbf4527ec3118e1.zip
gdb-b34976b65aea8f33690229600bbf4527ec3118e1.tar.gz
gdb-b34976b65aea8f33690229600bbf4527ec3118e1.tar.bz2
s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
Diffstat (limited to 'binutils/rddbg.c')
-rw-r--r--binutils/rddbg.c76
1 files changed, 40 insertions, 36 deletions
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index b6ca9e1..2e0fd67 100644
--- a/binutils/rddbg.c
+++ b/binutils/rddbg.c
@@ -29,14 +29,18 @@
#include "debug.h"
#include "budbg.h"
-static boolean read_section_stabs_debugging_info
- PARAMS ((bfd *, asymbol **, long, PTR, boolean *));
-static boolean read_symbol_stabs_debugging_info
- PARAMS ((bfd *, asymbol **, long, PTR, boolean *));
-static boolean read_ieee_debugging_info PARAMS ((bfd *, PTR, boolean *));
-static void save_stab PARAMS ((int, int, bfd_vma, const char *));
-static void stab_context PARAMS ((void));
-static void free_saved_stabs PARAMS ((void));
+static bfd_boolean read_section_stabs_debugging_info
+ PARAMS ((bfd *, asymbol **, long, PTR, bfd_boolean *));
+static bfd_boolean read_symbol_stabs_debugging_info
+ PARAMS ((bfd *, asymbol **, long, PTR, bfd_boolean *));
+static bfd_boolean read_ieee_debugging_info
+ PARAMS ((bfd *, PTR, bfd_boolean *));
+static void save_stab
+ PARAMS ((int, int, bfd_vma, const char *));
+static void stab_context
+ PARAMS ((void));
+static void free_saved_stabs
+ PARAMS ((void));
/* Read debugging information from a BFD. Returns a generic debugging
pointer. */
@@ -48,7 +52,7 @@ read_debugging_info (abfd, syms, symcount)
long symcount;
{
PTR dhandle;
- boolean found;
+ bfd_boolean found;
dhandle = debug_init ();
if (dhandle == NULL)
@@ -79,7 +83,7 @@ read_debugging_info (abfd, syms, symcount)
{
if (! parse_coff (abfd, syms, symcount, dhandle))
return NULL;
- found = true;
+ found = TRUE;
}
if (! found)
@@ -94,13 +98,13 @@ read_debugging_info (abfd, syms, symcount)
/* Read stabs in sections debugging information from a BFD. */
-static boolean
+static bfd_boolean
read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
bfd *abfd;
asymbol **syms;
long symcount;
PTR dhandle;
- boolean *pfound;
+ bfd_boolean *pfound;
{
static struct
{
@@ -111,7 +115,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
unsigned int i;
PTR shandle;
- *pfound = false;
+ *pfound = FALSE;
shandle = NULL;
for (i = 0; i < sizeof names / sizeof names[0]; i++)
@@ -134,7 +138,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
fprintf (stderr, "%s: %s: %s\n",
bfd_get_filename (abfd), names[i].secname,
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
strsize = bfd_section_size (abfd, strsec);
@@ -144,17 +148,17 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
fprintf (stderr, "%s: %s: %s\n",
bfd_get_filename (abfd), names[i].strsecname,
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
if (shandle == NULL)
{
- shandle = start_stab (dhandle, abfd, true, syms, symcount);
+ shandle = start_stab (dhandle, abfd, TRUE, syms, symcount);
if (shandle == NULL)
- return false;
+ return FALSE;
}
- *pfound = true;
+ *pfound = TRUE;
stroff = 0;
next_stroff = 0;
@@ -227,7 +231,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
{
stab_context ();
free_saved_stabs ();
- return false;
+ return FALSE;
}
/* Don't free f, since I think the stabs code
@@ -248,21 +252,21 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (shandle != NULL)
{
if (! finish_stab (dhandle, shandle))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Read stabs in the symbol table. */
-static boolean
+static bfd_boolean
read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
bfd *abfd;
asymbol **syms;
long symcount;
PTR dhandle;
- boolean *pfound;
+ bfd_boolean *pfound;
{
PTR shandle;
asymbol **ps, **symend;
@@ -282,12 +286,12 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (shandle == NULL)
{
- shandle = start_stab (dhandle, abfd, false, syms, symcount);
+ shandle = start_stab (dhandle, abfd, FALSE, syms, symcount);
if (shandle == NULL)
- return false;
+ return FALSE;
}
- *pfound = true;
+ *pfound = TRUE;
s = i.name;
f = NULL;
@@ -314,7 +318,7 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
{
stab_context ();
free_saved_stabs ();
- return false;
+ return FALSE;
}
/* Don't free f, since I think the stabs code expects
@@ -328,19 +332,19 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (shandle != NULL)
{
if (! finish_stab (dhandle, shandle))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Read IEEE debugging information. */
-static boolean
+static bfd_boolean
read_ieee_debugging_info (abfd, dhandle, pfound)
bfd *abfd;
PTR dhandle;
- boolean *pfound;
+ bfd_boolean *pfound;
{
asection *dsec;
bfd_size_type size;
@@ -351,21 +355,21 @@ read_ieee_debugging_info (abfd, dhandle, pfound)
dsec = bfd_get_section_by_name (abfd, ".debug");
if (dsec == NULL)
- return true;
+ return TRUE;
size = bfd_section_size (abfd, dsec);
contents = (bfd_byte *) xmalloc (size);
if (! bfd_get_section_contents (abfd, dsec, contents, 0, size))
- return false;
+ return FALSE;
if (! parse_ieee (dhandle, abfd, contents, size))
- return false;
+ return FALSE;
free (contents);
- *pfound = true;
+ *pfound = TRUE;
- return true;
+ return TRUE;
}
/* Record stabs strings, so that we can give some context for errors. */