aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2003-11-07 22:12:39 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2003-11-07 22:12:39 +0000
commit047c6eac118070bdaa0650bbcc3f704a79615280 (patch)
tree7f2ec2b792cf2bc0cb90fe3809ed0ec086fe92ff
parent1cd93a2a2b60ad17a7dcaed3124c3fa0a4e65417 (diff)
downloadgcc-047c6eac118070bdaa0650bbcc3f704a79615280.zip
gcc-047c6eac118070bdaa0650bbcc3f704a79615280.tar.gz
gcc-047c6eac118070bdaa0650bbcc3f704a79615280.tar.bz2
re PR pch/11654 (incorrect stabs when using pre-compiled headers)
PR 11654 * dbxout.c (struct dbx_file): Do not save for PCH. (current_file): Likewise. (dbxout_init): Don't allocate struct dbx_file using GC. (dbxout_start_source_file): Likewise. From-SVN: r73346
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/dbxout.c22
2 files changed, 22 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f658db5..80f1b5f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2003-11-07 Geoffrey Keating <geoffk@apple.com>
+
+ PR 11654
+ * dbxout.c (struct dbx_file): Do not save for PCH.
+ (current_file): Likewise.
+ (dbxout_init): Don't allocate struct dbx_file using GC.
+ (dbxout_start_source_file): Likewise.
+
2003-11-07 Falk Hueffner <falk@debian.org>
* config/alpha/elf.h, config/alpha/unicosmk.h,
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index ef04c83..e6b2c88 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -185,19 +185,25 @@ enum binclstatus {BINCL_NOT_REQUIRED, BINCL_PENDING, BINCL_PROCESSED};
pair of the file number and the type number within the file.
This is a stack of input files. */
-struct dbx_file GTY(())
+struct dbx_file
{
struct dbx_file *next;
int file_number;
int next_type_number;
- enum binclstatus bincl_status; /* Keep track of lazy bincl. */
- const char *pending_bincl_name; /* Name of bincl. */
- struct dbx_file *prev; /* Chain to traverse all pending bincls. */
+ enum binclstatus bincl_status; /* Keep track of lazy bincl. */
+ const char *pending_bincl_name; /* Name of bincl. */
+ struct dbx_file *prev; /* Chain to traverse all pending bincls. */
};
-/* This is the top of the stack. */
+/* This is the top of the stack.
+
+ This is not saved for PCH, because restoring a PCH should not change it.
+ next_file_number does have to be saved, because the PCH may use some
+ file numbers; however, just before restoring a PCH, next_file_number
+ should always be 0 because we should not have needed any file numbers
+ yet. */
-static GTY(()) struct dbx_file *current_file;
+static struct dbx_file *current_file;
/* This is the next file number to use. */
@@ -513,7 +519,7 @@ dbxout_init (const char *input_file_name)
next_type_number = 1;
#ifdef DBX_USE_BINCL
- current_file = ggc_alloc (sizeof *current_file);
+ current_file = xmalloc (sizeof *current_file);
current_file->next = NULL;
current_file->file_number = 0;
current_file->next_type_number = 1;
@@ -625,7 +631,7 @@ dbxout_start_source_file (unsigned int line ATTRIBUTE_UNUSED,
const char *filename ATTRIBUTE_UNUSED)
{
#ifdef DBX_USE_BINCL
- struct dbx_file *n = ggc_alloc (sizeof *n);
+ struct dbx_file *n = xmalloc (sizeof *n);
n->next = current_file;
n->next_type_number = 1;