--- ./gdb/symtab.c_orig	2013-01-17 12:38:13 +0500
+++ ./gdb/symtab.c	2013-01-17 12:40:51 +0500
@@ -2372,6 +2372,9 @@
 	{
 	  /* Leave prev pointing to the linetable entry for the last line
 	     that started at or before PC.  */
+          if ((item->pc > pc) && !i) /* for xlc one less entry for line table */
+                prev = item;            /* point item as prev */
+
 	  if (item->pc > pc)
 	    break;
 
@@ -4823,7 +4826,9 @@
 	    break;
 	  /* Assume that a consecutive SAL for the same (or larger)
 	     line mark the prologue -> body transition.  */
-	  if (sal.line >= prologue_sal.line)
+         /* For xlc, line table entries not in order, consecutive SAL marked by comparing pc*/
+
+         if (sal.line >= prologue_sal.line ||((sal.line <= prologue_sal.line) && (sal.pc == prologue_sal.end)))
 	    break;
 
 	  /* The line number is smaller.  Check that it's from the
