From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17426 invoked by alias); 13 Aug 2013 08:59:31 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 17411 invoked by uid 89); 13 Aug 2013 08:59:31 -0000 X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.2 Received: from mail-ob0-f182.google.com (HELO mail-ob0-f182.google.com) (209.85.214.182) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 13 Aug 2013 08:59:30 +0000 Received: by mail-ob0-f182.google.com with SMTP id wo10so10048920obc.41 for ; Tue, 13 Aug 2013 01:59:28 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.70.134 with SMTP id m6mr2031389oeu.14.1376384368800; Tue, 13 Aug 2013 01:59:28 -0700 (PDT) Received: by 10.182.31.18 with HTTP; Tue, 13 Aug 2013 01:59:28 -0700 (PDT) In-Reply-To: References: <20130724123924.GB4376@host2.jankratochvil.net> Date: Tue, 13 Aug 2013 08:59:00 -0000 Message-ID: Subject: Re: cannot find bounds of function error From: vijay nag To: Jan Kratochvil Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-08/txt/msg00068.txt.bz2 On Wed, Jul 24, 2013 at 6:58 PM, vijay nag wrote: > On Wed, Jul 24, 2013 at 6:19 PM, vijay nag wrote: >> >> >> On Wednesday, July 24, 2013, Jan Kratochvil >> wrote: >>> On Wed, 24 Jul 2013 11:44:15 +0200, vijay nag wrote: >>>> My latest gdb-7.5 barfs out "cannot find bounds of current function" >>>> error when it encounters GNU_IFUNC while executing one line of code at >>>> a time using "next" command >>> >>> Sorry I did not analyze exactly your case but ensure your glibc contains >>> this >>> patch fixing how GDB deals with gnu-ifuncs: >>> >>> commit f85fa27058eb7d4b56b8deaf885064cf8d730f68 >>> Author: H.J. Lu >>> Date: Thu Aug 9 16:04:37 2012 -0700 >>> Avoid DWARF definition DIE on ifunc symbols >>> >>> Besides that there is already stable gdb-7.6 but I do not know about any >>> specific change there for gnu-ifunc. >>> >>> >>> Jan >>> >> Nice to hear from you again and I appreciate your quick turn-around. I shall >> patch the changes to my glibc and check if that is just enough for the >> gdb-7.5 to get going. >> >> Thanks > > > I do see the patch in my glibc-2.17. What could be the issue here ? Jan, First of all, glibc-2.17 seems to be having the fix that you mentioned. Second of all, I upgraded gdb to 7.6 and still encountering the same problem. Gdb is confused when the program jumps to PLT in-order to execute GNU-IFUNC and any number of "Next" command will not make the program proceed any further. (gdb) p $eip $1 = (void (*)()) 0x8048430 (gdb) n Cannot find bounds of current function (gdb) n Cannot find bounds of current function (gdb) n Cannot find bounds of current function (gdb) display $eip 1: $eip = (void (*)()) 0x8048430 (gdb) (gdb) n Cannot find bounds of current function (gdb) n Cannot find bounds of current function (gdb) n Cannot find bounds of current function (gdb) n Cannot find bounds of current function (gdb) p $eip $2 = (void (*)()) 0x8048430 (gdb) I was looking the code diff of "step_once" function in the version 7.6 and 6.3 infcmd.c const char *name; if (find_pc_partial_function (pc, &name, &tp->control.step_range_start, &tp->control.step_range_end) == 0) error (_("Cannot find bounds of current function")); target_terminal_ours (); printf_filtered (_("Single stepping until exit from function %s," "\nwhich has no line number information.\n"), name); } Earlier version had a plain printf for the error line, where as in the newer versions it has been replaced by error_() which seems to be unwinding the current gdb stack by doing a long-jump. Any statements after error() are superfluously existing without any effect.