This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Also check for `movl %esp, %ebp' for x32


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]