This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: Also check for `movl %esp, %ebp' for x32
- From: Yao Qi <yao at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "H.J. Lu" <hongjiu dot lu at intel dot com>, GDB <gdb-patches at sourceware dot org>
- Date: Tue, 17 Apr 2012 18:49:44 +0800
- Subject: Re: PATCH: Also check for `movl %esp, %ebp' for x32
- References: <20120410202953.GA23862@intel.com>
On 04/11/2012 04:29 AM, H.J. Lu wrote:
> - && memcmp (buf, mov_rsp_rbp_2, 3) != 0)
> + && memcmp (buf, mov_rsp_rbp_2, 3) != 0
> + && (gdbarch_ptr_bit (gdbarch) == 64
> + || (memcmp (buf, mov_rsp_rbp_1 + 1, 2) != 0
^^
> + && memcmp (buf, mov_rsp_rbp_2 + 1, 2) != 0)))
^^
I don't understand these two constants "2" here. Does this mean the
encoding of `movl %esp, %ebp' is { 0x48, 0x89 } and { 0x48, 0x8b }? If
my understand is correct, why don't we define two new array
"movl_esp_ebp_1" and "movl_esp_ebp_2"? which is easier to read/understand.
--
Yao (éå)