Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fred Fish <fnf@specifix.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Recognize and skip interpreter_p initialization in selftest.exp
Date: Sun, 26 Feb 2006 19:38:00 -0000	[thread overview]
Message-ID: <200602261411.48296.fnf@specifix.com> (raw)
In-Reply-To: <20060226184004.GA19823@nevyn.them.org>

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 <captured_main>:      push   %ebp
0x807c711 <captured_main+1>:    mov    %esp,%ebp
0x807c713 <captured_main+3>:    push   %edi
0x807c714 <captured_main+4>:    mov    $0x1,%edi
0x807c719 <captured_main+9>:    push   %esi
0x807c71a <captured_main+10>:   mov    $0x1,%esi
0x807c71f <captured_main+15>:   push   %ebx
0x807c720 <captured_main+16>:   sub    $0x11c,%esp
0x807c726 <captured_main+22>:   mov    0x8(%ebp),%ebx
0x807c729 <captured_main+25>:   mov    0x4(%ebx),%edx
0x807c72c <captured_main+28>:   mov    (%ebx),%eax
0x807c72e <captured_main+30>:   mov    %edx,0xffffff08(%ebp)
0x807c734 <captured_main+36>:   mov    %eax,0xffffff04(%ebp)
0x807c73a <captured_main+42>:   call   0x8230970 <get_run_time>
0x807c73f <captured_main+47>:   movl   $0x823b767,0x4(%esp)
0x807c747 <captured_main+55>:   movl   $0x5,(%esp)
0x807c74e <captured_main+62>:   mov    %eax,0xffffff30(%ebp)
0x807c754 <captured_main+68>:   call   0x807ba20 <setlocale@plt>
0x807c759 <captured_main+73>:   movl   $0x823b767,0x4(%esp)
0x807c761 <captured_main+81>:   movl   $0x0,(%esp)
0x807c768 <captured_main+88>:   call   0x807ba20 <setlocale@plt>
0x807c76d <captured_main+93>:   movl   $0x8232b80,0x4(%esp)
0x807c775 <captured_main+101>:  movl   $0x8232a90,(%esp)
0x807c77c <captured_main+108>:  call   0x807bd20 <bindtextdomain@plt>
0x807c781 <captured_main+113>:  movl   $0x8232a90,(%esp)
0x807c788 <captured_main+120>:  call   0x807c030 <textdomain@plt>
0x807c78d <captured_main+125>:  movl   $0x0,(%esp)
0x807c794 <captured_main+132>:  call   0x807be10 <sbrk@plt>
0x807c799 <captured_main+137>:  movl   $0x8,(%esp)
0x807c7a0 <captured_main+144>:  mov    %eax,0x82d36e0
0x807c7a5 <captured_main+149>:  call   0x8084f20 <xmalloc>
0x807c7aa <captured_main+154>:  movl   $0x4,(%esp)
0x807c7b1 <captured_main+161>:  mov    %eax,0xffffff20(%ebp)
0x807c7b7 <captured_main+167>:  call   0x8084f20 <xmalloc>
0x807c7bc <captured_main+172>:  movl   $0x0,0x82d3b90
0x807c7c6 <captured_main+182>:  mov    %eax,0xffffff28(%ebp)
0x807c7cc <captured_main+188>:  mov    0x82b0d68,%eax
0x807c7d1 <captured_main+193>:  mov    %eax,(%esp)
0x807c7d4 <captured_main+196>:  call   0x8084f20 <xmalloc>
0x807c7d9 <captured_main+201>:  mov    %eax,0x82d36fc


  reply	other threads:[~2006-02-26 19:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-26 18:40 Fred Fish
2006-02-26 18:49 ` Daniel Jacobowitz
2006-02-26 19:38   ` Fred Fish [this message]
2006-02-26 20:23     ` Mark Kettenis
2006-02-26 22:44       ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200602261411.48296.fnf@specifix.com \
    --to=fnf@specifix.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox