diff options
Diffstat (limited to 'binutils/rddbg.c')
-rw-r--r-- | binutils/rddbg.c | 76 |
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. */ |