From: "Pedro Alves" <pedro_alves@portugalmail.pt>
To: "Pierre Muller" <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Enhance backtrace for microsoft system DLL calls
Date: Mon, 10 Dec 2007 18:41:00 -0000 [thread overview]
Message-ID: <4053daab0712101008o5fd3fdbcuf565761652f23c0d@mail.gmail.com> (raw)
In-Reply-To: <000001c83b4a$573b4560$05b1d020$@u-strasbg.fr>
> @@ -650,6 +650,17 @@ i386_analyze_frame_setup (CORE_ADDR pc,
>
> read_memory_nobpt (pc, &op, 1);
>
> + if (op == 0x8b) /* Ignore no-op instruction `mov %edi, %edi' */
> + {
> + read_memory_nobpt (pc + 1, &op, 1);
> + if (op == 0xff)
> + {
> + pc += 2;
> + read_memory_nobpt (pc, &op, 1);
> + }
> + else
> + op = 0x8b;
> + }
> if (op == 0x55) /* pushl %ebp */
> {
> /* Take into account that we've executed the `pushl %ebp' that
>
>
>
Oh, I forgot to ask on the previous mail -- Is there a reason you don't
read both bytes in one go?
/* small hot patching description here. */
gdb_byte hot_patch[2] = { 0x8b, 0xff };
read_memory_nobpt (pc, buf, 2);
if (memcmp (hot_patch, buf) == 0)
pc += 2;
read_memory_nobpt (pc, &op, 1);
if (op == 0x55) /* pushl %ebp */
... and since this isn't really frame setup code, it
could be moved into a separate function called from
i386_analyze_prologue, probably even before
i386_follow_jump, as this is put really at the
start of the function </end nit>
--
Pedro Alves
next prev parent reply other threads:[~2007-12-10 18:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-10 16:45 Pierre Muller
2007-12-10 17:37 ` Pedro Alves
2007-12-10 18:08 ` Daniel Jacobowitz
2007-12-10 18:41 ` Pedro Alves [this message]
2007-12-11 10:44 ` Mark Kettenis
2007-12-11 17:29 ` Pierre Muller
2008-01-14 10:16 ` [RFC-v2] " Pierre Muller
2008-01-24 0:52 ` Pedro Alves
2008-01-24 17:51 ` Mark Kettenis
2008-01-25 14:16 ` [RFA] i386-tdep.c: Add i386_skip_noop function Pierre Muller
2008-01-25 16:38 ` Joel Brobecker
2008-01-25 16:46 ` [RFA] i386-tdep.c: Add i386_skip_noop function; updated Pierre Muller
2008-01-25 17:05 ` Mark Kettenis
2008-01-25 17:26 ` Joel Brobecker
2008-01-25 18:50 ` Pierre Muller
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=4053daab0712101008o5fd3fdbcuf565761652f23c0d@mail.gmail.com \
--to=pedro_alves@portugalmail.pt \
--cc=gdb-patches@sourceware.org \
--cc=muller@ics.u-strasbg.fr \
/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