2002-11-18 Klee Dienes <kdienes@apple.com>
[deliverable/binutils-gdb.git] / gdb / dbxread.c
index 0cf709199728cb88306e0a163fbbd2ce4f89f5b9..538f076a6f7eb6dfa79f9eb9cad83734f29eaa2a 100644 (file)
@@ -2774,6 +2774,13 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
        {
          /* This N_FUN marks the end of a function.  This closes off the
             current block.  */
+
+         if (context_stack_depth <= 0)
+           {
+             complain (&lbrac_mismatch_complaint, symnum);
+             break;
+           }
+
          record_line (current_subfile, 0, function_start_offset + valu);
          within_function = 0;
          new = pop_context ();
@@ -2843,6 +2850,12 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
           N_SO, the linker did not relocate them (sigh).  */
        valu += last_source_start_addr;
 
+      if (context_stack_depth <= 0)
+       {
+         complain (&lbrac_mismatch_complaint, symnum);
+         break;
+       }
+
       new = pop_context ();
       if (desc != new->depth)
        complain (&lbrac_mismatch_complaint, symnum);
This page took 0.023198 seconds and 4 git commands to generate.