From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3875 invoked by alias); 26 Feb 2006 19:11:37 -0000 Received: (qmail 3865 invoked by uid 22791); 26 Feb 2006 19:11:36 -0000 X-Spam-Check-By: sourceware.org Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 26 Feb 2006 19:11:34 +0000 Received: from [::1] (duck.specifix.com [64.220.152.99]) by duck.specifix.com (Postfix) with ESMTP id 9219341E4; Sun, 26 Feb 2006 11:11:32 -0800 (PST) From: Fred Fish Reply-To: fnf@specifix.com To: Daniel Jacobowitz Subject: Re: [PATCH] Recognize and skip interpreter_p initialization in selftest.exp Date: Sun, 26 Feb 2006 19:38:00 -0000 User-Agent: KMail/1.9.1 Cc: gdb-patches@sourceware.org References: <200602261335.28612.fnf@specifix.com> <20060226184004.GA19823@nevyn.them.org> In-Reply-To: <20060226184004.GA19823@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602261411.48296.fnf@specifix.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00485.txt.bz2 On Sunday 26 February 2006 13:40, Daniel Jacobowitz wrote: > happen? Could you please verify a couple of things for me: that we are > reasonably close to the beginning of the function, that the prologue > skipper hasn't gone too far, and that the instruction being executed > has actually got some relationship to line 241. I'm not very familiar with x86 assembly so I'm probably not the best one to look closely at the code generated for captured_main. Here is what I get when I run by hand and do a bunch of "next" commands: (gdb) br captured_main Breakpoint 1 at 0x807c714: file /src/latest/trunk/src/gdb/gdb/main.c, line 241. (gdb) run Starting program: /links/build/latest/trunk/i686-pc-linux-gnu/gdb/gdb/gdb Breakpoint 1, captured_main (data=0xbfbb4734) at /src/latest/trunk/src/gdb/gdb/main.c:241 241 interpreter_p = xstrdup (context->interpreter_p); (gdb) next 120 { (gdb) 241 interpreter_p = xstrdup (context->interpreter_p); (gdb) 120 { (gdb) 123 char **argv = context->argv; (gdb) 122 int argc = context->argc; (gdb) 123 char **argv = context->argv; (gdb) 122 int argc = context->argc; (gdb) 165 long time_at_startup = get_run_time (); (gdb) 168 setlocale (LC_MESSAGES, ""); (gdb) 165 long time_at_startup = get_run_time (); (gdb) 168 setlocale (LC_MESSAGES, ""); (gdb) 171 setlocale (LC_CTYPE, ""); (gdb) 173 bindtextdomain (PACKAGE, LOCALEDIR); (gdb) 174 textdomain (PACKAGE); (gdb) 177 lim_at_start = (char *) sbrk (0); (gdb) 187 cmdarg = (struct cmdarg *) xmalloc (cmdsize * sizeof (*cmdarg)); (gdb) 177 lim_at_start = (char *) sbrk (0); (gdb) I suppose it's possible though that the code at 0x807c714 doesn't have anything to do with line 241: (gdb) x/40i captured_main 0x807c710 : push %ebp 0x807c711 : mov %esp,%ebp 0x807c713 : push %edi 0x807c714 : mov $0x1,%edi 0x807c719 : push %esi 0x807c71a : mov $0x1,%esi 0x807c71f : push %ebx 0x807c720 : sub $0x11c,%esp 0x807c726 : mov 0x8(%ebp),%ebx 0x807c729 : mov 0x4(%ebx),%edx 0x807c72c : mov (%ebx),%eax 0x807c72e : mov %edx,0xffffff08(%ebp) 0x807c734 : mov %eax,0xffffff04(%ebp) 0x807c73a : call 0x8230970 0x807c73f : movl $0x823b767,0x4(%esp) 0x807c747 : movl $0x5,(%esp) 0x807c74e : mov %eax,0xffffff30(%ebp) 0x807c754 : call 0x807ba20 0x807c759 : movl $0x823b767,0x4(%esp) 0x807c761 : movl $0x0,(%esp) 0x807c768 : call 0x807ba20 0x807c76d : movl $0x8232b80,0x4(%esp) 0x807c775 : movl $0x8232a90,(%esp) 0x807c77c : call 0x807bd20 0x807c781 : movl $0x8232a90,(%esp) 0x807c788 : call 0x807c030 0x807c78d : movl $0x0,(%esp) 0x807c794 : call 0x807be10 0x807c799 : movl $0x8,(%esp) 0x807c7a0 : mov %eax,0x82d36e0 0x807c7a5 : call 0x8084f20 0x807c7aa : movl $0x4,(%esp) 0x807c7b1 : mov %eax,0xffffff20(%ebp) 0x807c7b7 : call 0x8084f20 0x807c7bc : movl $0x0,0x82d3b90 0x807c7c6 : mov %eax,0xffffff28(%ebp) 0x807c7cc : mov 0x82b0d68,%eax 0x807c7d1 : mov %eax,(%esp) 0x807c7d4 : call 0x8084f20 0x807c7d9 : mov %eax,0x82d36fc